
In general, it is a bad practice to try to modify a commit (which is what git rebase does) after you have published it to a remote. In fact, if your remote is set to deny non-fast-forward commits (which seems to be a generally recommended best practice), you'll not even be able to push the rebase'd changes to your remote. Since you say that you have already published your branch to the remote repository, you should not try to rebase master onto it. Simply rm -fr /my_project_directory/.git/rebase-apply as the help suggests and you should be able to do the rebase now.īut wait. you did not run one of git rebase -abort, git rebase -skip or git rebase -continue (the last one after resolving the conflict).Īnyway, it does not matter how you ended up in this state if you don't think you ran git rebase at all. This would have happened if there was a conflict during a previous rebase and the rebase was not finished i.e. git/rebase-apply directory and so presumes that you might be in the middle of a rebase. I'm including just in case.įYI.The master tree for 'local' and for 'remote' looks like the diagram that I drew, except it doesn't have the sandbox_branch. I didn't include it in the original question b/c I didn't think that it would matter. I've also updated the diagram to be more accurate.
#Git rebase abort Patch#
Could that have done anything to make GitX think that I'm in the middle of an application patch or another rebase? What am I doing wrong? How should I handle this? If I were to do this on the command line what is the command to get me to the state in the diagram above?īTW, I'm not in the middle of an application patch or another rebase.at least not intentional.Īfter I found out that remote was updated AFTER I pushed, I did a fetch.

I am stopping in case you still have something Rm -fr /my_project_directory/.git/rebase-applyĪnd run me again. I wonder if you are in the middle of patch application or another It seems that I cannot create a rebase-apply directory, and There was an error rebasing HEAD with branch 'master'. I tried to rebase my_branch ONTO local master but I got this error message (I'm using a visual tool for git called GitX): Rebase Failed! I want it to look like: -C0-C7- (local master) So.long story short, my local repo looks like this (I'm trying to use the diagraming convention here). In this tutorial, we'll explore a few techniques to undo a git rebase operation. After doing this operation manually, we might later realize that we want to return to the original state.
#Git rebase abort code#
However I didn't know that someone else added a version to the remote master. Overview git rebase is a recommended best practice to write a clean code-commit history, especially for a multi-developer code repository. I created a branch on my local copy, let's call it 'my_branch'.


I've been working on a local copy of a remote git repo.
