{"thread":{"id":"29483","subject":"Why does git stash create two commits?","startedAt":"2012-01-30T18:20:43Z","lastAt":"2012-01-30T19:11:24Z","messageCount":3,"participants":["Phillip Susi","Seth Robertson","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"183351","messageId":"4F26DF7B.7050109@ubuntu.com","threadId":"29483","inReplyTo":null,"subject":"Why does git stash create two commits?","fromName":"Phillip Susi","fromEmail":"psusi@ubuntu.com","sentAt":"2012-01-30T18:20:43Z","receivedAt":"2012-01-30T18:20:43Z","isPatch":false,"sender":{"key":"psusi@ubuntu.com","avatar":null},"body":"-----BEGIN PGP SIGNED MESSAGE-----\nHash: SHA1\n\ngit stash makes two commits, one that has no changes from the base,\nand one to stash your changes in.  Why?\n\n-----BEGIN PGP SIGNATURE-----\nVersion: GnuPG v2.0.17 (MingW32)\nComment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\n\niQEcBAEBAgAGBQJPJt97AAoJEJrBOlT6nu75G1cH/1qXXMFBPr5vGZbPXCCgG4eG\nnmTVlVjxa9Wk52rY/o3NfrgDrftuKIeMdjrFxe/hOsuU37rfMUpWlGa6wtwOIgHL\nCm2s/+PssrOwpajb+v3h+0vqZGNULaxPNpApDjB4JWTxNs86aCV/+zkzoqNjO8y4\nOfAZnzqe03BJmPjldvygswD0RMvRvBuHyGRVhTgATcc89yZmihFxCNyekHdVUSvD\nzVIUgyUj1vlSRDnSJrtARbKR3JZQeTtN6rMLIOxN0T3iOkltMWFGMoVbJ23kiUyD\nLuMSNMrBvvkEU6g6czqQNNyreSut/b1r1ZTt/pvF0qDWUE5CZ9Qhgs6Xz7prtWs=\n=Yp0K\n-----END PGP SIGNATURE-----\n"},{"id":"183353","messageId":"201201301825.q0UIPLni016760@no.baka.org","threadId":"29483","inReplyTo":"4F26DF7B.7050109@ubuntu.com","subject":"Re: Why does git stash create two commits?","fromName":"Seth Robertson","fromEmail":"in-gitvger@baka.org","sentAt":"2012-01-30T18:25:21Z","receivedAt":"2012-01-30T18:25:21Z","isPatch":false,"sender":{"key":"in-gitvger@baka.org","avatar":null},"body":"\nIn message <4F26DF7B.7050109@ubuntu.com>, Phillip Susi writes:\n\n    git stash makes two commits, one that has no changes from the base,\n    and one to stash your changes in.  Why?\n\ngit-stash can make up to three commits:\n\nworking directory (of files git knows about)\nindex\nworking directory (of files git does not know about)\n\nThe third commit only appears if you use --all or --include-untracked.\n\nMost likely you do not use -u/-a and your index has not been touched\nyet, so you only see two commits, of which one is empty.\n\n\t\t\t\t\t-Seth Robertson\n"},{"id":"183364","messageId":"7vhazdatur.fsf@alter.siamese.dyndns.org","threadId":"29483","inReplyTo":"4F26DF7B.7050109@ubuntu.com","subject":"Re: Why does git stash create two commits?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-01-30T19:11:24Z","receivedAt":"2012-01-30T19:11:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Phillip Susi <psusi@ubuntu.com> writes:\n\n> git stash makes two commits, one that has no changes from the base,\n> and one to stash your changes in.  Why?\n\nThe only reason the former is identical to the base is because you are not\nincrementally building your next commit using \"git add\". It represents the\nstate of your index. The latter represents the state of the tracked files\nin your working tree.\n"}]}