LoginSignup
2
0

More than 5 years have passed since last update.

TortoiseGitで--allow-unrelated-histories を指定したい

Last updated at Posted at 2018-07-11

rejectエラーが出た時の--allow-unrelated-historiesオプションの指定ですが、CLIでのコマンドは書かれているものの、Tortoise Gitではどう指定すればよいの?というお話。

--allow-unrelated-histories

下記の記事が参考になりますが、マージする時に異なるツリーからマージしたい場合(Subtreeなど)に発生することが多いです。
https://qiita.com/takanatsu/items/fc89de9bd11148da1438

そういった場合に、--allow-unrelated-historiesを指定しろと口酸っぱく書かれていますが、TortoiseGitにはそんなオプションが存在しません。

で、結論

本来パスを指定する下記の赤枠部分に書いてしまえばOK。
root/function --allow-unrelated-historiesてな具合に。(パスの後のスペース忘れずに)

flame.png

これでマージかければ--allow-unrelated-historiesが指定可能です。

実はこんな方法も

下記のRejectエラーが出た時に、左下の"Merge unrelated history"ボタンを押しても同じ解決方法です。元々コマンドめんどい方の記事なので、こっちの方が楽かも。
image.png

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