![]() ![]() To get the original state of the commit that you want to 'revert', you have to pass -hard. So, all changes made, since that commit you reset to, will still be there. Have in mind that, by default, the option -mixed is passed to git reset. Or to a specific commit by git reset f7823ab Or some more commits (for example 3) by git reset HEAD^3 You will go back to the previous commit with git reset HEAD^ Most clients provide this in their UI using the same vocabulary (usually, you are able to select a commit and reset to it via context menu). To mention a few (that support git reset): GitHub Desktop is more of a tool to synchronize your repositories and not a full featured GUI client.īut that doesn't mean you have to use the command line, since there are alternatives. This is not possible with GitHub Desktop. In general, you can go back to a commit in your history with git reset. Go to conversation section, there you will see revert option in front of all commits included in that PR ( screenshot) Share. This allows you to debug a container by running an. Jump to the PR which is included in the commit which is to be reverted. Is this possible or is it a limitation of github desktop and I need to use the cmd line for that? Answers docker commit: It can be useful to commit a containers file changes or settings into a new image. Viewed 1k times 2 I am currently learning Git commands but for the moment I using the desktop version of GitHub. If some of the commits between SHA and the tip of your branch are merge commits, it is possible that git rebase -p will be unable to properly recreate them. I would just simply like to go back with the option of going forward again, in the same way that I can just hop to a different branch. Github desktop 'Cannot revert a merge commit' Ask Question Asked 6 years, 9 months ago. Obviously replace 'SHA' with the reference you want to get rid of. I can see that it's possible to revert a commit, but this is not really what I want as it creates a new commit. Something that I would have thought is a core feature, since it's the primary reason for using source control in the first place. the GUI application - NOT command line) to go back to a previous commit (on the same branch). Yes, it undoes the data, but no, it doesn't undo history.I am trying to use GitHub Desktop (i.e. So if you think of "revert" as "undo", then you're going to always "undo" in the sense that it doesn't undo the effects of a commit on ![]() So a "revert" undoes the data changes, but it's very much not an The last shared state - and the revert that reverted the merge brought The two branches together, and future merges will see that merge as So the merge will still exist, and it will still be seen as joining Nothing to the effects on history that the merge had. Undoes the data that the commit changed, but it does absolutely Reverting a regular commit just effectively undoes what that commitĭid, and is fairly straightforward. Here is an excerpt from the docs in git/git Since this is a merge commit we're dealing with, Git doesn't know which parent was the main branch, so reverting it will not work as expected. To redo the merge, I have to make a change in Branch B, revert the revert, or some similar workaround. I see "nothing to merge" and can't merge. > If you select Branch B, it says "nothing to merge."Īt the last step, I should not see "nothing to merge" because I reverted the previous merge, so there are, in fact, those changes still left to merge. there was a major problem with the merge that needs to be resolved) History -> Revert the commit of the merge (e.g. Product GitHub Desktop 2.9 includes squashing, reordering, amending, and more The latest version of GitHub Desktop allows you to squash commits, squash and merge, reorder, amend your last commit, check out a branch from a previous commit, and more. ![]() Have branches A and B, each with separate changes.If I merge from branch to branch, then revert the commit of the merge, I can't repeat the merge a second time without forcing a change to the branch. I mean to set my state to a state back in time, essentially erasing all commits. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |