LoginSignup
11
7

More than 5 years have passed since last update.

[GitHub]branchを生やす元を間違えたままcommitしてしまった時の対処法

Last updated at Posted at 2015-12-18

本来masterから生やす予定だったbranchを、間違ったbranchから生やしてしまったままcommitしてしまった時の対処法。

git rebase --onto master <派生元branch名> <現在のbranch名>

これでbranchの派生元をmasterに切り替えることができます。

参考:
git rebase --onto で派生元ブランチの変更 - northaven
git - Rebase on github branch - Stack Overflow

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