[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `master` is now `main`
From: |
Pankaj Jangid |
Subject: |
Re: `master` is now `main` |
Date: |
Sat, 19 Dec 2020 12:47:27 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> For `nongnu.git` the new branch is a "fast-forward" of the old branch,
> so all it takes is:
>
> git branch -set-upstream-to=origin/main
> git merge
Worked. My ‘master’ is now tracking origin/main.
> For `elpa.git` OTOH the new branch doesn't share any history with the
> new one, so you'll need something like:
>
> git checkout -b main origin/main
$ git checkout -b main origin/main
$ git pull
$ git checkout master
$ git pull
fatal: refusing to merge unrelated histories
> If you have local changes, you'll want to `git stash` before doing that
> and `git stash pop` afterwards and it will likely give you non-trivial
> conflicts to resolve. Don't hesitate to ask if you need help resolving
> such conflicts.
>