0
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 3 years have passed since last update.

コマンドで、Githubへ最初のpushを行うまで

Last updated at Posted at 2020-05-25

ローカルで作ったプロジェクトを最初にプッシュするまで

1、Githubでリポジトリの作成

下記のとおり作成
image.png

2、初期化

cd で対象のフォルダ下まで移動して、下記

$ git init

# 初期化しました。と表示されます。
Reinitialized existing Git repository in /Users/hogehoge

3、待機用リポジトリに追加

同じく対象のフィルダ下で。

$ git add -A

4、コミット

$ git commit -m "first commmit"

5、プッシュ

Github上でリポジトリのURLをコピー
image.png

同じく対象のフィルダ下で下記の通りプッシュ(URLの箇所は変更してください)

$ git remote add origin git@github.com:kaijuayako/sample.git
$ git push -u origin master

完了!

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