0
0

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にリポジトリを新規作成する

Posted at

内容

ローカルにプロジェクトが作成済みでgithubにリポジトリを新規で作成したい。

プロジェクトのディレクトリへ移動

cd your-project

Gitを初期化

git init

ファイルをステージング

git add .

コミット

git commit -m "first commit"

GitHubにアクセスし、新しいリポジトリを作成(Web画面で空のリポジトリを用意)

リモートリポジトリを追加(下記コマンドはGitHubにリポジトリを作成した時に表示される。)

git remote add origin https://github.com/ユーザー名/リポジトリ名.git

プッシュ

git branch -M main
git push -u origin main

リポジトリを確認し、ファイルが追加されていることを確認する

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?