OpenUserJS.org icon indicating copy to clipboard operation
OpenUserJS.org copied to clipboard

Support github sync main branch

Open jeiea opened this issue 5 years ago • 2 comments

Github adopted main as default branch name. But it seems to cause 403 with the openuserjs github webhook sync feature. How about supporting it?

jeiea avatar Dec 04 '20 21:12 jeiea

Ref(s): (might be added to)

  • https://github.com/github/renaming
  • https://git-scm.com/docs/git-branch

Always cite when a change comes through like this.

This topic will be locked as I really don't want a P.C. debate here as it's not the focus of OUJS... however it will be continually considered provided the integrity of the site isn't compromised including all default upstream and downstream observations.

This would be a breaking change.


$ mkdir repotest
$ cd repotest/
$ git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
$ git --version
git version 2.32.0
$ date
Fri 18 Jun 2021 06:48:27 PM EDT

Ref(s):

  • #1791
  • #1840

Martii avatar Dec 05 '20 16:12 Martii

Well that foo'd a few things on GH (git specific) side:

git branch -m master main
git fetch origin ### FAILED AT THIS POINT
git branch -u origin/main main
git remote set-head origin -a

Manual edit of .git/config to change from master to main.... still trying to get my local clone working.... will report back... used git gui instead and it seems to have realigned with a remote-> fetch from -> origin

Martii avatar Sep 19 '26 20:09 Martii