Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

The stash cannot be saved into remote repository. But what you have to be doing is creating new branch for your work-in-progress work.

You should be able to push your stash directly:

git push origin stash

See also git log stash.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top