LoginSignup
1
2

More than 1 year has passed since last update.

ローカルブランチを新規ブランチとしてプッシュしたいとき

Last updated at Posted at 2020-10-13

環境

  • SourceTree

やりたいこと

ローカルにあるブランチを、新規ブランチとしてリモートにプッシュしたい。
コマンドはできればギリギリまで触れたくない。

手順

大元にしたいブランチをチェックアウト
image.png

チェックアウトするときに名前を変えておく
(masterのままだと新規ブランチにできないので)
image.png

SourceTree上のUI操作では新規ブランチとしてプッシュできないので
ターミナルを起動
image.png

コマンドでプッシュ
$ git push origin master_test
image.png


フェッチすると
image.png

新規ブランチとして作成されている
image.png



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