Git-stash-rm---cache-暂存-删除

git stash

  • 当开发到一半时,需要pull远端的代码,但这会覆盖本地的代码

  • 因此,需要暂存本地的代码

  • git stash

  • git pull

  • git stach pop (处理完pull代码之后,把暂存的代码pop出来)

  • 查看 git stash list

git rm

  • 删除远端的文件

  • git rm file (会同时删除本地的原始文件)

  • git rm --cache file (仅删除暂存区的文件,本地文件不会删除)

posted @ 2023-06-26 20:05  starc的miao  阅读(143)  评论(0)    收藏  举报