Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forgot git rebase --continue

Tags:

git

I was on my own local feature branch and wanted to merge it into master. I checked out master, did git pull --rebase, had one conflict, resolved it, but I forgot to do git rebase --continue after that. Then I did git merge my_other_branch and then wanted to push that to origin, but git told me im not on any branch, so I was like "oh no, i fogot rebase --continue" so I did it then and git says "no changes - did you forget to use git add?". So right now I'm not on any branch...in some detached head state.

What do I need to do to get back on track?

like image 345
LuxuryMode Avatar asked Apr 15 '26 14:04

LuxuryMode


2 Answers

git rebase --skip

Should continue the rebase.

like image 154
Klas Mellbourn Avatar answered Apr 17 '26 13:04

Klas Mellbourn


Klas's answer is probably more useful, but in general a "detached head" means that where you're looking isn't a branch.

Thus, you can solve this by checking out a branch (specifically, the branch you wish you were on).

If something like this happens again, I would suggest looking at your current status with gitk --all, to get an idea about the repository structure and where you are.

like image 27
zebediah49 Avatar answered Apr 17 '26 13:04

zebediah49