git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Prevent switching branches when local modifications exist
@ 2012-06-13 22:52 Christoph Bartoschek
  2012-06-13 23:35 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Bartoschek @ 2012-06-13 22:52 UTC (permalink / raw)
  To: git

Hi,

how can I prevent that git allows me to switch branches when there are 
uncommited local modifications?

[14.1 (steiner_topo)]$ git checkout -b ergo
Switched to a new branch 'ergo'
[14.1 (ergo)]$ echo blub >> src/invtree.C
[14.1 (ergo)]$ git checkout steiner_topo
M       src/invtree.C
Switched to branch 'steiner_topo'
[14.1 (steiner_topo)]$ 

How can the last checkout be prevented?

-- 
Christoph Bartoschek

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

end of thread, other threads:[~2012-06-14  7:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-13 22:52 Prevent switching branches when local modifications exist Christoph Bartoschek
2012-06-13 23:35 ` Junio C Hamano
2012-06-14  7:17   ` Christoph Bartoschek

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).