git提交的具体操作

git stash 备份当前工作区的内容,保存到git 栈中

git pull 拉取新的代码

git stash pop  从git栈中获取到最近一次stash进去的内容,恢复工作区的内容。。获取之后,会删除栈中对应的stash。 由于可能会stash多次,git使用栈管理,我们可以使用git stash list查看所有的stash

git stash list  可以显示git栈中的所有工作区内容的备份,比如使用git stash apply stash@{1},就可以把版本号为stash@{1}的备份取出,不会删除对应的stash。。0为最新版本

git add 

git commit -m "xxxxx"

git commit --amend

该命令可以用来撤销上一次提交到版本库的操作 并将暂存区重新提交到版本库中。简单的说就是可以帮我们 修改 最近一次提交到版本库的内容

Esc+w+q 保存退出

猜你喜欢

转载自www.cnblogs.com/sherrycat/p/11243356.html
今日推荐