* Why am I on Master instead of my branch
@ 2020-03-15 1:54 Jeffrey Walton
2020-03-15 9:45 ` Andreas Schwab
2020-03-15 10:52 ` SZEDER Gábor
0 siblings, 2 replies; 3+ messages in thread
From: Jeffrey Walton @ 2020-03-15 1:54 UTC (permalink / raw)
To: Git List
I'm trying to test some changes I made on a branch on some other
machines. The changes were committed and pushed. However, after a
checkout and pull on the other machines the changes were missing.
When I do a 'git branch' I am on master for some reason:
$ git branch
cmake-inno-setup-COVERAGE
config-guess
declarations
* master
However, I have never switched back to master:
$ history | grep git | grep -E 'master|cmake'
...
2630 git checkout cmake-inno-setup-COVERAGE
2631 git fetch upstream cmake-inno-setup-COVERAGE
2632 git checkout cmake-inno-setup-COVERAGE
2634 git checkout cmake-inno-setup-COVERAGE
2635 git branch cmake-inno-setup-COVERAGE
2757 git diff upstream/master
2766 history | grep git | grep -E 'master|cmake'
<end of history>
How am I on master when I checked out cmake-inno-setup-COVERAGE?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why am I on Master instead of my branch
2020-03-15 1:54 Why am I on Master instead of my branch Jeffrey Walton
@ 2020-03-15 9:45 ` Andreas Schwab
2020-03-15 10:52 ` SZEDER Gábor
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2020-03-15 9:45 UTC (permalink / raw)
To: Jeffrey Walton; +Cc: Git List
On Mär 14 2020, Jeffrey Walton wrote:
> How am I on master when I checked out cmake-inno-setup-COVERAGE?
Try `git reflog HEAD' to see if you can find some hints.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Why am I on Master instead of my branch
2020-03-15 1:54 Why am I on Master instead of my branch Jeffrey Walton
2020-03-15 9:45 ` Andreas Schwab
@ 2020-03-15 10:52 ` SZEDER Gábor
1 sibling, 0 replies; 3+ messages in thread
From: SZEDER Gábor @ 2020-03-15 10:52 UTC (permalink / raw)
To: Jeffrey Walton; +Cc: Git List
On Sat, Mar 14, 2020 at 09:54:00PM -0400, Jeffrey Walton wrote:
> I'm trying to test some changes I made on a branch on some other
> machines. The changes were committed and pushed. However, after a
> checkout and pull on the other machines the changes were missing.
>
> When I do a 'git branch' I am on master for some reason:
>
> $ git branch
> cmake-inno-setup-COVERAGE
> config-guess
> declarations
> * master
>
> However, I have never switched back to master:
Perhaps you haven't switched away from 'master' in the first place.
> $ history | grep git | grep -E 'master|cmake'
> ...
> 2630 git checkout cmake-inno-setup-COVERAGE
This could have failed because the branch 'cmake-inno-setup-COVERAGE'
didn't exist.
> 2631 git fetch upstream cmake-inno-setup-COVERAGE
This fetched the branch 'cmake-inno-setup-COVERAGE' that exists on the
remote and stored the commit object id at its tip in FETCH_HEAD, but
it didn't create a local branch of the same name.
> 2632 git checkout cmake-inno-setup-COVERAGE
> 2634 git checkout cmake-inno-setup-COVERAGE
So these two failed as well, because there was no such branch.
> 2635 git branch cmake-inno-setup-COVERAGE
Here you do create a branch called 'cmake-inno-setup-COVERAGE'
(pointing to the currently checked out commit in your local
repository, which is most likely not where it points to in the remote
repo), but you haven't checked it out.
> 2757 git diff upstream/master
> 2766 history | grep git | grep -E 'master|cmake'
> <end of history>
>
> How am I on master when I checked out cmake-inno-setup-COVERAGE?
Did you?
We can't tell without you telling us what the output of all those
commands were.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-15 10:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 1:54 Why am I on Master instead of my branch Jeffrey Walton
2020-03-15 9:45 ` Andreas Schwab
2020-03-15 10:52 ` SZEDER Gábor
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).