How do I remove all my mysterious “index on” and “WIP on” commits?

拟墨画扇 提交于 2019-12-12 11:55:01

问题


I was just called upon to fix a bug in my application. I stashed up my current work and checked out my newest version tag. I promptly noticed that was a mistake, as the Git message told me that my commits wouldn't be saved, so I checked out master instead. But before I did that, I had already popped my stash, the re-stashed:

$ git checkout v1.6.0
$ git stash pop
$ # Oops, I'm not supposed to be here
$ git stash
$ git checkout master
$ git stash pop

Then I fixed the bug, committed and created a new tag for it (v1.6.0-hotfix-1). Now my repository looks like it has been bombed. It used to be so clean, with two branches side by side with a merge and a tag now and then. Now it looks like this:

Suddenly all my tags on the master branch is squished together instead of far apart, and there are "index on" and "WIP on" commits spread around, probably due to the stashing. I'm going with the assumption that those "commits" are the reason for the mess, so I'd like to remove them.

But how do I do that? Could anybody explain what is going on?


Edit: Screenshot after restarting gitk:

All the "index on" and "WIP on" points are gone, but my repo still looks bombed. How can that be?


回答1:


You use the 'Reload' gesture, that in some mileages is mapped by default to Ctrl-F5 and in some others to Shift-F5. Often found in the GUI menus under the File menu.



来源:https://stackoverflow.com/questions/19950877/how-do-i-remove-all-my-mysterious-index-on-and-wip-on-commits

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