git merge 有遇到衝突時,即不同分支改到同一檔案的同一行時,又要做Merge的時候就會產生衝突。
善用GUI軟體,SourceTree..
記得操作是Clone/New按下去後,選擇Add Working Copy,再選工作目錄資料夾(Repository)。就可以出漂亮的樹狀圖了。
* git merge [other_branchname]
* git checkout -b [new_branchname]
* git reflog 找紀錄
* git branch -d [branchname] 刪掉已被合併過的分支
* git branch -D [branchname] 刪掉未合併的分支
* git branch feature <SHA1>
* git reset --hard ORIG_HEAD 回覆到最新Commit的上一個commit
* git status
* git ls-files -u 看哪個檔案衝突
* git diff [filepath] 比較衝突檔案
善用GUI軟體,SourceTree..
記得操作是Clone/New按下去後,選擇Add Working Copy,再選工作目錄資料夾(Repository)。就可以出漂亮的樹狀圖了。
* git merge [other_branchname]
* git checkout -b [new_branchname]
* git reflog 找紀錄
* git branch -d [branchname] 刪掉已被合併過的分支
* git branch -D [branchname] 刪掉未合併的分支
* git branch feature <SHA1>
* git reset --hard ORIG_HEAD 回覆到最新Commit的上一個commit
* git status
* git ls-files -u 看哪個檔案衝突
* git diff [filepath] 比較衝突檔案
沒有留言:
張貼留言