[For developers] How to fix merge conflicts related to style formatting #2292
njzjz
announced in
Announcement
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In #2279, we started to format almost all of the codes, so it's possible that your PR is conflicting with the
devel
branch due to the new code formatting style. Here are some instructions to resolve the conflict you may encounter when merging your PR's branch with thedevel
branch.We assume that
origin
is an alias for the https://github.com/deepmodeling/deepmd-kit git repo or its ssh variant. You can confirm that on your end by checking the output of git remote -v.We recommend the following workflow:
git merge --abort
. If you weren't in the middle of a merge, this would fail withfatal: There is no merge to abort
. It's normal, and you can safely ignore this message.git fetch origin
This will import the config and deal with existing merge conflicts before formatting.
git commit -am "apply code formatting"
devel
:This should work without code-style-related conflicts.
Beta Was this translation helpful? Give feedback.
All reactions