git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can anybody explain the following to a git noob?
@ 2009-05-22  3:46 Tim Uckun
  2009-05-22  5:02 ` Avery Pennarun
  2009-05-22 13:36 ` Dan Loewenherz
  0 siblings, 2 replies; 16+ messages in thread
From: Tim Uckun @ 2009-05-22  3:46 UTC (permalink / raw)
  To: git

A transcript...

git init
git add . > /dev/nul
git commit -m 'initial import'

git status
# On branch master
nothing to commit (working directory clean)

***** Create new branch  ********
git checkout -b my_branch
Switched to a new branch "my_branch"

*********Try to rename a directory  WTF?: Git thinks any directory with a
.git folder is empty and refuses to rename the directory.
git mv vendor vendor_new
fatal: source directory is empty, source=vendor/plugins/acts_as_audited,
destination=vendor_new/plugins/acts_as_audited

ls vendor/plugins/acts_as_audited/
CHANGELOG  generators  init.rb  lib  LICENSE  Rakefile  README  spec  tasks
test.txt

******** Initial state of the test directory
ls test
fixtures  functional  integration  mocks  test_helper.rb  unit  watir

****** Rename and commit changes
git mv test test_new
git commit -m 'renamed the test directory'

********Current state of the directory
 ls
app  Capfile  config  db  doc  lib  MyProject.kpf  public  Rakefile  README
script  test_new  tmp  vendor


********Checkout master. WTF?: Both the test and the test_new directories
exist. Why does the test_new exist in this branch?
git checkout master
ls
app  Capfile  config  db  doc  lib  MyProject.kpf  public  Rakefile  README
script  test  test_new  tmp  vendor

******** list  the test directory.  WTF?: Where did the mocks subdir go??
(see above for the initial directory listing)
 ls test
fixtures  functional  integration  test_helper.rb  unit  watir

**** Check the test_new directory:  WTF?: Where are all the other
subdirectories?
ls test_new
functional  mocks

******** Merge  Everything is merged properly.
git merge my_branch

ls
app  Capfile  config  db  doc  lib  MyProject.kpf  public  Rakefile  README
script  test_new  tmp  vendor
ls test_new
fixtures  functional  integration  mocks  test_helper.rb  unit  watir


obviously I am doing something profoundly wrong. Can somebody explain why
this is happening?

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

end of thread, other threads:[~2009-05-25 12:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-22  3:46 can anybody explain the following to a git noob? Tim Uckun
2009-05-22  5:02 ` Avery Pennarun
2009-05-22  5:44   ` Tim Uckun
2009-05-22  9:35     ` Andreas Ericsson
2009-05-22 10:35       ` Tim Uckun
2009-05-22 10:44         ` Johannes Sixt
2009-05-22 11:36           ` Tim Uckun
2009-05-22 12:04             ` Julian Phillips
2009-05-23  8:03               ` Tim Uckun
2009-05-22 12:22             ` Andreas Ericsson
2009-05-22 17:33             ` Daniel Barkalow
2009-05-23  8:21               ` Tim Uckun
2009-05-25 11:10                 ` Heiko Voigt
2009-05-25 12:52                   ` Tim Uckun
2009-05-22 11:03     ` Sitaram Chamarty
2009-05-22 13:36 ` Dan Loewenherz

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