git 命令

69 阅读1分钟

①git stash:临时保存当前未 commit 的代码;
②git stash save "备注的内容":保存当前未 commit 的代码并添加备注;
③git stash list:列出 stash 的所有记录;
④git stash clear:删除 stash 的所有记录;
⑤git stash apply:应用最近一次的 stash;
⑥git stash pop:应用最近一次的 stash,随后删除该记录;
⑦git stash drop:删除最近的一次 stash;
⑧git reset --soft 指定的 commit 号:回溯节点,保留节点的修改内容;
⑨git revert commit 号:revert 掉自己提交的 commit;
⑩git reflog:记录了 commit 的历史操作;