* bug or a general misunderstanding @ 2021-11-10 12:00 andre_pohlmann 2021-11-10 14:33 ` Ævar Arnfjörð Bjarmason 2021-11-10 14:46 ` Johannes Schindelin 0 siblings, 2 replies; 7+ messages in thread From: andre_pohlmann @ 2021-11-10 12:00 UTC (permalink / raw) To: git 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug or a general misunderstanding 2021-11-10 12:00 bug or a general misunderstanding andre_pohlmann @ 2021-11-10 14:33 ` Ævar Arnfjörð Bjarmason 2021-11-10 14:46 ` Johannes Schindelin 1 sibling, 0 replies; 7+ messages in thread From: Ævar Arnfjörð Bjarmason @ 2021-11-10 14:33 UTC (permalink / raw) To: andre_pohlmann; +Cc: git 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug or a general misunderstanding 2021-11-10 12:00 bug or a general misunderstanding andre_pohlmann 2021-11-10 14:33 ` Ævar Arnfjörð Bjarmason @ 2021-11-10 14:46 ` Johannes Schindelin 2021-11-10 18:27 ` andre_pohlmann 1 sibling, 1 reply; 7+ messages in thread From: Johannes Schindelin @ 2021-11-10 14:46 UTC (permalink / raw) To: andre_pohlmann; +Cc: git [-- Attachment #1: Type: text/plain, Size: 943 bytes --] 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 > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug or a general misunderstanding 2021-11-10 14:46 ` Johannes Schindelin @ 2021-11-10 18:27 ` andre_pohlmann [not found] ` <YY2MXSZXIRSDLQCu@camp.crustytoothpaste.net> 0 siblings, 1 reply; 7+ messages in thread From: andre_pohlmann @ 2021-11-10 18:27 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git 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: > >> 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 >> >> ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <YY2MXSZXIRSDLQCu@camp.crustytoothpaste.net>]
* Re: bug or a general misunderstanding [not found] ` <YY2MXSZXIRSDLQCu@camp.crustytoothpaste.net> @ 2021-11-15 10:56 ` andre_pohlmann 2021-11-15 21:08 ` Jeff King 0 siblings, 1 reply; 7+ messages in thread From: andre_pohlmann @ 2021-11-15 10:56 UTC (permalink / raw) To: brian m. carlson, andre_pohlmann, Johannes Schindelin, git Hi, Starting from the relevant branch git branch TEST_1 git checkout TEST_1 git status then git checkout BBV ---- that is the original Branch git branch TEST_2 ff2c8952 ---- the commit to check out from git checkout TEST_2 git status git branch --contains 48c8756e ---- the commit with the specific code the result is that only TEST_1 is shown, not TEST_2. It looks to me like the commit is missing. When I look at the code, the lines in question are also missing. Am 11.11.2021 22:34 schrieb brian m. carlson: > On 2021-11-10 at 18:27:56, andre_pohlmann@posteo.de wrote: >> 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. > > Could you give us a set of commands you've run (in Git Bash) to create > a > new test repository (or clone an existing public repository) and > reproduce this problem? Right now, we don't know exactly what you've > done, so we can only speculate about what you're seeing. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug or a general misunderstanding 2021-11-15 10:56 ` andre_pohlmann @ 2021-11-15 21:08 ` Jeff King 2021-11-16 9:01 ` andre_pohlmann 0 siblings, 1 reply; 7+ messages in thread From: Jeff King @ 2021-11-15 21:08 UTC (permalink / raw) To: andre_pohlmann; +Cc: brian m. carlson, Johannes Schindelin, git On Mon, Nov 15, 2021 at 10:56:00AM +0000, andre_pohlmann@posteo.de wrote: > Starting from the relevant branch > > git branch TEST_1 > git checkout TEST_1 > git status OK, so TEST_1 points at something. We don't know what, but from below, it sounds like the BBV branch. > then > > git checkout BBV ---- that is the original Branch > git branch TEST_2 ff2c8952 ---- the commit to check out from OK, so now TEST_2 is created from ff2c8952. But from the details you've given, we don't know what relationship that has to what was on BBV, or any other commit. > git checkout TEST_2 > git status And now it's our HEAD, though I don't think that matters, because... > git branch --contains 48c8756e ---- the commit with the specific code ...this is asking which branches contain 48c8756e, and doesn't care about HEAD at all. > the result is that only TEST_1 is shown, not TEST_2. > It looks to me like the commit is missing. I can't say if this is a bug or not, without knowing the relationship between 48c8756e and ff2c8952. Have you tried something like: git log --oneline --graph 48c8756e...ff2c8952 That should show you whether one is an ancestor of the other. -Peff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug or a general misunderstanding 2021-11-15 21:08 ` Jeff King @ 2021-11-16 9:01 ` andre_pohlmann 0 siblings, 0 replies; 7+ messages in thread From: andre_pohlmann @ 2021-11-16 9:01 UTC (permalink / raw) To: Jeff King; +Cc: brian m. carlson, Johannes Schindelin, git Good Morning Peff, I am not sure how to interpret the result. I just get a graph displayed. Does this refer to the current branch? Is it possible that the commit 48c8756e is in the history of a branch but not an ancestor of ff2c8952? Would this mean that GIT ignores commits in the history if they are not direct ancestors of the commit from which the branch is created? And why is the behavior of creating the branch different compared to Git Hub Desktop? André Am 15.11.2021 22:08 schrieb Jeff King: > On Mon, Nov 15, 2021 at 10:56:00AM +0000, andre_pohlmann@posteo.de > wrote: > >> Starting from the relevant branch >> >> git branch TEST_1 >> git checkout TEST_1 >> git status > > OK, so TEST_1 points at something. We don't know what, but from below, > it sounds like the BBV branch. > >> then >> >> git checkout BBV ---- that is the original Branch >> git branch TEST_2 ff2c8952 ---- the commit to check out from > > OK, so now TEST_2 is created from ff2c8952. But from the details you've > given, we don't know what relationship that has to what was on BBV, or > any other commit. > >> git checkout TEST_2 >> git status > > And now it's our HEAD, though I don't think that matters, because... > >> git branch --contains 48c8756e ---- the commit with the specific code > > ...this is asking which branches contain 48c8756e, and doesn't care > about HEAD at all. > >> the result is that only TEST_1 is shown, not TEST_2. >> It looks to me like the commit is missing. > > I can't say if this is a bug or not, without knowing the relationship > between 48c8756e and ff2c8952. Have you tried something like: > > git log --oneline --graph 48c8756e...ff2c8952 > > That should show you whether one is an ancestor of the other. > > -Peff ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-11-16 9:01 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-11-10 12:00 bug or a general misunderstanding andre_pohlmann 2021-11-10 14:33 ` Ævar Arnfjörð Bjarmason 2021-11-10 14:46 ` Johannes Schindelin 2021-11-10 18:27 ` andre_pohlmann [not found] ` <YY2MXSZXIRSDLQCu@camp.crustytoothpaste.net> 2021-11-15 10:56 ` andre_pohlmann 2021-11-15 21:08 ` Jeff King 2021-11-16 9:01 ` andre_pohlmann
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 NNTP newsgroup(s).