git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git loses a commit after reordering.
@ 2017-04-27  7:43 Nikita Orlov
  2017-04-29 22:56 ` Kevin Daudt
  0 siblings, 1 reply; 5+ messages in thread
From: Nikita Orlov @ 2017-04-27  7:43 UTC (permalink / raw)
  To: git

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

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

end of thread, other threads:[~2017-05-02 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27  7:43 git loses a commit after reordering Nikita Orlov
2017-04-29 22:56 ` Kevin Daudt
2017-05-01 13:04   ` Re[2]: " Nikita Orlov
2017-05-01 23:33     ` Junio C Hamano
2017-05-02 14:29       ` Johannes Schindelin

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).