Hello there
I'm not sure if I'm in the right place here.
Maybe it's a bug or a general misunderstanding of how GIT works.
The following situation: I wanted to create a branch from a commit. From
there on the work should be continued.
The possible bug:
The newly created branch is missing commits in the history. Not only are
they not displayed, the code changes are not present.
It doesn't matter if the branch is created by Visual Studio or GIT for
Windows.
Only in a branch created by GitHub Desktop the commits are present, as I
would expect.
Is this a bug or do I not understand how GIT works?
Best regards and thank you for the effort
André Pohlmann
On Wed, Nov 10 2021, andre_pohlmann@posteo.de wrote:
Hello there
I'm not sure if I'm in the right place here.
Maybe it's a bug or a general misunderstanding of how GIT works.
The following situation: I wanted to create a branch from a
commit. From there on the work should be continued.
The possible bug:
The newly created branch is missing commits in the history. Not only
are they not displayed, the code changes are not present.
It doesn't matter if the branch is created by Visual Studio or GIT for
Windows.
Only in a branch created by GitHub Desktop the commits are present, as
I would expect.
Is this a bug or do I not understand how GIT works?
Best regards and thank you for the effort
André Pohlmann
Hi there.
The mailing list you contacted is the Git development mailing list. I
think it's fair to assume that you haven't run into a bug in git, but
are in need of more basic resources on the topic of Git.
Git's pretty good at retaining your data, if you can't find it after
saving it in git the reason for why is likely to be explained by an
introductory tutorial.
A good resource to start with is: https://git-scm.com/community
From: Johannes Schindelin <hidden> Date: 2021-11-10 14:46:15
Hi André,
On Wed, 10 Nov 2021, andre_pohlmann@posteo.de wrote:
The following situation: I wanted to create a branch from a commit. From there
on the work should be continued.
I suspect that the command you used was `git branch <name> <commit>`? That
_creates_ the branch, but does not switch to it. You need to call `git
switch <name>` to switch the worktree to it. If you want to do all in one
go, use `git switch -c <name> <commit>`.
Ciao,
Johannes
The possible bug:
The newly created branch is missing commits in the history. Not only are they
not displayed, the code changes are not present.
It doesn't matter if the branch is created by Visual Studio or GIT for
Windows.
Only in a branch created by GitHub Desktop the commits are present, as I would
expect.
Is this a bug or do I not understand how GIT works?
Best regards and thank you for the effort
André Pohlmann
Hello Johannes,
Thanks for your ideas.
I have checked out the respective new branch and switched between the
original and the new, multiple times.
Otherwise I would not have noticed the lack of commits.
I have also set up a virtual machine, free of any IDE or GIT. There I
only installed Git for Windows and repeated the process via cmd. The
result is the same, there are missing commits in the history compared to
the original branch.
Best regards
André Pohlmann
Am 10.11.2021 15:46 schrieb Johannes Schindelin:
Hi André,
On Wed, 10 Nov 2021, andre_pohlmann@posteo.de wrote:
quoted
The following situation: I wanted to create a branch from a commit.
From there
on the work should be continued.
I suspect that the command you used was `git branch <name> <commit>`?
That
_creates_ the branch, but does not switch to it. You need to call `git
switch <name>` to switch the worktree to it. If you want to do all in
one
go, use `git switch -c <name> <commit>`.
Ciao,
Johannes
quoted
The possible bug:
The newly created branch is missing commits in the history. Not only
are they
not displayed, the code changes are not present.
It doesn't matter if the branch is created by Visual Studio or GIT for
Windows.
Only in a branch created by GitHub Desktop the commits are present, as
I would
expect.
Is this a bug or do I not understand how GIT works?
Best regards and thank you for the effort
André Pohlmann