I often have this issue (this workflow makes sense doing python):
- work locally in a change (usually just a couple of lines)
- rsync to the staging server
- test it there
- if it doesn't work, go to step 1
- if it works, commit, push and go to sleep
Note: I really do not want to commit my work: it is a couple of lines, and I haven't the slightest idea if it makes any sense at all before testing it on the staging server
I do step 2, which I hate (rsync
is not that easy to use - timestamps, delete files, permissions and what-not) because git
does not allow me to move around non-committed work.
I know I can prepare patches, or bundles, but those are not the right solution, because that's even more complicated than doing rsync
. I will stick to rsync if there is no other option than patch
or bundle
.
Is there a way of moving around non-committed work with git, easily, like this?
devel $ git upload # uploads non-committed work to the remote
staging $ git download # downloads non-committed work from the remote
I guess not, but I had to ask ...
Note
git stash
comes close to what I want, but AFAIK it's not possible to push stashes. Otherwise I would to:
devel $ git stash
devel $ git push # push the stash stack (not really possible with git)
staging $ git pull # get the stash stack (not really possible with git)
staging $ git stash pop