Prevent switching branches when local modifications exist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]