Why git silently replaces untracked files?

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

 



Why git silently replaces untracked files?

# mkdir test.git
# mkdir 1
# mkdir 2
# echo 1 > 1/test
# echo 2 > 2/test
# cd test.git
# git init --bare
# cd ..
# git clone test.git
# cp -r test/.git 1
# cp -r test/.git 2
# cd 1
# git add test
# git commit -am 1
# git push origin master
# cd ../2
# git pull
# cat test
1

In my opinion it is wrong behavior.
I've just lost important file due to it.

Should not "git pull" fail here?
Anyhow it looks more correct then silent replacing.

Thanks,
Igor





--
View this message in context: http://git.661346.n2.nabble.com/Why-git-silently-replaces-untracked-files-tp6207950p6207950.html
Sent from the git mailing list archive at Nabble.com.
--
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]