<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 28, 2020 at 11:30 AM Paul C. Anagnostopoulos <<a href="mailto:paul@windfall.com">paul@windfall.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hmm. Thanks for sticking with me here. I believe origin/HEAD already points to main.<br>
<br>
>git remote show origin<br>
* remote origin<br>
  Fetch URL: <a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a><br>
  Push  URL: <a href="https://github.com/llvm/llvm-project.git" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project.git</a><br>
  HEAD branch: main<br>
<br>
Or do I misunderstand that display?<br></blockquote><div><br></div><div>This is querying the remote to get the current remote state, i.e. what is set when you clone. This does not show the local state, you can try: <i>cat .git/refs/remotes/origin/HEAD</i></div><div>Then run <i>git remote set-head origin main</i> and check again.</div><div>You can also run <i>git remote set-head origin -a</i> instead, it'll query the remote the same way as you see with <i>git remote show origin</i> and set it to main as well.</div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
At 12/28/2020 01:41 PM, Mehdi AMINI wrote:<br>
>On Mon, Dec 28, 2020 at 10:30 AM Paul C. Anagnostopoulos <<mailto:<a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>><a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>> wrote:<br>
>At 12/28/2020 12:52 PM, Mehdi AMINI wrote:<br>
><br>
>>On Mon, Dec 28, 2020 at 9:47 AM Paul C. Anagnostopoulos <<mailto:<a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>><a href="mailto:paul@windfall.com" target="_blank">paul@windfall.com</a>> wrote:<br>
>>Oh, sorry, my original message was wrong. The 'git log origin...' showed only the first commit, the one I wanted to push. It was a 'git log --oneline 10' that showed this:<br>
>><br>
>>48dfad4d2e7b (HEAD -> main, bang) [TableGen] Fix bug in !interleave operator<br>
>>496fb70b141c (origin/main) [MachO] Fix enum-int mismatch warning<br>
>>e73f885c988d (origin/master, origin/HEAD) [PowerPC] Remove redundant<br>
>>  Ã‚  COPY_TO_REGCLASS introduced by 8a58f21f5b6c<br>
>>c3b9d85bd4b7 [clang-tidy][NFC] Remove unnecessary headers<br>
>>...<br>
>><br>
>>What I don't understand is the "origin/master, origin/HEAD' part. What is going on there?<br>
>><br>
>>These in parenthesis are indicating the head of each branch, local or remote.<br>
><br>
>Yes, but why doesn't origin/HEAD point to the same commit as origin/main? <br>
><br>
>origin/HEAD is set locally to the default remote branch at the time you clone the repo. In a fresh clone it'll point to origin/main.<br>
>You can change it with: git remote set-head origin main<br>
<br>
</blockquote></div></div></div></div></div></div>