git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 22, 2007, 11:32 UTC
Message-ID
<Pine.LNX.4.64.0710221230130.25221@racer.site>
In-Reply-To
<200710221044.24191.wielemak@science.uva.nl>
Hi,
On Mon, 22 Oct 2007, Jan Wielemaker wrote:
Show 8 quoted lines
> 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)
You probably meant "git fetch jan@work:repo home:home".
Show 29 quoted lines
> 	$ 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
Happily, that is already possible:  However, instead of
	git stash fetch jan@work{0}
you should say
	git fetch jan@work stash:stash

This will only fetch the last stash, but that is what you wanted anyway, right?

Ciao, Dscho

P.S.: Since you top-posted, I just ignored the mail you quoted, assuming that it was not relevant to your mail.

Previous: Jan WielemakerNext: Jing Xue
Message 6 of 11 in “Howto request: going home in the middle of something?”
  1. Jan WielemakerOct 18, 2007
  2. Johannes SixtOct 18, 2007
  3. Karl HasselströmOct 18, 2007
  4. Petr BaudisOct 18, 2007
  5. Jan WielemakerOct 22, 2007
  6. Johannes SchindelinOct 22, 2007
  7. Jing XueOct 23, 2007
  8. Jan WielemakerOct 23, 2007
  9. Matthias KestenholzOct 23, 2007
  10. Jing XueOct 24, 2007
  11. Andy ParkinsOct 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.