git 部分文件提交

1.git add:將要提交的部分代碼提交到暫存區。git

2.git stash -u -k:保存未提交的修改。it

3.git status:此時查看git狀態,則只剩下第1步提交到暫存區的文件。推送

4.git commit -m 'some messages': //提交暫存區的文件。文件

5.git pull:拉取代碼進行合併。co

6.git push:推送到遠端倉庫。push

7.git stash pop:恢復第2步保存的未提交的修改。message

git回退commit未push文件:git reset HEAD~1 --hardcommit

相關文章
相關標籤/搜索