In a local git repo, I was working on a branch. I had to merge with main. During the merge I wanted the changes made in my branch to be prioritized over any changes in main. On some projects, I'm just an arrogant sod that way.
This is the git command that merged branch, main, with my current branch and prioritizes the. current branch with the merge:
git merge -s ours main
The result of the following command will be to:
- Ignores all changes from branch, main.
Keeps all the changes from the current branch which means any changes made to the main branch will be discarded.
No comments :
Post a Comment