{"thread":{"id":"38186","subject":"confusion with some `git reset` commands","startedAt":"2014-12-16T18:39:08Z","lastAt":"2014-12-18T12:09:33Z","messageCount":4,"participants":["Arup Rakshit","Kevin","Christian Couder","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"253744","messageId":"2055441.uOK6yH3IMG@linux-wzza.site","threadId":"38186","inReplyTo":null,"subject":"confusion with some `git reset` commands","fromName":"Arup Rakshit","fromEmail":"aruprakshit@rocketmail.com","sentAt":"2014-12-16T18:39:08Z","receivedAt":"2014-12-16T18:39:08Z","isPatch":false,"sender":{"key":"aruprakshit@rocketmail.com","avatar":"https://gravatar.com/avatar/a05a6142b0941fafb88c96b156982deb8e49e863ae7803d15c5147276fdeff92?d=mp&s=160"},"body":"Hi,\n\n>From the command help I see - \n\n[arup@to_do_app]$ git reset -h\nusage: git reset [--mixed | --soft | --hard | --merge | --keep] [-q] \n[<commit>]\n   or: git reset [-q] <tree-ish> [--] <paths>...\n   or: git reset --patch [<tree-ish>] [--] [<paths>...]\n\n    -q, --quiet           be quiet, only report errors\n    --mixed               reset HEAD and index\n    --soft                reset only HEAD\n    --hard                reset HEAD, index and working tree\n    --merge               reset HEAD, index and working tree\n    --keep                reset HEAD but keep local changes\n    -p, --patch           select hunks interactively\n\nBut I am looking for any differences -\n\na) git reset --soft and git reset --keep\nb) git reset --hard and git reset --merge\n\n\n-- \n================\nRegards,\nArup Rakshit\n================\nDebugging is twice as hard as writing the code in the first place. Therefore, \nif you write the code as cleverly as possible, you are, by definition, not \nsmart enough to debug it.\n\n--Brian Kernighan\n"},{"id":"253798","messageId":"CAO54GHAVMSYCHAoqH1OOSaUeHBdSmqTvzJLWWUa0_bO3CLy4zg@mail.gmail.com","threadId":"38186","inReplyTo":"2055441.uOK6yH3IMG@linux-wzza.site","subject":"Re: confusion with some `git reset` commands","fromName":"Kevin","fromEmail":"ikke@ikke.info","sentAt":"2014-12-18T08:23:09Z","receivedAt":"2014-12-18T08:23:09Z","isPatch":false,"sender":{"key":"ikke@ikke.info","avatar":"https://gravatar.com/avatar/60a0d08eeccb16914fdbfc7f3441548dc827dc436d5c6900ec6600e274e53c5b?d=mp&s=160"},"body":"On Tue, Dec 16, 2014 at 7:39 PM, Arup Rakshit\n<aruprakshit@rocketmail.com> wrote:\n> Hi,\n> ..\n>\n> But I am looking for any differences -\n>\n> a) git reset --soft and git reset --keep\n\ngit reset --keep is a safer version of git reset --hard. It will reset\nthe working tree. but will abort when it has to overwrite uncomitted\nchanges.\n\n> b) git reset --hard and git reset --merge\n\ngit reset --merge does the same as hard, but keeps unstaged changes.\nWhen unstaged changes would need to be overwritted, it also aborts.\n"},{"id":"253799","messageId":"CAP8UFD3iUjDsFfFfiPKKqmUkz6mfOHL7_mjam8P-_K11XYknxg@mail.gmail.com","threadId":"38186","inReplyTo":"CAO54GHAVMSYCHAoqH1OOSaUeHBdSmqTvzJLWWUa0_bO3CLy4zg@mail.gmail.com","subject":"Re: confusion with some `git reset` commands","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2014-12-18T08:38:21Z","receivedAt":"2014-12-18T08:38:21Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"> On Tue, Dec 16, 2014 at 7:39 PM, Arup Rakshit\n> <aruprakshit@rocketmail.com> wrote:\n\n>> From the command help I see -\n>>\n>> [arup@to_do_app]$ git reset -h\n\nYou can also use \"git help reset\" to have the full man page.\nIt has a lot more information.\n\n>> But I am looking for any differences -\n\nDo you have some use cases in mind?\n\nBest,\nChristian.\n"},{"id":"253803","messageId":"20141218150933.01825f2d6c827aa6eab99507@domain007.com","threadId":"38186","inReplyTo":"2055441.uOK6yH3IMG@linux-wzza.site","subject":"Re: confusion with some `git reset` commands","fromName":"Konstantin Khomoutov","fromEmail":"flatworm@users.sourceforge.net","sentAt":"2014-12-18T12:09:33Z","receivedAt":"2014-12-18T12:09:33Z","isPatch":false,"sender":{"key":"flatworm@users.sourceforge.net","avatar":null},"body":"On Wed, 17 Dec 2014 01:09:08 +0630\nArup Rakshit <aruprakshit@rocketmail.com> wrote:\n\n[...]\n> But I am looking for any differences -\n> \n> a) git reset --soft and git reset --keep\n> b) git reset --hard and git reset --merge\n\nPlease consider reading\nhttp://git-scm.com/book/en/v2/Git-Tools-Reset-Demystified\n"}]}