)]}'
{
  "commit": "e4b0e4ab8ee68df0fa99100640ed5cb54b736141",
  "tree": "c37516dde135a1af911cc84ebe4770cb11b241bf",
  "parents": [
    "8c4e4ef0f575cd60fb4bb6a70305fcb0ed85da6a"
  ],
  "author": {
    "name": "Junio C Hamano",
    "email": "junkio@cox.net",
    "time": "Thu Feb 01 01:08:41 2007 -0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "junkio@cox.net",
    "time": "Thu Feb 01 01:10:15 2007 -0800"
  },
  "message": "detached HEAD -- finishing touches\n\nThis updates \"git-checkout\" to report which branch you are\nswitching to.  Especially for people who do not use __git_ps1\nfrom contrib/completion/git-completion.bash this would give a\nfriendlier feedback of what is going on, and should make the\nreminder message much less scary.\n\nHere is a sample session (the prompt tells which branch I am on).\n\n* I have some local modification and realize that the change deserves\n  to be on its own new topic branch.\n\n    [git.git (master)]$ git diff --stat\n     git-checkout.sh |   10 ++++++++--\n     1 files changed, 8 insertions(+), 2 deletions(-)\n\n* So I switch to a new branch.  I get a listing of local modifications\n  and assuring \"Switched to a new branch\" message.\n\n    [git.git (master)]$ git checkout -b jc/checkout\n    M       git-checkout.sh\n    Switched to a new branch \"jc/checkout\"\n\n* If I switch back to \"master\", I get essentially the same.\n\n    [git.git (jc/checkout)]$ git checkout master\n    M       git-checkout.sh\n    Switched to branch \"master\"\n\n* Detaching head would say which commit I am at and reminds me that\n  I am not on any branch (not that I would detach my HEAD while keeping\n  precious local changes around in any real-world workflow -- this is\n  just a sample session).\n\n    [git.git (master)]$ git checkout master^\n    M       git-checkout.sh\n    Note: you are not on any branch and are at commit \"master^\"\n    If you want to create a new branch from this checkout, you may do so\n    (now or later) by using -b with the checkout command again. Example:\n      git checkout -b \u003cnew_branch_name\u003e\n\n* Coming back to an attached state can lose the detached HEAD, so\n  I get warned and stopped.\n\n    [git.git]$ git checkout master\n    You are not on any branch and switching to branch \u0027master\u0027\n    may lose your changes.  At this point, you can do one of two things:\n     (1) Decide it is Ok and say \u0027git checkout -f master\u0027;\n     (2) Start a new branch from the current commit, by saying\n         \u0027git checkout -b \u003cbranch-name\u003e\u0027.\n    Leaving your HEAD detached; not switching to branch \u0027master\u0027.\n\n* Moving around while my HEAD is detached is Ok.  I still get the list\n  of local modifications.\n\n    [git.git]$ git checkout master^0\n    M       git-checkout.sh\n\n* The previous step that switched to the tip commit is an obscure but\n  useful trick.  My HEAD is still detached but now it is pointed at by\n  an existing ref, so I can come back safely.\n\n    [git.git]$ git checkout master\n    M       git-checkout.sh\n    Switched to branch \"master\"\n\n* And we are back on the \"master\" branch.\n\n    [git.git (master)]$ exit\n\nSigned-off-by: Junio C Hamano \u003cjunkio@cox.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0bae86e325eba0326e29c73ffbaafa0e8eda897f",
      "old_mode": 33261,
      "old_path": "git-checkout.sh",
      "new_id": "deb479524ae5b57d8a446536af5b3201e69b4361",
      "new_mode": 33261,
      "new_path": "git-checkout.sh"
    }
  ]
}
