facebook twitter hatena line email

「Git/rebase」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(hint: Pulling without specifying how to reconcile divergent branches isが出る場合)
(hint: Pulling without specifying how to reconcile divergent branches isが出る場合)
行24: 行24:
 
使う場合
 
使う場合
 
  $ git config pull.rebase true
 
  $ git config pull.rebase true
 
pull.rebaseの設定はgit全体に適用される。
 
  
 
参考:https://blog.agile.esm.co.jp/entry/git-warns-pulling-without-specifying-how-to-reconcile-divergent-branches
 
参考:https://blog.agile.esm.co.jp/entry/git-warns-pulling-without-specifying-how-to-reconcile-divergent-branches
行32: 行30:
  
 
trueを選択すると個別のリビジョンは排除され、マージリビジョンだけ登録される。
 
trueを選択すると個別のリビジョンは排除され、マージリビジョンだけ登録される。
 +
 +
以下のようにするととpull.rebaseの設定はgit全体に適用される。
 +
git config --global pull.rebase ture
  
 
==pull&mergeしたときにでるortとは==
 
==pull&mergeしたときにでるortとは==

2022年11月23日 (水) 19:04時点における版

rebaseとmerge

masterで、1,2、でcommitした後、developで、a,bでcommitした時

masterを元にして、developをmergeして取り込んだ時 古い順に、1,2,a,bとなる。

masterを元にして、developをrebaseして取り込んだ時 古い順に、a,b,1,2となる。

参考

https://qiita.com/KTakata/items/d33185fc0457c08654a5

git statusでpickやらでるとき

一旦もとに戻したい時、

rm -fr ".git/rebase-merge"

hint: Pulling without specifying how to reconcile divergent branches isが出る場合

Git 2.27.0 より出るようになってる。

分岐ブランチの対応方法をとして、rebaseを使う使わないを、選択すれば、解決する

使わない場合

$ git config pull.rebase false

使う場合

$ git config pull.rebase true

参考:https://blog.agile.esm.co.jp/entry/git-warns-pulling-without-specifying-how-to-reconcile-divergent-branches

falseを選択すると個別のリビジョンも登録され、マージリビジョンも登録される。

trueを選択すると個別のリビジョンは排除され、マージリビジョンだけ登録される。

以下のようにするととpull.rebaseの設定はgit全体に適用される。

git config --global pull.rebase ture

pull&mergeしたときにでるortとは

cherry-pickで同じリビジョンをもっていて、それをmergeしたときに出る以下メッセージ

Merge made by the 'ort' strategy.

リビジョンを持ってるので、そのままで問題ない。