Good Practice Working with Base Project
March 21, 2023•104 words
Regular Git commands in a project with only origin
remote:
git merge
# Fix conflicts
git commit
However, when working with base project, there are the same files of different contents which lead to conflicts always when merge in to origin. The good practice is to use --no-commit
and --abort
with Git merge:
git merge base/dev --no-commit
# Total falure?:
git merge --abort
# Ok? checkout files supposed to be different:
git checkout [FILES]
# Fix other conflicts and:
git commit
Avoid merge back to base project, copy-paste to base if necessary, and base is merge out only, for safety.