本地修改

2018-02-24 16:16 更新

显示工作路径下已修改的文件:

$ git status

显示与上次提交版本文件的不同:

$ git diff

把当前所有修改添加到下次提交中:

$ git add 

把对某个文件的修改添加到下次提交中:

$ git add -p <file>

提交本地的所有修改:

$ git commit -a

提交之前已标记的变化:

$ git commit

附加消息提交:

$ git commit -m 'message here'

提交,并将提交时间设置为之前的某个日期:

git commit --date="`date --date='n day ago'`" -am "Commit Message"

修改上次提交
请勿修改已发布的提交记录!

$ git commit --amend

把当前分支中未提交的修改移动到其他分支

git stash
git checkout branch2
git stash pop
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号