Advertisement
Guest User

Untitled

a guest
May 29th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. In the case that you have a branch you want to merge that is giving a lot of conflicts, it's quite often that you trust all the commits in the branch to be merged and you want some kind of way to add those during the merge by default.
  2.  
  3. Here is one way to do that painlessly.
  4. ```bash
  5. git checkout my-branch
  6. git merge branch-you-want-to-merge
  7. ```
  8. At this point, there may be a bunch of conflicts. Run the following, rememberint the dot '.' when checking out.
  9. ```bash
  10. git checkout --theirs .
  11. git add -u
  12. git commit -m 'hip hip happy days'
  13. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement