Git reset current rebase

I’ve been doing a rebase. I’ve worked on fixing some conflicts but I’ve ended up going in the wrong direction and now I just want to start again fixing these conflicts.

I’d like to reset the rebase, so that I’m still rebasing the current commit but the working copy has been reset to when the commit was flagged up with conflicts in the first place.

  • How to export version history from Serena Dimensions to Git?
  • Difference between git reset and git cherry-pick
  • GIT pull/fetch from specific tag
  • Git - remove remote branch with a space in the branch name
  • gitignore config file for Github but not Heroku
  • Why is the branch tip behind its remote?
  • How can I reset a rebase on the current commit?

  • When a git commit has multiple parents, what are the stats calculated against?
  • Git remove files on server not present on local
  • Howto add 2 signed-off to my git patches?
  • Inconsistent information in Git (log vs. diff) about single file
  • git prompting me before commit
  • Mercurial (and, I guess Git) with Dropbox: any drawbacks?
  • 3 Solutions collect form web for “Git reset current rebase”

    If you just want to redo a merge for a specific file, all you need to do is:

    git checkout -m <file>

    If you want to redo the whole commit, here’s how I do it (there’s probably a better way of doing this):

    1. There’s a conflict during the rebase
    2. I mess up the conflict resolution
    3. I run a git status which, as of Git 2.0.0, gives me something like this (only if you are doing an interactive rebase):

      interactive rebase in progress; onto 14ed389
      Last command done (1 command done):
         pick db2511c Modify file
      Next command to do (1 remaining command):
         pick d1c2037 Modify file one more time
        (use "git rebase --edit-todo" to view and edit)
      You are currently rebasing branch 'other' on '14ed389'.
        (fix conflicts and then run "git rebase --continue")
        (use "git rebase --skip" to skip this patch)
        (use "git rebase --abort" to check out the original branch)
      Unmerged paths:
        (use "git reset HEAD <file>..." to unstage)
        (use "git add <file>..." to mark resolution)
              both modified:   file.txt
    4. I copy the line for the command the rebase is currently executing: pick db2511c Modify file
    5. I run git rebase --edit-todo and paste the line onto the top of the file
    6. I run git rebase --skip

    If you are in between your rebase, you can do

    git rebase --abort

    If You have had multiple commits editing same files on both branches and, during rebasing decided that want to preserve some work, not drop all changes already made (git rebase --abort) then I guess You’ll need to look into directory .git/rebase-apply and check patch file. It contains all changes made during rebasing. You’d manually apply this patch after doing git rebase --abort.

    Git Baby is a git and github fan, let's start git clone.