一個簡單/新手問題。 我從主分支創建一個分支(比如說「測試」),嘗試了一些東西,然後合併回來。現在,當我修改「測試」分支時,本地更改也在主分支上進行。合併分支,但修改它時,主要被修改
我應該刪除一個分支,一旦合併,而不是重用它?我認爲分支只會偏離...
使其更清晰,我做的是:
git checkout master
git branch testing
git checkout testing
// Modify files...
git add <modified-files>
git commit -m 'It worked!'
git checkout master
git merge testing
// Now I go back and edit the testing brach
git checkout testing
// Edit files...
git checkout master
// I can see the local changes I made to the testing branch!! (?)
感謝您的幫助。
感謝您的參考。我沒有選擇這一個作爲答案,但我建議查看參考。 – rocarvaj