git/list[1] front-page[2] threads[3] people[4] search[5] about
 

can anybody explain the following to a git noob?

From
Tim Uckun <timuckun@gmail.com>
Date
May 22, 2009, 03:46 UTC
Message-ID
<855e4dcf0905212046o3e1d6ec6l487829a0a411dcaf@mail.gmail.com>
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?

Next: Avery Pennarun
Message 1 of 16 in “can anybody explain the following to a git noob?”
  1. Tim UckunMay 22, 2009
  2. Avery PennarunMay 22, 2009
  3. Tim UckunMay 22, 2009
  4. Andreas EricssonMay 22, 2009
  5. Tim UckunMay 22, 2009
  6. Johannes SixtMay 22, 2009
  7. Tim UckunMay 22, 2009
  8. Julian PhillipsMay 22, 2009
  9. Tim UckunMay 23, 2009
  10. Andreas EricssonMay 22, 2009
  11. Daniel BarkalowMay 22, 2009
  12. Tim UckunMay 23, 2009
  13. Heiko VoigtMay 25, 2009
  14. Tim UckunMay 25, 2009
  15. Sitaram ChamartyMay 22, 2009
  16. Dan LoewenherzMay 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.