git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How can I do an automatic stash when doing a checkout?
@ 2011-12-18 11:19 DeMarcus
  2011-12-18 11:45 ` Bruce Stephens brs
  0 siblings, 1 reply; 9+ messages in thread
From: DeMarcus @ 2011-12-18 11:19 UTC (permalink / raw)
  To: git

Hi,

I'm new to git and currently I'm working with SVN and there it's a bit 
messier doing branching but once I've branched then all my development 
there is completely separated from any other branch. When I want to work 
on another branch I just change directory.

This is not how it works with git, where when I want to change branch I 
have to do a git checkout. However, that leaves all the modified and 
untracked files in the directory of the branch I switched to. This is 
seldom the behavior I want.

With the git stash command I can clean the directory the way I want but 
the stash command is not connected to a particular branch.

Is there a way to have git checkout do an automatic stash when doing a 
checkout to another branch, and then do an automatic git stash apply 
with the correct stash when changing back to the previous branch again?


Thanks,
Daniel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-12-19 22:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-18 11:19 How can I do an automatic stash when doing a checkout? DeMarcus
2011-12-18 11:45 ` Bruce Stephens brs
2011-12-18 15:10   ` DeMarcus
2011-12-18 15:37     ` Bruce Stephens brs
2011-12-19 16:18     ` Dirk Süsserott
2011-12-19 21:43       ` DeMarcus
2011-12-19 17:24     ` Holger Hellmuth
2011-12-19 21:46       ` DeMarcus
2011-12-19 22:24         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).