0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Git Rebaseでconflictしたら rebase元 (or 自分のbranch) を優先してrebaseを実行する

Last updated at Posted at 2025-02-16

コマンド

conflictしたら自分のbranchを取り込む

git rebase <rebase元> -s recursive -X ours

ours

This option forces conflicting hunks to be auto-resolved cleanly by favoring our version. Changes from the other tree that do not conflict with our side are reflected in the merge result. For a binary file, the entire contents are taken from our side.

conflictしたらrebase元を取り込む

git rebase <rebase元> -s recursive -X theirs

theirs

This is the opposite of ours; note that, unlike ours, there is no theirs merge strategy to confuse this merge option with.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?