kmubiin / suaikata

Koleksi ringkas kosa kata
Other
2 stars 1 forks source link

GitHub akan menukar nama dahan utama pada awal 2021 #40

Closed kmubiin closed 3 years ago

kmubiin commented 4 years ago

Berdasarkan kenyataan rasmi di github/renaming bertarikh Jul 21, 2020, 3:14 PM GMT, iaitu 21 jam yang lalu pada masa ini:

GitHub is gradually renaming the default branch of all our repositories from master to main. We're committed to making the renaming process as seamless as possible for project maintainers and all of their contributors [...]

Some projects on GitHub have already renamed their default branch. As a result, any links to those projects that contained the old branch name would previously have been broken [...] If you haven’t moved yet, we recommend not moving right now, and waiting until later this year. We’re investing in tools to make the renaming the default branch of an existing repository a seamless experience for both maintainers and contributors [...]

We’re using main for our newly-created repositories and for the repositories we’re moving now [...] One month after the new settings are available in GitHub.com, we will set the default to main for any user or organization that hasn't chosen a default branch for new repositories [...]

Pendek kata, para pengguna GitHub tidak perlu berbuat apa-apa dan hanya perlu menunggu.

21 Dec 2020: Ada kemas kini pada sebahagian kenyataan rasmi pada Dec 17, 2020, 3:51 PM GMT, iaitu 4 hari lepas pada masa ini:

Beginning in January 2021, we'll begin rolling out functionality to make it easier to rename the default branch of an existing repository [...]

12 Jan: Tidak pasti sejak bila, baru perasan ada ikon pensel ditambah di hujung baris nama dahan. Perlu besarkan tetingkap pelayar web untuk melihat semua ikon. Mungkin tidak kelihatan bagi paparan mudah alih (mobile), dan hanya paparan penuh (desktop).

Rename master to: <BRANCH> Most projects name the default branch main

Renaming this branch: o Will update the GitHub Pages source branch. x Will not update your members' local environments.

Your members will have to manually update their local environments. We'll let them know when they visit the repository, or you can share these commands:

git branch -m master <BRANCH>
git fetch origin
git branch -u origin/<BRANCH> <BRANCH>

17 Jan: Dahan bertukar nama dari "master" ke "asal". Salinan output daripada localhost:

$ git branch
* master
$ git branch -m master asal
$ git branch
* asal
$ git fetch origin
From https://github.com/kmubiin/suaikata
 * [new branch]      asal            -> origin/asal
 * [new branch]      salinan-74857e9 -> origin/salinan-74857e9
$ git branch -u origin/asal asal
Branch 'asal' set up to track remote branch 'asal' from 'origin'.

Garis perintah tambahan untuk perbetul rujukan origin/HEAD di localhost:

$ man git-symbolic-ref 
$ git symbolic-ref HEAD
refs/heads/asal
$ git symbolic-ref refs/remotes/origin/HEAD
refs/remotes/origin/master
$ git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/asal  # betulkan ke dahan 'asal'
$ git branch -a
* asal
  remotes/origin/HEAD -> origin/asal
  remotes/origin/asal
  remotes/origin/cubaan
  remotes/origin/master
  remotes/origin/salinan-74857e9

25 Jan: Cubaan awal padam dahan terabai. Acah terlebih dahulu sebelum padam dahan 'master' dan salinannya. Selesai padam.

$ git branch -D origin/master
error: branch 'origin/master' not found.
$ git push --delete origin master
error: unable to delete 'master': remote ref does not exist
error: failed to push some refs to 'https://github.com/kmubiin/suaikata.git'

$ man git remote
$ git remote prune --dry-run origin
Pruning origin
URL: https://github.com/kmubiin/suaikata.git
 * [would prune] origin/master
$ git remote prune origin
Pruning origin
URL: https://github.com/kmubiin/suaikata.git
 * [pruned] origin/master

$ git branch -D origin/salinan-74857e9
error: branch 'origin/salinan-74857e9' not found.
$ git push --delete origin salinan-74857e9
To https://github.com/kmubiin/suaikata.git
 - [deleted]         salinan-74857e9
$ git branch -a
* asal
  remotes/origin/HEAD -> origin/asal
  remotes/origin/asal
  remotes/origin/cubaan

Bagi projek suaikata, selepas nama dahan ditukar, kemas kini tambahan akan dibuat pada tetapan Jekyll (docs/_config.yml) dan terbitan baharu akan ditanda (N.YY.MMDD). Barangkali tiada kemas kini yang penting sesudah itu.

Isu ini adalah sekadar rujukan dan boleh ditutup apabila selesai menukar nama dahan dari master ke nama baharu (selain main?) pada awal Januari 2021.


Dirancang: Aturan menukar nama dahan projek suaikata, setakat ~12 Jan~ 17 Jan.