Cercai seguenti comandi sul gusciocassa git unisce automaticamente modifiche locali
git init
echo "test1" > test1.txt
git add test1.txt
git commit -a -m "test1"
echo "test2" >> test1.txt
git branch test
git checkout test
text.txt
ora contiene:
test1
test2
Dopo cassa diramare test
tutte le modifiche locali da master
ottenere fuse.
Perché?
Mi aspettavo che git
rifiuti il checkout a test
a causa delle modifiche locali. Mi aspettavo che git chiedesse un commit o stash
le modifiche locali.
Modifica: Ho usato uno script di bash per eseguire questi comandi. Ottengo l'output seguente:
[email protected]:/tmp/test$ ./createrepo
Initialized empty Git repository in /tmp/test/.git/
[master (root-commit) 0407f5b] test1
1 file changed, 1 insertion(+)
create mode 100644 test1.txt
M test1.txt
Switched to branch 'test'
Ho lo stesso problema, la cosa strana è che, per alcuni repository, non posso effettuare il checkout senza commetterlo, altri si fondono. Ho guardato nella configurazione e non vedo alcuna differenza. – jdborg