Re: Howto request: going home in the middle of something?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jan Wielemaker
Date: Monday, October 22, 2007 - 1:44 am

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:

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Howto request: going home in the middle of something?, Jan Wielemaker, (Thu Oct 18, 2:44 am)
Re: Howto request: going home in the middle of something?, Johannes Sixt, (Thu Oct 18, 3:37 am)
Re: Howto request: going home in the middle of something?, Jan Wielemaker, (Mon Oct 22, 1:44 am)
Re: Howto request: going home in the middle of something?, Johannes Schindelin, (Mon Oct 22, 4:32 am)
Re: Howto request: going home in the middle of something?, Jan Wielemaker, (Tue Oct 23, 11:38 am)
Re: Howto request: going home in the middle of something?, Matthias Kestenholz, (Tue Oct 23, 1:28 pm)