Re: [Koha-devel] IMPORTANT: Git branch master is now main

2024-04-22 Thread Michael Hafen via Koha-devel
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
___
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/


Re: [Koha-devel] IMPORTANT: Git branch master is now main

2024-04-22 Thread Magnus Enger via Koha-devel

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/