Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - Save unfinished merge changes and checkout another branch

Tags:

git

I'm working on a git branch that has a lot of merge conflicts with another branch that I've merged into it. I started fixing the conflicts but want to save my work and switch to another branch before I finish the merge process.

Is it possible to stash the changes in the unfinished merge process to switch to another branch and then switch back and finish the merge?

I've spent a lot of time working on fixing the conflicts and I don't want to do this work again. What's the best way to proceed?

I'm using git version 1.7.10

like image 330
marcosdsanchez Avatar asked May 09 '12 20:05

marcosdsanchez


1 Answers

Since a merge is a process, you can't stash "changes" in the middle of the process.

Your best bet is to clone the repo into another directory.

PS. Ben is always right.

like image 125
Jon K. Avatar answered Sep 19 '22 18:09

Jon K.