3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GitHub Desktopは便利だけどできないこともある

Last updated at Posted at 2025-03-12

はじめに

参画先のWeb制作会社ではGitHubを使ってバージョン管理を行なっています。
普段GitHub Desktopを使って業務を行なっているのですが、今回新リポジトリを作ってバージョン管理をするにあたり、GitHub Desktopではできないことを改めて意識しました。

やろうとしたこと

・新リポジトリを作成
・ローカルにクローン
・新ブランチを作成
・作業
・作業内容をコミットしてmainブランチにマージ

やったこと

・新リポジトリを作成
GitHubのWebサイトで作成

・ローカルにクローン
GitHub DesktopでClone Repositoryして対応

・新ブランチを作成
GitHub Desktopでは【first commitしていないとできない】
→ターミナルで作成

・作業内容をコミットしてmainブランチにマージ
GitHub Desktopでコミット、Merge into Current Branchで対応

まとめ

GitHub Desktopでは、first commitをしないとDefault Branch以外のブランチを作成できないことがわかりました。
多くの場合は最初にサイトの内容をfirst commitすると思うので、できなくても差し支えはほとんどないかと思いますが。。。

なお、新ブランチがfirst commitしていないとできない混乱で「main(Default Branch)」の名前を変えてしまい、新しく「main」ブランチを作ってDefault Branchに変更しようとしましたが、これもGitHub Desktopではできませんでした。
Default Branchの変更はGitHubのWebサイトでしかできないようです。

参画先では顧客サイトの保守が中心で意識していませんでしたが、プロジェクトの立ち上げ時はGitHub Desktopに頼りすぎず、GitHubのWebサイトとコンソールで対応した方が変に混乱することがなさそうです。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?