適用于我在dev分支修改了一些文件,但是不想提交的時(shí)候,還需要切換到別的分支處理一些代碼,vscode會(huì)提示改信息,此時(shí)需要我們 git stash 將本地分支修改的內(nèi)容隱藏起來(lái),同時(shí)會(huì)看到我們隱藏的信息
git stash
git stash list
恢復(fù)的話(huà)只需要我們git stash apply恢復(fù),但是恢復(fù)后,stash 內(nèi)容并不刪除
git stash apply
如果需要?jiǎng)h除stash內(nèi)容需要指令git stash drop來(lái)刪除文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-741858.html
git stash drop
同時(shí)用 git stash pop,恢復(fù)的同時(shí)把stash內(nèi)容也刪了,這時(shí)候用 git stash list就看不到任何 stash 內(nèi)容了文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-741858.html
git stash pop
到了這里,關(guān)于git分支切換提示簽出會(huì)覆蓋本地更改該怎么辦的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!