IMPORTANT: Git branch master is now main
Hi all, we have made a lot of changes today to make sure that our git repositories are no longer using 'master', but 'main' as their main and development branch. Some small changes are required to make things work again: Translators If you have any bookmarks for translating, you might need to adapt them to the new branch name: https://translate.koha-community.org/projects/koha/main/ git repositories Please note that this change doesn't only affect the Koha repository, but also our side project and tool repositories. In your local repositories you will want to rename the local branch to main and then set it to track main in the upstream repository: git config --global init.defaultBranch main git branch --move master main git branch -u origin/main git pull koha-testing-docker Switch the repository over to use main as detailed above. Edit your .env file and replace every occurrence of master with main, especially within the KOHA_IMAGE line. Run ktd pull to pull the new images. RMaints and RM release-tools: Edit etc/user.yaml and replace 'master' with 'main' in line 4. If you encounter any issues, please let us know! Many many thanks to everyone who has helped today to make this possible on short notice! Katrin
Kia ora! Thanks for the heads up! Den 19.04.2024 16:41, skrev Fischer, Katrin via Koha-devel:
Please note that this change doesn’t only affect the Koha repository, but also our side project and tool repositories. In your local repositories you will want to rename the local branch to main and then set it to track main in the upstream repository:
git config --global init.defaultBranch main
git branch --move master main
git branch –u origin/main
git pull
I did the above, but got this: ~/code/kohaclone (master)$ git config --global init.defaultBranch main ~/code/kohaclone (master)$ git branch --move master main ~/code/kohaclone (main)$ git branch –u origin/main fatal: Not a valid object name: 'origin/main'. ~/code/kohaclone (main)$ git pull remote: Enumerating objects: 667, done. remote: Counting objects: 100% (667/667), done. remote: Compressing objects: 100% (236/236), done. remote: Total 545 (delta 364), reused 435 (delta 289), pack-reused 0 Receiving objects: 100% (545/545), 132.56 KiB | 161.00 KiB/s, done. Resolving deltas: 100% (364/364), completed with 104 local objects. From https://git.koha-community.org/Koha-community/Koha * [new branch] main -> origin/main Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched. I had this in .git/config: [branch "main"] remote = origin merge = refs/heads/main And had to change it to this, to make it work: [branch "main"] remote = origin merge = refs/heads/master Best regards, Magnus
The `git branch -u origin/main` command should come after a `git fetch` or `git pull` so that your git is aware of the remote branch change. Changing it by hand in the .git/config file as you have done should be fine too. On Mon, Apr 22, 2024 at 12:47 AM Magnus Enger via Koha-devel < koha-devel@lists.koha-community.org> wrote:
Kia ora!
Thanks for the heads up!
Den 19.04.2024 16:41, skrev Fischer, Katrin via Koha-devel:
Please note that this change doesn’t only affect the Koha repository, but also our side project and tool repositories. In your local repositories you will want to rename the local branch to main and then set it to track main in the upstream repository:
git config --global init.defaultBranch main
git branch --move master main
git branch –u origin/main
git pull
I did the above, but got this:
~/code/kohaclone (master)$ git config --global init.defaultBranch main ~/code/kohaclone (master)$ git branch --move master main ~/code/kohaclone (main)$ git branch –u origin/main fatal: Not a valid object name: 'origin/main'. ~/code/kohaclone (main)$ git pull remote: Enumerating objects: 667, done. remote: Counting objects: 100% (667/667), done. remote: Compressing objects: 100% (236/236), done. remote: Total 545 (delta 364), reused 435 (delta 289), pack-reused 0 Receiving objects: 100% (545/545), 132.56 KiB | 161.00 KiB/s, done. Resolving deltas: 100% (364/364), completed with 104 local objects. From https://git.koha-community.org/Koha-community/Koha * [new branch] main -> origin/main Your configuration specifies to merge with the ref 'refs/heads/master' from the remote, but no such ref was fetched.
I had this in .git/config:
[branch "main"] remote = origin merge = refs/heads/main
And had to change it to this, to make it work:
[branch "main"] remote = origin merge = refs/heads/master
Best regards, Magnus _______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/
-- Michael Hafen Washington County School District Technology Department Systems Analyst
participants (3)
-
Fischer, Katrin -
Magnus Enger -
Michael Hafen