LoginSignup
0
0

More than 3 years have passed since last update.

git コマンド一覧(簡易版)

Last updated at Posted at 2020-01-16

git push するまでの一連の流れ

ブランチ一覧

$ git branch

※ ブランチ一覧・現在自分がいるブランチを確認できる。

ブランチ作成

$ git branch { ブランチ名 }  //ブランチを作成
$ git checkout { ブランチ名 }  //作成したブランチに移動
            or
$ git checkout -b { ブランチ名 }  //ブランチ作成・移動(便利!)

※ master or develop ブランチ(親)から、新しいブランチを作成する

作成したブランチで作業開始!

作業が終了したら....

更新までの流れ

$ git add .  //変更を追加
$ git commit "{ コメント }"  //コミット
$ git push origin {自分のブランチ名} //pushして更新

※ git commit のコメントは どのような事をしたか、コメントを記載する(1行で)
※ ローカルの変更をリモートに反映(更新)する為にpushをする

その後は...
・プルリク作成
・レビューをしてもらう
・ファイル修正  などなど。

また、新しい作業を行う時は、
・master or develop(親) ブランチに移動
・git pull して最新の変更を取り込む
・新しいブランチを作成
という流れになる。

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