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?

More than 3 years have passed since last update.

ターミナルを利用してPushまでの流れを紹介!
#Github#Push出来ない#Git#git#github#Push#commit#リポジトリ#ローカル#リモート#無理

⇨Pushができずにお困りの方へ、これを見れば必ずできるようになるはずです!

※注意
エラーが出たらまずはそれを調べてみよう。解決方法はすぐに見つかります!
⇨自分は英語が苦手なので、エラーを理解しないまま進めがち、、
 今後の為にも、エラーが出たらすぐ覚えちゃいましょう!

□基本的な流れ

①githubのサイトで新しくリポジトリを作成する

②ローカル(自分のパソコン内で管理するために作成したリポジトリ)上でpushしたいファイルに移動する

③「git init」でgitを初期化する(初回のみ)
⇨次にローカル環境でローカルリポジトリを作成する。

④「git add」でcommitする前に変更内容を一時的に保存する
⇨ファイルをインデックスに追加する(コミットの対象にする)

⑤「git commit」 でディレクトリの変更をローカルリポジトリに登録
⇨インデックスに追加した変更をリポジトリに記録する

⑥「git remote add origin[url]」でローカルリポジトリとリモートリポジトリを繋ぐ(初回のみ)
⇨リモートリポジトリを関連付けする
 Githiub上でリポジトリの作成を行いPushする際のURLを取得する

⑦「git push origin master」でローカルリポジトリのデータをリモートリポジトリに反映する

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?