0

About a week ago, for the sake of convenience, I put git rebase into my post-checkout hook. It was working fine until today when whenever I checkout any branch (regardless of whether it is behind or ahead any number of commits from the branch it's tracking), I end up on a detached state. When I remove the git rebase from the hook and manually do rebase after the checkout, the rebase succeeds without any issues. What could possibly be causing this weird behavior? How is what the hook is doing different than what I do manually?

Emil
  • 2,098
  • 11
  • 25
  • @ElpieKay No, it's a branch for sure. – Emil Oct 21 '17 at 18:17
  • I'm not sure how this part of my question would make sense with a commit or a tag: "(regardless of whether it is behind or ahead any number of commits from the branch it's tracking)" – Emil Oct 21 '17 at 18:18
  • It's just `git rebase`, which I assume is shorthand for `git rebase FETCH_HEAD` – Emil Oct 21 '17 at 18:57
  • @ElpieKay I know it shouldn't have ended up in a detached HEAD. I'm telling you that it does, which is why I'm asking the question. – Emil Oct 24 '17 at 18:25

0 Answers0