LoginSignup
2
2

コミット→プッシュ→マージ

Last updated at Posted at 2023-01-04

コミットまで

1.現在のブランチを確認

$ git branch

2.ブランチを切ってそのブランチに移動

$ git checkout -b (作成するブランチ名)

3.作業を行う

4.修正したファイルの確認

$ git status

5.ソースコードを確認

$ git diff

6.全てステージングに追加する

$ git add -A

7.コミットを行う

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

8.コミットログを確認

$ git log

プッシュをおこなう

1.githubへプッシュ

$ git push origin 現在のブランチ名

マージを行う

1.masterブランチに移動

$ git checkout master

2.masterブランチへマージ

$ git merge マージしたいブランチ名

3.リモートブランチの更新

$ git push origin master

githubを使ってマージした場合はローカルのmasterブランチを更新するため2,3は飛ばして以下コマンドを使用

git pull origin master

これの繰り返しで作業を行う。

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