Jimbo Jimbo - 5 months ago 44
Git Question

Backup a Git stash to GitHub

I want to stash work in progress, but I also want what I've stashed to be backed up on GitHub. Previously I've normally committed with a comment saying "WIP: blah blah blah", but I'd rather commit in completed stages rather than loads of "WIP:" commits which are really just a way to backup my work to the GitHub servers.

Is there a way to have stash to GitHub?


You can't put the stash on GitHub, but you can (and should) create a branch and commit to that:

git checkout -b temporary
git add -A
git commit -m "storing work in progress"
git push

Then just merge temporary into master (or whatever) when it's ready.

Edit: removed superfluous stash commands.