I am trying to merge my UAT1 branch into MASTER branch and when I resolved all the conflicts, the files that were generated had .bak and .orig extensions. I looked at questions on here that refer to .orig file and learned that it's okay to remove them, however, what files do I commit? If I remove all the .bak and .orig files then there will be no files to commit hence all the files I merged will be gone.
I use winmerge as my mergetool.
Files with .bak
or .orig
extensions shouldn’t be committed in version control.
To ignore the .bak
and .orig
files during merge, you can use below steps:
*.bak
and *.orig
in .gitignore
.Change mergetool.keepBackup option for git config as false
git config --global mergetool.keepBackup false
Now if you execute git status
during merging, there will only show the changes for the files which states are changes to be committed and changes not staged for commit.
.java
file (changes to be committed state) into master
branch, you can execute git commit
to finish the merge..java
(changes to be committed state), .gitignore
and xx.xx.xx.xx.component
(changes not staged for commit state) into master
branch, you can execute git commit -a
to finish the merge.