How to keep uncommitted work in a git clone

Sterling Smith smithsp at fusion.gat.com
Thu Nov 3 21:18:18 PDT 2016


On Nov 3, 2016, at 7:54PM, Arno Hautala <arno at alum.wpi.edu> wrote:

> 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.
> 
> 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.
This is my preference.  I tried stash as well once, and had trouble with it.

-Sterling


More information about the macports-dev mailing list