I had some changes in a branch, we'll call it branch2. I switched to the master branch without committing the changes. I'm guessing this is a no-no because when I switched back to branch2 all of my change were gone! It sure would have been nice if the GitHub client for mac would have warned me. Is there anyway I can undo this action and get my changes back?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
If it wasn't committed, then there's nothing to do. Although, this is weird because normally git won't allow you to switch branch if you have uncommitted data in your working directory (I don't know for github for mac exactly).
You can always check git reflog
to see if you have committed your data.