How to keep uncommitted work in a git clone

Arno Hautala arno at alum.wpi.edu
Thu Nov 3 19:54:20 PDT 2016


On Thu, Nov 3, 2016 at 9:56 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> Well, I tried that. I git stashed, then made changes to curl and committed them, and later when I tried to git stash pop, my other changes that I had in my git clone were not restored. I have no idea where they are now.

Can you try `git stash list`? That should list everything that you've
stashed. If that doesn't list anything, what commands did you run
exactly?

There's also another paradigm to adopt which avoids stashing entirely.
Just always work in a branch and feel free to commit even if you're in
the middle of something. In your case, you're working on something
(let's say it's wget), but curl needs to be fixed too. Commit your
incomplete changes on the "wget-update" branch, `git checkout -b
curl-update master` to create and checkout a curl branch, complete
your work there, and then switch back to the "wget-update" branch.
Alternatively, stash your wget work and pop it after finishing with
curl rather than committing incomplete work.

-- 
arno  s  hautala    /-|   arno at alum.wpi.edu

pgp b2c9d448


More information about the macports-dev mailing list