Jeff Storey Jeff Storey - 4 months ago 15
Git Question

git rebase after pull

I typically use

git pull --rebase
if I'm working directly on master (which I try not to do anyway). In the event that I forgot to do a rebase and just did
git pull
, is there a way to undo that and make it linear, rather than having a merge? Would doing a rebase at this point be a bad idea (if that would even accomplish anything)?

I know I can put enable rebasing on pulls by default so I don't forget, but this is more of an issue of understanding what to do in this case.

Answer

i guess git reset --hard back to before the pull and redo the pull is the way