3
4

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?