1
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?

More than 1 year has passed since last update.

【Github】ローカルリポジトリからリモートリポジトリへ初回コミット&プッシュ

Last updated at Posted at 2022-03-09

毎度githubの初回コミットでブランチをmasterと間違えたりと手間取るので自分用に備忘録。

空のコミットを行う

git init

git commit --allow-empty -m "first empty commit"

git remote add origin {url}

git push -u origin main

初期ファイルのコミットを行う

git add --all

git commit -m "first commit"

git push -u origin main
1
1
1

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
1
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?