{"thread":{"id":"22735","subject":"git fast-import / working tree status question","startedAt":"2010-02-19T23:20:24Z","lastAt":"2010-02-19T23:40:47Z","messageCount":2,"participants":["Mike Fleetwood","Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"135129","messageId":"fc5ef2e01002191520u7b50c98fo3a3defe70e31292a@mail.gmail.com","threadId":"22735","inReplyTo":null,"subject":"git fast-import / working tree status question","fromName":"Mike Fleetwood","fromEmail":"mike.fleetwood@googlemail.com","sentAt":"2010-02-19T23:20:24Z","receivedAt":"2010-02-19T23:20:24Z","isPatch":false,"sender":{"key":"mike.fleetwood@googlemail.com","avatar":null},"body":"Hi,\n\nI am a newbie using git and I am testing conversion of a personal\nproject into git using fast-import.  When fast-import completes\nall the files are in the repository but the working tree is empty\nand status reports all files are delete but uncommitted.  I have\nto use reset --hard HEAD to unwind the pending removal of all of\nthe files.  Example below.\n\n\nIs this normal or have I missed something?\n\nThanks in advance,\nMike\n\n\n[mike@rockover tmp]$ mkdir test.git\n[mike@rockover tmp]$ cd test.git\n[mike@rockover test.git]$ git init\nInitialized empty Git repository in /tmp/test.git/.git/\n[mike@rockover test.git]$ git fast-import << EOF\n> # Test git fast-import file\n> progress Commit 1/1\n> commit refs/heads/master\n> mark :1\n> committer Fred Bloggs <fred.bloggs@example.com> 1266610576 +0000\n> data 16\n> Initial checkin\n>\n> M 644 inline test\n> data 10\n> Test file\n> EOF\nprogress Commit 1/1\n...\n[mike@rockover test.git]$ git status\n# On branch master\n# Changes to be committed:\n#   (use \"git reset HEAD <file>...\" to unstage)\n#\n#\tdeleted:    test\n#\n[mike@rockover test.git]$ ls\n[mike@rockover test.git]$ git log | cat\ncommit 769c8359d963fd13324d522e5e10a0269dd97395\nAuthor: Fred Bloggs <fred.bloggs@example.com>\nDate:   Fri Feb 19 20:16:16 2010 +0000\n\n    Initial checkin\n[mike@rockover test.git]$ git reset --hard HEAD\nHEAD is now at 769c835 Initial checkin\n[mike@rockover test.git]$ git status\n# On branch master\nnothing to commit (working directory clean)\n[mike@rockover test.git]$ ls\ntest\n[mike@rockover test.git]$ cat test\nTest file\n"},{"id":"135131","messageId":"ec874dac1002191540p343889d7v5f14876cf0df14c8@mail.gmail.com","threadId":"22735","inReplyTo":"fc5ef2e01002191520u7b50c98fo3a3defe70e31292a@mail.gmail.com","subject":"Re: git fast-import / working tree status question","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-02-19T23:40:47Z","receivedAt":"2010-02-19T23:40:47Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Fri, Feb 19, 2010 at 3:20 PM, Mike Fleetwood\n<mike.fleetwood@googlemail.com> wrote:\n> I am a newbie using git and I am testing conversion of a personal\n> project into git using fast-import.  When fast-import completes\n> all the files are in the repository but the working tree is empty\n> and status reports all files are delete but uncommitted.  I have\n> to use reset --hard HEAD to unwind the pending removal of all of\n> the files.  Example below.\n>\n> Is this normal or have I missed something?\n\nCompletely normal.  fast-import is a lower level command which only\nworks on the object directory.  Frontend tools which automate the\nconversion are supposed to checkout the working tree files after the\nimport is complete.  Or, run like you did, `git reset --hard HEAD`.\n"}]}