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のコマンド(クローン〜プルリク)

Last updated at Posted at 2021-07-16
チーム開発でgithubを使ったのでプルリクまでのコマンドをメモ

元のリポジトリからクローンしてくる

$ git clone (リポジトリのURL)

gitファイル初期化

$ git remote add (リポジトリ名) (リポジトリのURL)

gitアカウント認証

$ git config user.name (githubユーザ名)
$ git config user.email (githubに登録しているメールアドレス)

ブランチ作成

$ git branch (ブランチ名)

ブランチ一覧

$ git checkout

ブランチ移動

$ git checkout (ブランチ名)

リモートで加えた変更をローカルに反映させるとき

ファイルのステージング

$ git add (変更を加えたファイル名)

あるいは

$ git add .

変更内容の確認

$ git status

コミットメッセージ(変更の説明)の追加

$ git commit -m "(コミットメッセージ)"

ローカルへプッシュ

$ git push (リポジトリ名) (ブランチ名)

その後はプッシュしたリポジトリにブラウザでアクセスする。
pull requestタブの上部に
compare & pull requestボタンが出現しているのでそこをクリックし、変更内容をチェックして問題なければマージする。

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?