Thanks for the replies. I think I can live with something like this
<work, in the middle of something>
$ git checkout -b home
$ git commit
$ git checkout master
<arriving at home>
$ git jan@work:repo fetch home:home (using ssh)
$ git checkout home
<continue editing>
$ git commit --amend
$ git checkout master
$ git merge home
$ git -d home
$ git commit
$ git push
<arriving at work>
$ git -d home
$ git pull
Its still a bit many commands and you have to be aware what you are
doing for quite a while, but it does provide one single clean commit
message, doesn't change the shared repo until all is finished and allows
to abandon all work without leaving traces.
Personally I'd be more happy with
<work, in the middle of something>
$ git stash
<arriving at home>
$ git stash fetch jan@work{0} (well, some sensible syntax)
$ git stash apply
<continue editing>
$ git commit
$ git push
<arriving at work>
$ git pull
Its not only shorter, but reduces the risc to make mistakes. I think the
missing fetch to copy the stashed data from work to home is actually
there if you know a bit more about git internals. Right? Ideally, this
could be combined in a little command that will simply move the
uncommitted work from one clone to another, provided you have ssh access
to the machine from which you want to fetch the work.
--- Jan
On Thursday 18 October 2007 13:27, Petr Baudis wrote: