Git: Cannot rebase because of uncommitted changes

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 04:26:40
jamesthollowell

git stash stores the different files away from everything else, returning your working directory to the last commit. Once you have done your rebase, run git stash pop. This will return those files to the working directory and allow you to work as before.

EDIT: A good link for learning all about the git stash command: Git Tools - Stashing

Probably not yet for a golden shovel, nevertheless I always use --autostash option when rebasing with uncommitted changes, thus:

git rebase --interactive SHA_WHERE_REBASE_ONTO^ --autostash

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!