{"thread":{"id":"52997","subject":"Why am I on Master instead of my branch","startedAt":"2020-03-15T01:54:14Z","lastAt":"2020-03-15T10:53:00Z","messageCount":3,"participants":["Jeffrey Walton","Andreas Schwab","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"393246","messageId":"CAH8yC8=FZrDmHBSk=GFZd08Ovk4zffyB7KEOoyUpAPLYi_xUeA@mail.gmail.com","threadId":"52997","inReplyTo":null,"subject":"Why am I on Master instead of my branch","fromName":"Jeffrey Walton","fromEmail":"noloader@gmail.com","sentAt":"2020-03-15T01:54:00Z","receivedAt":"2020-03-15T01:54:14Z","isPatch":false,"sender":{"key":"noloader@gmail.com","avatar":null},"body":"I'm trying to test some changes I made on a branch on some other\nmachines. The changes were committed and pushed. However, after a\ncheckout and pull on the other machines the changes were missing.\n\nWhen I do a 'git branch' I am on master for some reason:\n\n$ git branch\n  cmake-inno-setup-COVERAGE\n  config-guess\n  declarations\n* master\n\nHowever, I have never switched back to master:\n\n$ history | grep git | grep -E 'master|cmake'\n...\n2630  git checkout cmake-inno-setup-COVERAGE\n 2631  git fetch upstream cmake-inno-setup-COVERAGE\n 2632  git checkout cmake-inno-setup-COVERAGE\n 2634  git checkout cmake-inno-setup-COVERAGE\n 2635  git branch cmake-inno-setup-COVERAGE\n 2757  git diff upstream/master\n 2766  history | grep git | grep -E 'master|cmake'\n<end of history>\n\nHow am I on master when I checked out cmake-inno-setup-COVERAGE?\n"},{"id":"393261","messageId":"875zf654tp.fsf@igel.home","threadId":"52997","inReplyTo":"CAH8yC8=FZrDmHBSk=GFZd08Ovk4zffyB7KEOoyUpAPLYi_xUeA@mail.gmail.com","subject":"Re: Why am I on Master instead of my branch","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2020-03-15T09:45:54Z","receivedAt":"2020-03-15T09:46:42Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Mär 14 2020, Jeffrey Walton wrote:\n\n> How am I on master when I checked out cmake-inno-setup-COVERAGE?\n\nTry `git reflog HEAD' to see if you can find some hints.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n"},{"id":"393263","messageId":"20200315105253.GI3122@szeder.dev","threadId":"52997","inReplyTo":"CAH8yC8=FZrDmHBSk=GFZd08Ovk4zffyB7KEOoyUpAPLYi_xUeA@mail.gmail.com","subject":"Re: Why am I on Master instead of my branch","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2020-03-15T10:52:53Z","receivedAt":"2020-03-15T10:53:00Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sat, Mar 14, 2020 at 09:54:00PM -0400, Jeffrey Walton wrote:\n> I'm trying to test some changes I made on a branch on some other\n> machines. The changes were committed and pushed. However, after a\n> checkout and pull on the other machines the changes were missing.\n> \n> When I do a 'git branch' I am on master for some reason:\n> \n> $ git branch\n>   cmake-inno-setup-COVERAGE\n>   config-guess\n>   declarations\n> * master\n> \n> However, I have never switched back to master:\n\nPerhaps you haven't switched away from 'master' in the first place.\n\n> $ history | grep git | grep -E 'master|cmake'\n> ...\n> 2630  git checkout cmake-inno-setup-COVERAGE\n\nThis could have failed because the branch 'cmake-inno-setup-COVERAGE'\ndidn't exist.\n\n>  2631  git fetch upstream cmake-inno-setup-COVERAGE\n\nThis fetched the branch 'cmake-inno-setup-COVERAGE' that exists on the\nremote and stored the commit object id at its tip in FETCH_HEAD, but\nit didn't create a local branch of the same name.\n\n>  2632  git checkout cmake-inno-setup-COVERAGE\n>  2634  git checkout cmake-inno-setup-COVERAGE\n\nSo these two failed as well, because there was no such branch.\n\n>  2635  git branch cmake-inno-setup-COVERAGE\n\nHere you do create a branch called 'cmake-inno-setup-COVERAGE'\n(pointing to the currently checked out commit in your local\nrepository, which is most likely not where it points to in the remote\nrepo), but you haven't checked it out.\n\n>  2757  git diff upstream/master\n>  2766  history | grep git | grep -E 'master|cmake'\n> <end of history>\n> \n> How am I on master when I checked out cmake-inno-setup-COVERAGE?\n\nDid you?\nWe can't tell without you telling us what the output of all those\ncommands were.\n\n"}]}