LoginSignup
0
0

More than 1 year has passed since last update.

git初ブランチまで

Posted at

今後git○○が出てくるときは、VSCodeのターミナルで操作しているとします。

1. 現在のbranchを確認する

git branch -a

2. git branch 好きな名前 でbranchを制作する。(今回のbranch名はobjectとする)

git branch object

3. 新しいbranchにコミットを追加していくために、新しいbranchに移動

git checkout object

ちなみに、2. 3.を同時に行うこともできます。

git checkout -b object

4. 変更したファイルすべてをcommitする

git add *
git commit -m "commit to new branch !!"

5. commitしたファイルをリモートブランチにpushする

git push origin object
//(objectとは今回作成したbranch名)
or
git push origin HEAD
//(HEADとは現在いるbranchのこと)
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