Search code examples
gitgit-pushgit-pullgit-remotegit-stash

git: best way to "stash" changes to continue work from a remote repo


As far as I understand stashes are local, and are not meant to be pushed to remote repos.

Sometimes I have ongoing work that is not ready to be committed, but that I have to somehow share with other workers or with myself accessing from a different workstation.

What would be the best way to emulate some kind of "remote stash" with git or to use git for a workflow like I've just described?


Solution

  • I'd just use a remote branch. Just make sure that everyone on the team agrees on some naming convention for these "work in progress" branches, and you should be fine. Usually, prefixing a branch with "wip" should convey this message.:

    $ git push origin wip_new_feature