git loses a commit after reordering.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, my name is Nikita (male).

Could you explain this (subject) is a bug or a feature?

I follow Pro Git Reordering Commits (https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) to reorder commits and lose one without any conflict.

I've got git under Windows 10 Enterprise 64-bit installed through Chocolatey.

> choco list -l git
Chocolatey v0.10.5
chocolatey 0.10.5
git 2.12.2.2
gitpad 1.2
msysgit 1.7.10.20120526
4 packages installed.

$ git --version
git version 2.12.2.windows.1

Example.

There are two branches:
- master
- feature-branch

feature-branch is on master.

MyPC MINGW64 /path/to/repository (feature-branch)

$ git log -9 --oneline
5045d1eca Merge branch 'feature-3' into 'feature-branch'
006fc549d Done Task 3
a2a52441e Merge branch 'feature-2' into 'feature-branch'
e73527115 Done Task 2
f0454685e Merge branch 'feature-1' into 'feature-branch'
3ab82e4c6 Done Task 1
f15037d64 Some independent changes 2
cba3ebb4e Some independent changes 1
bc19473cf Head of master

$ git rebase -i -p master

I change the rebase script from:

pick cba3ebb4e Some independent changes 1
pick f15037d64 Some independent changes 2
pick 3ab82e4c6 Done Task 1
pick f0454685e Merge branch 'feature-1' into 'feature-branch'
pick e73527115 Done Task 2
pick a2a52441e Merge branch 'feature-2' into 'feature-branch'
pick 006fc549d Done Task 3
pick 5045d1eca Merge branch 'feature-3' into 'feature-branch'

to:

pick f15037d64 Some independent changes 2
pick cba3ebb4e Some independent changes 1
pick 3ab82e4c6 Done Task 1
pick f0454685e Merge branch 'feature-1' into 'feature-branch'
pick e73527115 Done Task 2
pick a2a52441e Merge branch 'feature-2' into 'feature-branch'
pick 006fc549d Done Task 3
pick 5045d1eca Merge branch 'feature-3' into 'feature-branch'

No any conflict and I see:
Successfully rebased and updated refs/heads/feature-branch.

$ git log -9 --oneline
47e579ce0 Merge branch 'feature-3' into 'feature-branch'
a7c6b8b8e Done Task 3
5df7ce105 Merge branch 'feature-2' into 'feature-branch'
0197797d7 Done Task 2
e680488fe Merge branch 'feature-1' into 'feature-branch'
731a57580 Done Task 1
10da9cd85 Some independent changes 2
bc19473cf Head of master
d91947abd Commit under the head of master

"Some independent changes 1" is missed and its changes are missed as well.

I tried to move another commit to a farther distance below but there was still only one missed commit.

Could you explain it?

Thank you in advance and sorry for my English.

Best, Nikita




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]