🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
显示工作路径下已修改的文件: ~~~ $ 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 ~~~