前些天發現了一個巨牛的人工智能學習網站,通俗易懂,風趣幽默,忍不住分享一下給大家。點擊跳轉到教程。
git stash 可用來暫存當前正在進行的工作, 比如想pull 最新代碼, 又不想加新commit, 或者另外一種情況,為了fix 一個緊急的bug,? 先stash, 使返回到自己上一個commit, 改完bug之后再stash pop, 繼續原來的工作。
基礎命令:
$git stash
$do some work
$git stash pop
?
進階:
git?stash?save?"work in progress for foo feature"
當你多次使用’git stash’命令后,你的棧里將充滿了未提交的代碼,這時候你會對將哪個版本應用回來有些困惑,
’git stash list’ 命令可以將當前的Git棧信息打印出來,你只需要將找到對應的版本號,例如使用’git stash apply stash@{1}’就可以將你指定版本號為stash@{1}的工作取出來,當你將所有的棧都應用回來的時候,可以使用’git stash clear’來將棧清空。
?
?
git stash # save uncommitted changes
# pull, edit, etc.
git stash list # list stashed changes in this git
git show stash@{0} # see the last stash
git stash pop # apply last stash and remove it from the listgit stash --help # for more info
?
?
?