Guest User

Untitled

a guest
Oct 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # コンフリクトしたときの --theirs と --ours
  2.  
  3. よく忘れるやつ
  4.  
  5. ## merge
  6.  
  7. ```sh
  8. $ git checkout branch_b
  9. $ git merge branch_a
  10.  
  11. # branch_a の内容を一方的に取り込みたい
  12. $ git checkout --theirs [file]
  13.  
  14. # branch_b の内容を一方的に取り込みたい
  15. $ git checkout --ours [file]
  16. ```
  17.  
  18. ## rebase
  19.  
  20. ```sh
  21. $ git checkout branch_b
  22. $ git rebase branch_a
  23.  
  24. # branch_a の内容を一方的に取り込みたい
  25. $ git checkout --ours [file]
  26.  
  27. # branch_b の内容を一方的に取り込みたい
  28. $ git checkout --theirs [file]
  29. ```
Add Comment
Please, Sign In to add comment