What can cause the "number of commits forward" to change after a reboot?

Before restarting the function branch, which I did not touch for several weeks, it was 25 commits ahead of the wizard. After rebooting, there are now 18 commits. There were several conflicts that I had to resolve along the way. Maybe exactly 7.

What could lead to a change in this number? Cherry picks that were discovered along the way and turned into a NOOP? The above conflict resolution?

+3
source share
2 answers

There are several possible ways to do this - this is not an exhaustive list, but should give you an idea of ​​how this can happen:

1. Ink commits

-, , , : , git rebase , . VonC .

2. ,

, , , , , , . ( , , , :)) , , , , - , , .

, , git , , . , git 1.7.1. -, , , origin/master:

$ git commit
[master 1efa20f] Add a change designed to conflict
 1 files changed, 1 insertions(+), 1 deletions(-)

... rebase:

$ git rebase origin/master 
First, rewinding head to replay your work on top of it...
Applying: Add a change designed to conflict
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging src-plugins/3D_Viewer/ij3d/Image3DUniverse.java
CONFLICT (content): Merge conflict in src-plugins/3D_Viewer/ij3d/Image3DUniverse.java
Failed to merge in the changes.
Patch failed at 0001 Add a change designed to conflict

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

, :

$  git diff
diff --cc src-plugins/3D_Viewer/ij3d/Image3DUniverse.java
index 36ec046,f4841ec..0000000
--- a/src-plugins/3D_Viewer/ij3d/Image3DUniverse.java
+++ b/src-plugins/3D_Viewer/ij3d/Image3DUniverse.java
@@@ -264,7 -264,7 +264,11 @@@ public class Image3DUniverse extends De
        public void cleanup() {
                timeline.pause();
                removeAllContents();
++<<<<<<< HEAD
 +              contents.clear();
++=======
+               contents.clear(); // A change designed to conflict
++>>>>>>> Add a change designed to conflict
                universes.remove(this);
                adder.shutdownNow();
                executer.flush();

, , , :

$  vim src-plugins/3D_Viewer/ij3d/Image3DUniverse.java

:

$ git add src-plugins/3D_Viewer/ij3d/Image3DUniverse.java

:

$ git rebase --continue
Applying: Add a change designed to conflict
No changes - did you forget to use 'git add'?

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

, git, , , , , , , git rebase --skip. , , , , :

$  git rebase --skip
HEAD is now at f3a2de3 3D Viewer: Avoid NPE when closing the viewer window.
Nothing to do.

git log.

3.

, , - , git rebase , .

+4

Jefromi, git log --pretty=oneline -n18 <branch> git log --pretty=oneline -n25 <branch>@{1} , . , git reflog, , , pre-rebase.

+1

Source: https://habr.com/ru/post/1792285/


All Articles