{"thread":{"id":"48749","subject":"After rebasing and reset I am on unexpected commit","startedAt":"2018-06-21T09:37:04Z","lastAt":"2018-06-21T09:42:50Z","messageCount":2,"participants":["KES"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"350618","messageId":"242401529573355@web55j.yandex.ru","threadId":"48749","inReplyTo":null,"subject":"After rebasing and reset I am on unexpected commit","fromName":"KES","fromEmail":"kes-kes@yandex.ru","sentAt":"2018-06-21T09:29:15Z","receivedAt":"2018-06-21T09:37:04Z","isPatch":false,"sender":{"key":"kes-kes@yandex.ru","avatar":null},"body":"Hi.\n\n\nI am on my current branch:\n\n$ git log --graph --decorate --pretty=oneline --abbrev-commit\n* 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS\n* f45a919 Create SCTT for Contractor\n* 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement\n* 7e4cac9 Create SCTT for Language\n* a0607d1 Fixed broken tests for 'Person'\n* 1d0a1b2 Create SCTT for DocumentFile\n* 92837c1 Fix SQL quoting problem\n\n\nNow I want to pull new changes and rebase my work on top of it:\n\n$ git pull -v -r amazon SCTT_for_other_tables\nFrom amazon:/v1/repos/tucha\n * branch            SCTT_for_other_tables -> FETCH_HEAD\n = [up to date]      SCTT_for_other_tables -> amazon/SCTT_for_other_tables\nCreated autostash: 97ce867\nHEAD is now at 5b85d64 Implement script to test CORS\nChanges from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to a0d92dc11ec11023f6d492497e043170d7128f56:\n lib/MaitreD/Controller/ContractorTypeI18n.pm |  54 +---------------\n public/maitre_d/api-v1.yaml                  | 158 ++++++++++++++++++++++++++++++++++++++++++++++-\n t/MaitreD/contractor_type_i18n.t             | 117 +++++++++++++++++++++++++++++++++++\n 3 files changed, 276 insertions(+), 53 deletions(-)\n create mode 100644 t/MaitreD/contractor_type_i18n.t\nNote: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'.\n\nYou are in 'detached HEAD' state. You can look around, make experimental\nchanges and commit them, and you can discard any commits you make in this\nstate without impacting any branches by performing another checkout.\n\nIf you want to create a new branch to retain commits you create, you may\ndo so (now or later) by using -b with the checkout command again. Example:\n\n  git checkout -b <new-branch-name>\n\nHEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of amazon:/v1/repos/tucha into SCTT_for_other_tables\nRebasing (1/1)\n lib/MaitreD/Controller/ContractorTypeI18n.pm |  54 +--------\n public/maitre_d/api-v1.yaml                  | 158 ++++++++++++++++++++++++++-\n t/MaitreD/contractor_type_i18n.t             | 117 ++++++++++++++++++++\n 3 files changed, 276 insertions(+), 53 deletions(-)\nSuccessfully rebased and updated refs/heads/SCTT_for_other_tables.\nApplying autostash resulted in conflicts.\nYour changes are safe in the stash.\nYou can run \"git stash pop\" or \"git stash drop\" at any time.\n\nAs you can see the rebase finished successfully except applying autostash\n\n$ git log --graph --decorate --pretty=oneline --abbrev-commit\n*   a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge branch 'SCTT_for_oth\n|\\  \n| * 5b85d64 Implement script to test CORS\n* | 0c1ac6c Create SCTT for ContractorTypeI18n\n|/  \n* f45a919 Create SCTT for Contractor\n* 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement\n* 7e4cac9 Create SCTT for Language\n* a0607d1 Fixed broken tests for 'Person'\n* 1d0a1b2 Create SCTT for DocumentFile\n* 92837c1 Fix SQL quoting problem\n\n1. Why I got merge? I did not ask that. Thus I want to rewind back\n\n$ git reset --hard HEAD^\nHEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n\n\n2. Why I am returned to 0c1ac6c Create SCTT for ContractorTypeI18n\ninstead of: 5b85d64 Implement script to test CORS ?\n\nI expect to be in the state when I start my rebasing\n\n$ git log --graph --decorate --pretty=oneline --abbrev-commit\n* 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n\n* f45a919 Create SCTT for Contractor\n* 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement\n* 7e4cac9 Create SCTT for Language\n* a0607d1 Fixed broken tests for 'Person'\n* 1d0a1b2 Create SCTT for DocumentFile\n* 92837c1 Fix SQL quoting problem\n\n\nNow 5b85d64 Implement script to test CORS is not any branch and with less attention will be lost\n\nWhat did I do wrong? is this behavior expected?\n"},{"id":"350620","messageId":"268931529574164@web50g.yandex.ru","threadId":"48749","inReplyTo":"242401529573355@web55j.yandex.ru","subject":"Re: After rebasing and reset I am on unexpected commit","fromName":"KES","fromEmail":"kes-kes@yandex.ru","sentAt":"2018-06-21T09:42:44Z","receivedAt":"2018-06-21T09:42:50Z","isPatch":false,"sender":{"key":"kes-kes@yandex.ru","avatar":null},"body":"ah, sorry. I understand why.\n\nThe merge was on remote side.\n\n21.06.2018, 12:37, \"KES\" <kes-kes@yandex.ru>:\n> Hi.\n>\n> I am on my current branch:\n>\n> $ git log --graph --decorate --pretty=oneline --abbrev-commit\n> * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS\n> * f45a919 Create SCTT for Contractor\n> * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement\n> * 7e4cac9 Create SCTT for Language\n> * a0607d1 Fixed broken tests for 'Person'\n> * 1d0a1b2 Create SCTT for DocumentFile\n> * 92837c1 Fix SQL quoting problem\n>\n> Now I want to pull new changes and rebase my work on top of it:\n>\n> $ git pull -v -r amazon SCTT_for_other_tables\n> From amazon:/v1/repos/tucha\n>  * branch SCTT_for_other_tables -> FETCH_HEAD\n>  = [up to date] SCTT_for_other_tables -> amazon/SCTT_for_other_tables\n> Created autostash: 97ce867\n> HEAD is now at 5b85d64 Implement script to test CORS\n> Changes from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to a0d92dc11ec11023f6d492497e043170d7128f56:\n>  lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +---------------\n>  public/maitre_d/api-v1.yaml | 158 ++++++++++++++++++++++++++++++++++++++++++++++-\n>  t/MaitreD/contractor_type_i18n.t | 117 +++++++++++++++++++++++++++++++++++\n>  3 files changed, 276 insertions(+), 53 deletions(-)\n>  create mode 100644 t/MaitreD/contractor_type_i18n.t\n> Note: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'.\n>\n> You are in 'detached HEAD' state. You can look around, make experimental\n> changes and commit them, and you can discard any commits you make in this\n> state without impacting any branches by performing another checkout.\n>\n> If you want to create a new branch to retain commits you create, you may\n> do so (now or later) by using -b with the checkout command again. Example:\n>\n>   git checkout -b <new-branch-name>\n>\n> HEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of amazon:/v1/repos/tucha into SCTT_for_other_tables\n> Rebasing (1/1)\n>  lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +--------\n>  public/maitre_d/api-v1.yaml | 158 ++++++++++++++++++++++++++-\n>  t/MaitreD/contractor_type_i18n.t | 117 ++++++++++++++++++++\n>  3 files changed, 276 insertions(+), 53 deletions(-)\n> Successfully rebased and updated refs/heads/SCTT_for_other_tables.\n> Applying autostash resulted in conflicts.\n> Your changes are safe in the stash.\n> You can run \"git stash pop\" or \"git stash drop\" at any time.\n>\n> As you can see the rebase finished successfully except applying autostash\n>\n> $ git log --graph --decorate --pretty=oneline --abbrev-commit\n> * a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge branch 'SCTT_for_oth\n> |\\\n> | * 5b85d64 Implement script to test CORS\n> * | 0c1ac6c Create SCTT for ContractorTypeI18n\n> |/\n> * f45a919 Create SCTT for Contractor\n> * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement\n> * 7e4cac9 Create SCTT for Language\n> * a0607d1 Fixed broken tests for 'Person'\n> * 1d0a1b2 Create SCTT for DocumentFile\n> * 92837c1 Fix SQL quoting problem\n>\n> 1. Why I got merge? I did not ask that. Thus I want to rewind back\n>\n> $ git reset --hard HEAD^\n> HEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n\n>\n> 2. Why I am returned to 0c1ac6c Create SCTT for ContractorTypeI18n\n> instead of: 5b85d64 Implement script to test CORS ?\n>\n> I expect to be in the state when I start my rebasing\n>\n> $ git log --graph --decorate --pretty=oneline --abbrev-commit\n> * 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n\n> * f45a919 Create SCTT for Contractor\n> * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement\n> * 7e4cac9 Create SCTT for Language\n> * a0607d1 Fixed broken tests for 'Person'\n> * 1d0a1b2 Create SCTT for DocumentFile\n> * 92837c1 Fix SQL quoting problem\n>\n> Now 5b85d64 Implement script to test CORS is not any branch and with less attention will be lost\n>\n> What did I do wrong? is this behavior expected?\n"}]}