git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* After rebasing and reset I am on unexpected commit
@ 2018-06-21  9:29 KES
  2018-06-21  9:42 ` KES
  0 siblings, 1 reply; 2+ messages in thread
From: KES @ 2018-06-21  9:29 UTC (permalink / raw)
  To: git

Hi.


I am on my current branch:

$ git log --graph --decorate --pretty=oneline --abbrev-commit
* 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS
* f45a919 Create SCTT for Contractor
* 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement
* 7e4cac9 Create SCTT for Language
* a0607d1 Fixed broken tests for 'Person'
* 1d0a1b2 Create SCTT for DocumentFile
* 92837c1 Fix SQL quoting problem


Now I want to pull new changes and rebase my work on top of it:

$ git pull -v -r amazon SCTT_for_other_tables
From amazon:/v1/repos/tucha
 * branch            SCTT_for_other_tables -> FETCH_HEAD
 = [up to date]      SCTT_for_other_tables -> amazon/SCTT_for_other_tables
Created autostash: 97ce867
HEAD is now at 5b85d64 Implement script to test CORS
Changes from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to a0d92dc11ec11023f6d492497e043170d7128f56:
 lib/MaitreD/Controller/ContractorTypeI18n.pm |  54 +---------------
 public/maitre_d/api-v1.yaml                  | 158 ++++++++++++++++++++++++++++++++++++++++++++++-
 t/MaitreD/contractor_type_i18n.t             | 117 +++++++++++++++++++++++++++++++++++
 3 files changed, 276 insertions(+), 53 deletions(-)
 create mode 100644 t/MaitreD/contractor_type_i18n.t
Note: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of amazon:/v1/repos/tucha into SCTT_for_other_tables
Rebasing (1/1)
 lib/MaitreD/Controller/ContractorTypeI18n.pm |  54 +--------
 public/maitre_d/api-v1.yaml                  | 158 ++++++++++++++++++++++++++-
 t/MaitreD/contractor_type_i18n.t             | 117 ++++++++++++++++++++
 3 files changed, 276 insertions(+), 53 deletions(-)
Successfully rebased and updated refs/heads/SCTT_for_other_tables.
Applying autostash resulted in conflicts.
Your changes are safe in the stash.
You can run "git stash pop" or "git stash drop" at any time.

As you can see the rebase finished successfully except applying autostash

$ git log --graph --decorate --pretty=oneline --abbrev-commit
*   a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge branch 'SCTT_for_oth
|\  
| * 5b85d64 Implement script to test CORS
* | 0c1ac6c Create SCTT for ContractorTypeI18n
|/  
* f45a919 Create SCTT for Contractor
* 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement
* 7e4cac9 Create SCTT for Language
* a0607d1 Fixed broken tests for 'Person'
* 1d0a1b2 Create SCTT for DocumentFile
* 92837c1 Fix SQL quoting problem

1. Why I got merge? I did not ask that. Thus I want to rewind back

$ git reset --hard HEAD^
HEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n

2. Why I am returned to 0c1ac6c Create SCTT for ContractorTypeI18n
instead of: 5b85d64 Implement script to test CORS ?

I expect to be in the state when I start my rebasing

$ git log --graph --decorate --pretty=oneline --abbrev-commit
* 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n
* f45a919 Create SCTT for Contractor
* 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement
* 7e4cac9 Create SCTT for Language
* a0607d1 Fixed broken tests for 'Person'
* 1d0a1b2 Create SCTT for DocumentFile
* 92837c1 Fix SQL quoting problem


Now 5b85d64 Implement script to test CORS is not any branch and with less attention will be lost

What did I do wrong? is this behavior expected?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: After rebasing and reset I am on unexpected commit
  2018-06-21  9:29 After rebasing and reset I am on unexpected commit KES
@ 2018-06-21  9:42 ` KES
  0 siblings, 0 replies; 2+ messages in thread
From: KES @ 2018-06-21  9:42 UTC (permalink / raw)
  To: git

ah, sorry. I understand why.

The merge was on remote side.

21.06.2018, 12:37, "KES" <kes-kes@yandex.ru>:
> Hi.
>
> I am on my current branch:
>
> $ git log --graph --decorate --pretty=oneline --abbrev-commit
> * 5b85d64 (HEAD -> SCTT_for_other_tables) Implement script to test CORS
> * f45a919 Create SCTT for Contractor
> * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement
> * 7e4cac9 Create SCTT for Language
> * a0607d1 Fixed broken tests for 'Person'
> * 1d0a1b2 Create SCTT for DocumentFile
> * 92837c1 Fix SQL quoting problem
>
> Now I want to pull new changes and rebase my work on top of it:
>
> $ git pull -v -r amazon SCTT_for_other_tables
> From amazon:/v1/repos/tucha
>  * branch SCTT_for_other_tables -> FETCH_HEAD
>  = [up to date] SCTT_for_other_tables -> amazon/SCTT_for_other_tables
> Created autostash: 97ce867
> HEAD is now at 5b85d64 Implement script to test CORS
> Changes from 5b85d647ecd503cc03b26ed4e33bf8266bc8e96b to a0d92dc11ec11023f6d492497e043170d7128f56:
>  lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +---------------
>  public/maitre_d/api-v1.yaml | 158 ++++++++++++++++++++++++++++++++++++++++++++++-
>  t/MaitreD/contractor_type_i18n.t | 117 +++++++++++++++++++++++++++++++++++
>  3 files changed, 276 insertions(+), 53 deletions(-)
>  create mode 100644 t/MaitreD/contractor_type_i18n.t
> Note: checking out 'a0d92dc11ec11023f6d492497e043170d7128f56'.
>
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
>
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>
>   git checkout -b <new-branch-name>
>
> HEAD is now at a0d92dc Merge branch 'SCTT_for_other_tables' of amazon:/v1/repos/tucha into SCTT_for_other_tables
> Rebasing (1/1)
>  lib/MaitreD/Controller/ContractorTypeI18n.pm | 54 +--------
>  public/maitre_d/api-v1.yaml | 158 ++++++++++++++++++++++++++-
>  t/MaitreD/contractor_type_i18n.t | 117 ++++++++++++++++++++
>  3 files changed, 276 insertions(+), 53 deletions(-)
> Successfully rebased and updated refs/heads/SCTT_for_other_tables.
> Applying autostash resulted in conflicts.
> Your changes are safe in the stash.
> You can run "git stash pop" or "git stash drop" at any time.
>
> As you can see the rebase finished successfully except applying autostash
>
> $ git log --graph --decorate --pretty=oneline --abbrev-commit
> * a0d92dc (HEAD -> SCTT_for_other_tables, amazon/SCTT_for_other_tables) Merge branch 'SCTT_for_oth
> |\
> | * 5b85d64 Implement script to test CORS
> * | 0c1ac6c Create SCTT for ContractorTypeI18n
> |/
> * f45a919 Create SCTT for Contractor
> * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement
> * 7e4cac9 Create SCTT for Language
> * a0607d1 Fixed broken tests for 'Person'
> * 1d0a1b2 Create SCTT for DocumentFile
> * 92837c1 Fix SQL quoting problem
>
> 1. Why I got merge? I did not ask that. Thus I want to rewind back
>
> $ git reset --hard HEAD^
> HEAD is now at 0c1ac6c Create SCTT for ContractorTypeI18n
>
> 2. Why I am returned to 0c1ac6c Create SCTT for ContractorTypeI18n
> instead of: 5b85d64 Implement script to test CORS ?
>
> I expect to be in the state when I start my rebasing
>
> $ git log --graph --decorate --pretty=oneline --abbrev-commit
> * 0c1ac6c (HEAD -> SCTT_for_other_tables) Create SCTT for ContractorTypeI18n
> * f45a919 Create SCTT for Contractor
> * 702fcdd (xtucha/SCTT_for_other_tables) Create SCTT for PartnershipAgreement
> * 7e4cac9 Create SCTT for Language
> * a0607d1 Fixed broken tests for 'Person'
> * 1d0a1b2 Create SCTT for DocumentFile
> * 92837c1 Fix SQL quoting problem
>
> Now 5b85d64 Implement script to test CORS is not any branch and with less attention will be lost
>
> What did I do wrong? is this behavior expected?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-21  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-21  9:29 After rebasing and reset I am on unexpected commit KES
2018-06-21  9:42 ` KES

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).