開発者エリア/Gitデフォルトブランチを「master」から「main」に切り替える: Difference between revisions
From Mahara Wiki
(Created page with "作成中です - ~~~ On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purp...") |
No edit summary |
||
Line 2: | Line 2: | ||
On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purposes need to make a few changes so as to push code correctly to Gerrit. | On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purposes need to make a few changes so as to push code correctly to Gerrit. | ||
2021年10月14日、私たちはメインGitブランチを「master」から「main」に切り替えました。すでに開発目的でローカルのMaharaインスタンスを動作させている場合、Gerritにコードを正しくプッシュするため、いくつか変更する必要があります。 | |||
== Change your local setup to point to the new branch== | == Change your local setup to point to the new branch== |
Revision as of 07:23, 22 Mayıs 2022
On 14 October 2021 we switched the main Git branch from 'master' to 'main'. Those that already have a local Mahara instance running for development purposes need to make a few changes so as to push code correctly to Gerrit. 2021年10月14日、私たちはメインGitブランチを「master」から「main」に切り替えました。すでに開発目的でローカルのMaharaインスタンスを動作させている場合、Gerritにコードを正しくプッシュするため、いくつか変更する必要があります。
Change your local setup to point to the new branch
The following instructions are taken from 'How to change your master branch to main in Git
# Switch to the "master" branch: $ git checkout master # Rename it to "main": $ git branch -m master main # Get the latest commits (and branches!) from the remote: $ git fetch # Remove the existing tracking connection with "origin/master": $ git branch --unset-upstream # Create a new tracking connection with the new "origin/main" branch: $ git branch -u origin/main
For good measure, run
git pull
once done just to get the latest code.
Update the Gerrit hook
- Open the file 'post-checkout' in '.git/hooks'.
- Find 'master' and change it to 'main'.
- Save the file.