第一步: 查看狀態 git status
第二步: 全部添加 git add --all 添加更新文件 git add -u
第三步: 再次查看狀態 git status
第四步: 提交 git commit -m '備注'
第五步: 拉去版本庫代碼 git pull 查看狀態 git status
第六步: 推送 git push (git push origin 本地分支:遠程分支)
分支
查看分支:git branch
創建分支:git branch <name>
切換分支:git checkout <name>
創建+切換分支:git checkout -b <name>
合並某分支到當前分支:git merge <name>
刪除分支:git branch -d <name>
解決沖突
第一種:找到源文件,帶符號的代碼二者選其一,然后刪掉,然后按上邊的步驟走。
debug文件沖突
git checkout --theirs 文件絕對路徑 ,然后按步驟走。
