Rename Git branch master to main


❯ git -v
git version 2.39.1

 

■ Delete local branch


git branch -d master

 

■ Rename local branch


git branch -m master main

 

■ Push the new branch, set local branch to track the new remote


git push -u origin main


git push --set-upstream origin main

 

■ Delete remote branch


git push origin :master


git push origin --delete master

I got this.


❯ git push origin :master
To https://github.com/your/project
 ! [remote rejected] master (refusing to delete the current branch: refs/heads/master)
error: failed to push some refs to 'https://github.com/your/project'

Switch default branch master to main at https://github.com/your/project

Rename Git branch master to main

 

■ Show status


❯ git status
On branch main
Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean

❯ git branch -a
* main
  remotes/origin/main

❯ git branch -l
* main

❯ git branch -r
  origin/main

 

■ Conclusion



Repository default branch
Choose the default branch for your new personal repositories. You might want to change the default name due to different workflows, or because your integrations still require “master” as the default branch name. You can always change the default branch name on individual repositories.


👉 GitHub - Settings - Repositories hatena-bookmark

👉 Managing remote repositories - GitHub Docs hatena-bookmark


QuickTime で簡単に「カット編集」できるとは!

👉 iMovieより早くて簡単! MacのQuickTimeで動画編集する方法 | ライフハッカー・ジャパン hatena-bookmark


⌘ (command) + Y   → カット
⌫ (delete)        → 削除

ということのようです。

iMovieより早くて簡単! MacのQuickTimeで動画編集する方法
👉 MacのQuickTime Playerのキーボードショートカットとジェスチャ - Apple サポート (日本) hatena-bookmark

実際は、動画前後の不要部分をトリムするだけなら、


⌘ (command) + T  → トリム

のほうが簡単です。



👉 Twitter 動画をツイートできず - 公式「YUV 4:2:0 ピクセルフォーマット にのみ対応しています」 hatena-bookmark


東京ガス 料金を確認する - my TOKYO GAS

「オール電化、ざまあ」とか言ってるけども、どうせガス料金も爆上げしますよね。

👉 東京ガス、むしろガス代を値下げしろって言いたくなるレベル(過去最高益)まで儲かってしまう : 市況かぶ全力2階建 hatena-bookmark

いまのうちに登録して見れる状態にしておきましょう。

東京ガス 料金 確認

👉 東京ガス hatena-bookmark

東京ガス 料金を確認する - my TOKYO GAS

👉 東京ガス : myTOKYOGAS hatena-bookmark

WEBから簡単に登録できます。

👉 電気料金 30% 値上げ を監視して節約する - 東京電力 くらしTEPCO web hatena-bookmark