LoginSignup
3
4

More than 5 years have passed since last update.

git branchの備忘録

Posted at

ローカルリポジトリにブランチの作成

git branch <branchname>

リモートリポジトリにブランチを追加

git push origin <branchname>

ブランチ一覧表示

git branch
※ -a オプションを付けると、リモートブランチも含めたブランチの一覧表示

ローカルブランチの切り替え

git checkout <branchname>

リモートブランチの切り替え

git checkout -b <branchname> origin/<branchname>

ブランチの削除

git branch -d <branchname>

ブランチ名の変更

git branch -m <oldbranch> <newbranch>

3
4
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
3
4