我在 github 中有一個名為 master 的分支。它有 3 個標簽:
1.0.0
2.0.0
3.0.0
我想從 master:2.0.0 中獲取代碼,對其進行修改并將其推回,以便最終結果我將擁有一個帶有標簽的 master 分支:
1.0.0
2.0.0
2.0.1 --> new code
3.0.0
所以從我的機器上我做:
git clone <repo url>
git checkout tags/2.0.0
git checkout -b feature/fix
(now i modify the code)
git add .
git commit -m "Changed code"
我真的不知道從這里做什么。我錯過了什么?
uj5u.com熱心網友回復:
我認為目標是將 2.0.1 拼接到 master 的第一父母的直接鏈中。后
git clone <repo url>
git checkout tags/2.0.0
git checkout -b feature/fix
(now i modify the code)
git add .
git commit -m "Changed code"
您可以將此提交標記為2.0.1.
git tag -a 2.0.1
然后在標記后你會說
git rebase --onto 2.0.1 2.0.0 master
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/531152.html
標籤:混帐github
