[llvm-dev] [cfe-dev] Renaming The Default Branch

Mehdi AMINI via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 3 12:41:58 PST 2020


On Thu, Dec 3, 2020 at 9:51 AM Mike Edwards via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
>
> On Wed, Dec 2, 2020 at 5:31 PM Paul C. Anagnostopoulos via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> Could you include instructions for us not-so-git-savvy folks that explain
>> what we have to do locally? I know I have to rename my master branch. Do I
>> have to do anything else?
>>
>>
> Sorry Paul, my apologies for not responding to you earlier.  I know there
> are many different ways in git to accomplish the same goal.  This is the
> method I plan on using to update my local working copy of the repository:
>
> In my local llvm-project directory:
> $ git fetch origin
> $ git checkout origin/main -b main
>
> When you are ready to remove your local 'master' branch run:
> $ git branch -d master
>
> If someone else reading this would please peer review this,  I would
> appreciate the assistance.  If I can get a LGTM from someone I will add
> these steps to the webpage as well.
>

This should work, after you cherry-pick whatever is left in the master
branch. To carry-over the current local master branch "as-is", you can also
just rename the master branch locally and update the tracking:

# if not already on the master branch
$ git checkout master
# Rename the branch locally
$ git branch -m main
# Update the tracking so that `git pull`/`git push` lookup the remote main
$ git branch -u origin/main

-- 
Mehdi



>
>
> Thanks,
> Mike
>
>
>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201203/ff07f9a1/attachment.html>


More information about the llvm-dev mailing list