Bug after removing a local branch and restore the remote branch during a rebase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It might be an unusual workflow, however it leads to a bug:

git checkout feature_branch
git rebase master

# a couple of conflicts occur, which I don’t want to fix. there is an updated version on origin
# so I’d like to go with that one

git add .
git stash
git checkout master
git branch -D feature_branch
git pull
git checkout feature_branch
git status

# On branch feature_branch
# You are currently rebasing branch ‘feature_branch' on '195269d'.
#  (all conflicts fixed: run "git rebase --continue")

# nothing to commit, working directory clean

# It still thinks that I’m rebasing the branch, so let’s try:

git rebase —abort

# On branch feature_branch
# Your branch and ‘origin/feature_branch' have diverged,
# and have 104 and 77 different commits each, respectively.
#  (use "git pull" to merge the remote branch into yours)
# nothing to commit, working directory clean

I’m aware that I should have aborted the rebase and then fetch the remote branch.
However, I still think that when I delete a local branch, it should also abort the rebase that is attached to it.

I hope you find that useful. If it makes sense, I would be happy writing a patch for it :)

Cheers,
Robert--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]