1. 程式人生 > >git 提交程式碼 如果有衝突 如何解決

git 提交程式碼 如果有衝突 如何解決

 

  1. git add .
  2. git commit -m '.........'
  3. git pull --rebase #獲取最新程式碼 (如果有衝突,繼續一下步驟,如果無 直接git push)
  4. git status (檢視衝突的檔案)
  5. git add (修改衝突檔案後,新增檔案到快取區)
  6. git rebase --continue 
  7. git commit --amend 
  8. git push