git基本命令--jerry出品

工作區(working diretory) 用於修改文件
緩存區(stage) 是用來暫時存放工作區中修改的內容
提交歷史(commit history) 提交代碼的歷史記錄

主要的幾個命令

git add # 將工作區的修改提交到暫存區
git commit # 將暫存區的修改提交到當前分支
git reset # 回退到某一個版本
git stash # 保存某次修改
git pull # 從遠程更新代碼
git push # 將本地代碼更新到遠程分支上
git reflog # 查看歷史命令
git status # 查看當前倉庫的狀態
git diff # 查看修改
git log # 查看提交歷史
git revert # 回退某個修改

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章