🔥 Git เป็น Version Control ที่ใช้จัดเก็บและควบคุมการเปลี่ยนแปลงที่เกิดขึ้นกับไฟล์ชนิดต่างๆ เช่น Text file, Source Code เป็นต้น
.
✍️ ซึ่งมันจะใช้เก็บบันทึกการเปลี่ยนแปลงของ Source Code เวอร์ชันล่าสุดที่เครื่องของเรา (Local Repository) สามารถทำงานได้โดยที่ไม่ต้องใช้เน็ต หากต้องการอัปเดต หรือเปลี่ยนแปลงก็สามารถทำการ Push ขึ้นไปเก็บที่ Remote Repository ได้นั่นเอง!
.
🔎 มันมีคำสั่งอะไร แล้วแต่ละอย่างใช้ทำอะไรบ้างไปดูกันเลยจ้า
.
⭐ 1) Git clone - ใช้ดาวน์โหลด/คัดลอกโปรเจกต์จาก Remote Repository ไว้ในเครื่องของเรา
.
คำสั่ง
git clone
⭐ 2) Git branch - สร้าง ลบ และเรียกดู Branch ได้ตามต้องการ
.
คำสั่งสร้าง Branch ใหม่
git branch
.
คำสั่งลบ Branch
git branch -d
⭐ 3) Git checkout - ใช้เปลี่ยน Branch ในการทำงาน
.
คำสั่ง
git checkout
.
หรือสามารถสร้าง Branch ใหม่และเรียกใช้ทันที ด้วยคำสั่ง
git checkout -b
⭐ 4) Git status - ใช้เช็คสถานะของไฟล์ต่างๆ ในโปรเจกต์ของเรา เช่น
.
คำสั่ง
git status
.
⭐ 5) Git add - ใช้สำหรับอัปเดตเวอร์ชันใหม่ของ Code ที่ถูกแก้ไขหรือสร้างใหม่ขึ้นบน Stage
.
คำสั่ง (ระบุชื่อไฟล์ที่ต้องการ)
git add
.
คำสั่ง (ไฟล์ทั้งหมดในโฟลเดอร์)
git add -A
.
⭐ 6) Git commit - ใช้สำหรับยืนยันการเปลี่ยนแปลงของไฟล์ที่ถูก Add ขึ้นมาบน Stage และสามารถใส่ Comment สั้นๆ ได้ด้วย
.
คำสั่ง
git commit -m "commit message"
.
⭐ 7) Git push - ใช้สำหรับอัปเดต Code ที่ถูก Commit ขึ้นบน Remote Repository
git push
.
แต่ถ้าเราเขียน Code ใน Branch ใหม่ที่ยังไม่มีบน Remote Repository ให้ใช้คำสั่ง
git push --set-upstream
.
หรือ
git push -u origin
.
⭐ 8) Git pull - รับการอัปเดตจาก Remote Repository มาในเครื่องของเรา
.
คำสั่ง
git pull
.
⭐ 9) Git revert - คำสั่งยกเลิกการอัปเดตจากฝั่งเราออกจาก Remote Repository
*ต้องใช้อย่างระวังเพราะอาจจะพลาดลบบางอย่างที่ไม่ต้องการได้
.
คำสั่ง
git revert
.
⭐ 10) Git merge - ใช้สำหรับรวม Branch ที่ต้องการเข้าด้วยกัน
.
คำสั่ง
git merge
.
ครบแล้วกับ 10 คำสั่ง Git เบื้องต้นที่มือใหม่ควรรู้ หวังว่าจะเป็นประโยชน์กับเพื่อนๆ นะคะ 😍
.
borntoDev - 🦖 สร้างการเรียนรู้ที่ดีสำหรับสายไอทีในทุกวัน
「revert commit」的推薦目錄:
- 關於revert commit 在 BorntoDev Facebook 的最佳貼文
- 關於revert commit 在 大紀元時報(香港) Facebook 的最佳貼文
- 關於revert commit 在 Taipei Ethereum Meetup Facebook 的精選貼文
- 關於revert commit 在 Reverting a commit - GitHub Docs 的評價
- 關於revert commit 在 How do I revert a Git repository to a previous commit? 的評價
- 關於revert commit 在 Git + GitHub 版本控制教學(4) - 回復到之前的版本:checkout 的評價
- 關於revert commit 在 Git Revert - W3Schools 的評價
- 關於revert commit 在 How to revert an existing commit 的評價
- 關於revert commit 在 How to revert commit from GitHub - RailsCarma 的評價
- 關於revert commit 在 Permanently revert GitHub branch to a specific commit 的評價
- 關於revert commit 在 Rollback to prior commit with revert - Visual Studio Tutorial 的評價
- 關於revert commit 在 git - Automatically reverting commits that fail the build 的評價
revert commit 在 大紀元時報(香港) Facebook 的最佳貼文
港實業家袁弓夷給美國務卿蓬佩奧的一封信:請救救香港的孩子。
中文(英文在後):
親愛的國務卿蓬佩奧鈞鑒,我以愛好自由的香港人名義,感謝你對香港的支持。今年是天安門64屠城的31周年。在中國對民主渴望上的重要時刻。
您選擇了支持香港爭取自由,說明在此關鍵時刻,您與香港的英雄們真誠地站在一起爭取人權。這些數以百萬計的英雄們是為自己家園的未來挺身而出的普通香港人;還有那些無名的律師、義工、醫護人員、記者、藝人緊守崗位,讓我們的聲音得以傳播;也是那些敢於繼續為做對的事而站出來的年青人。
但是,爭取自由需付出大代價。這些戰士是我們的孩子,也是香港社會普普通通的孩子。
在過去的12個月,有太多的孩子被拘捕、虐待、強姦、謀殺,同時有孩子懷疑已經被送中,秘密被關到集中營,再也沒有音訊了。
為爭取保護自己城市機會,他們犧牲了自己的工作,據「Hong Kong watch」公佈,從去年6月9號至今,已經有8,934位抗爭者被捕,年齡介乎11到84歲。繼他們後,誰還去抗爭?要犧牲多少個我們年輕人的未來才能換到基本的自由?
它們正在抹去我們的語言;
我們香港人的身分
我們的言論自由
我們的法治
我們的孩子
現在,我們需要美國去抵禦中共。若等到6月底讓國安法通過,就等同在等待著另一場大屠殺的展開。
中共以「會收手」做偽裝,讓世界允許其犯下對無辜生命的殘暴行為。它們是永遠不會停手的,直到它們控制了世界,包括美國。
如現在不阻止中共,就會太遲了!我們必須吸取歷史教訓,姑息政策從來沒成功過。
中共已經背棄《中英聯合聲明》中對港人「一國兩制」的承諾。世界領袖不單止是要支持,而是要爭取的時刻已經到來。如果成功,歷史將會記住美國是一個敢於承擔、真正為民主發聲的國家。
我懇請:
因中華人民共和國已經背棄了它在《中英聯合聲明》中的所有責任。香港的主權應該恢復給英國。請說服您的英國盟友在此刻做對的事;就是將主權移交給香港人,條件是在6個月內,在國際獨立監查下,完成真正的公投,讓港人自己選擇他們的未來。
香港是屬於香港人的。
在公投前,我們需要美國的軍隊保護香港,像當年保護西德,免受中共無休止地干預、滲透、欺騙和鎮壓我們的孩子。您在香港的8萬5千子民也需您的保護。
最後,當您致力於再次維持南中國海安全時,請把我們列入您的戰事計劃中,因為我們也是南中國海的部份。
國務卿先生,作為自由世界的聯盟,請讓香港再變得安全。
敬侯卓裁!
天佑美國!天護香港!
袁弓夷敬上
English:
Secretary Pompeo,
On behalf of our FREEDOM loving people in HK, I thank you for STANDING WITH HONG KONG.
The coming June 4th is the 31st anniversary of the Tiananmen Massacre. A pivotal moment in China’s hope for democracy.
Your decision to stand with freedom in Hong Kong shows your true dedication to human rights in today’s watershed moment, with the heroes of Hong Kong.
The millions of everyday Hong Kongers marching for the future of their home.
The nameless lawyers, volunteers, medical staff, journalists, artists doing their part to keep our voices alive.
The youth of Hong Kong daring to stand up for what they know in their heart to be right.
But the fight for freedom has come at great cost.
These warriors are our children and every day Hong Kong kids.
And in the last 12 months, Too many have been arrested, tortured, raped, murdered and many allegedly shipped across the border to secret concentration camps, never to be heard of again.
Giving up their lives for a chance at the preservation of their city.
8934 protestors aged between 11 and 84 years have been arrested since June 9th 2019.
After them, who will be left to fight?
How many of our young will have to sacrifice their futures for basic rights?
They are erasing our language.
Our identity as Hong Kong people.
Our right to speak.
Our rule of law.
Our children.
We need the US to stand up to the CCP, NOW.
Waiting for the National Security Law to be passed in late June is waiting for another Holocaust to begin.
The world has allowed China to commit mass atrocities against human lives under the pretense that one day they will stop.
They will never stop until they control the world, including America.
If it doesn’t stop here now, it will be too late.
We must learn from history that appeasement will NEVER work.
The one country two systems promised Hong Kong in the joint Sino-British Declaration has been obliterated.
Now is the moment for our world leaders to not only stand up, but to fight. If done, history will remember America as a nation that dared, truly, to be a voice for freedom.
Here is what I ask:
Since the PRC has reneged on all its obligations in the Joint Sino British Declaration, HK Sovereignty should revert back to the UK. Please convince your ally UK to do the right thing this time, by transferring the Sovereignty back to the people of HK, on the condition of a genuine referendum in 6 months, supervised by international and independent judges, to choose their own future.
Hong Kong belong to HK people.
Before the referendum, we need your troops to keep HK safe as West Berlin, from the Communist’s never ending interferences, infiltrations, cheating and persecution of our youths. Your 85,000 US citizens in HK also need your protection.
Lastly, while you are working to make South China Sea safe again, please include us in your battle plan.
We are also in the South China Sea.
Mr. Secretary, as an ally in the free world, please
make HK safe again.
Thank you.
God Bless USA
God Save HK.
===========
📣香港告急‼️
付費支持抗共媒體
香港人一定要贏💪🏻
香港大紀元時報新聞網於6月1日起轉為付費形式💳,一日未輸,我們絕不放棄!
💎立即支持訂閱:https://hk.epochtimes.com/subscribe
每月只需2杯☕☕價錢前線記者們就可以堅持下去!
revert commit 在 Taipei Ethereum Meetup Facebook 的精選貼文
📜 [專欄新文章] Boomerang: 在支付通道網路中利用冗餘改進Latency以及Throughput
✍️ Brian Po-han Chen
📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium
上個月去參加Stanford Blockchain Conference 2020,聽到了許多我覺得很有趣的新題目,有時間再一一分享
我一直對區塊鏈的Scalability很有興趣,如果你不是非常熟悉閃電網路,我建議可以看一下陳品在Coscup19的演講.
前幾年許多人在討論Atomic Multi-Path Payments (AMP),原因是當支付通道的金額越高,Client需要在通道中存越高的金額,並且整個網路越難找到適合的支付路徑,Liquidity也會降低.所以Idea就是把大筆的金額分成多個小筆的金額透過不同的路徑付給收取人,但是問題是在網路中這筆應付款項可能會部分成功、部分失敗;所以同時讓所有的微支付交易可以做到Atomic就是這一個題目的挑戰.
AMP 也很常因為部分路徑上的交易延遲或者失敗,而使得完成交易的時間變得很長(long time-to-completion)、減緩已成功的微支付交易的Liquidity、最後使得整個網路的Throughput變差.
舉例:Alice 要轉帳給Bob 4塊錢,透過4個不同的路徑各自轉1塊錢
在上述例子中,AMP整體消耗的Liquidity是$4 * 4 = $16 sec
假設一下如果Alice可以分成8個路徑(增加額外4個冗餘路徑)各自付1塊錢,使得只要其中的4個路徑完成並且Bob不會偷額外的金額,AMP就算完成
在上述例子中,AMP整體消耗變成$1*6 + $2*4 = $14 sec
上面兩個例子都還是假設每個路徑會成功的情況,若是有中間節點crash或者是delay超久,冗餘路徑可以大幅的改進這筆交易的Latency以及整個網路的Throughput跟Liquidity
不過要怎麼保證Bob不會拿額外冗餘路徑上的錢呢?
先講一個這篇文章使用到的重要密碼學工具,利用區塊鏈橢圓曲線上的循環群特性可得到以下的同態特性
Boomerang利用同態特性以及Publicly Verifiable Secret Sharing (有關secret sharing可以參考Kimi的文章)所構成的preimages 和 preimages challenges使得當Bob overdraws款項時,Alice會得到Bob設定的秘密 alpha_0,而Boomerang contract做了一個HTLC-type的限制,當Alice得到alpha_0,則Alice可以revert這筆微支付.
首先,Alice跟Bob同意了將一筆價值v的交易切成v個1塊錢的微支付交易,另外利用額外的u個冗餘路徑來增加效率(BTW 可以不止u個,理論上無限個也可以),所以全部的路徑為v+u
Bob設定一個degree為v的多項式P(x),係數為alpha_0, alpha_1,…,alpha_v
接著Bob 將H(alpha_0), H(alpha_1),…,H(alpha_v)交給Alice來commit 這組P(x),因此Alice可以算出
對於第i-th路徑的微支付交易(HTLC-type)來說,Bob只要揭露preimage P(i)便可以redeem這筆微交易,Bob只要揭露在v個路徑上對應的每一個P(i)就可以得到總額v的交易.而當Bob揭露了v+1個P(i)時,Alice就可以利用插值法將係數算出來取得alpha_0並且revert全部的微交易.
大致上的架構是這樣,有一些實作的細節像是微交易的手續費、設定的延遲時間、合約的script可以去參考paper或者跟我討論,感謝
Reference:
Boomerang: Redundancy Improves Latency and Throughput in Payment-Channel Network
Boomerang: 在支付通道網路中利用冗餘改進Latency以及Throughput was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.
👏 歡迎轉載分享鼓掌
revert commit 在 Git + GitHub 版本控制教學(4) - 回復到之前的版本:checkout 的推薦與評價
使用reset、revert、checkout 可以讓我們回到過去的版本,本篇文章會介紹這些指令的差異以及使用的時機。 HEAD 以及commit id. 在開發到一個段落以後, ... ... <看更多>
revert commit 在 Reverting a commit - GitHub Docs 的推薦與評價
The original commit also remains in the repository's history. Tip: When you revert multiple commits, it's best to revert in order from newest to oldest. If you ... ... <看更多>