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?

GitHub の新しいリポジトリをローカル(VScode)に追加

Posted at

GitHub の新しいリポジトリをローカルに追加する方法を書いておく(よく忘れるので)

うう.png

まずvscodeに追加するgithubのリポジトリのHTTPSを画像のところで取得しておく。
そしてターミナル上で

git init
git remote add origin https://github.com/your-username/your-new-repo.git

を実行する。「https://github.com/your-username/your-new-repo.git」 のところは各自変える。そして

git add .
git commit -m "Initial commit"

これはいつも通り

git branch -M main  # メインブランチを "main" に設定
git push -u origin main

で終了です。

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