git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why git silently replaces untracked files?
@ 2011-03-25 14:52 igor.mikushkin
  2011-03-25 16:58 ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: igor.mikushkin @ 2011-03-25 14:52 UTC (permalink / raw)
  To: git

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.

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

end of thread, other threads:[~2011-03-25 18:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 14:52 Why git silently replaces untracked files? igor.mikushkin
2011-03-25 16:58 ` Jeff King
2011-03-25 17:53   ` igor.mikushkin
2011-03-25 18:06     ` Jeff King
2011-03-25 18:08       ` [PATCH 1/4] t7607: mark known breakage in test 11 as fixed Jeff King
2011-03-25 18:09       ` [PATCH 2/4] t7607: clean up stray untracked file Jeff King
2011-03-25 18:10       ` [PATCH 3/4] merge: merge unborn index before setting ref Jeff King
2011-03-25 18:13       ` [PATCH 4/4] pull: do not clobber untracked files on initial pull Jeff King

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