You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes there are linting or formatting changes performed by tools, not humans. Conflicts with these changes can be automatically resolved by committing with a certain syntax in the commit message, and then re-running the command by parsing that syntax.
For example, you can commit like this:
Run yarn prettier . --write
Run yarn eslint --fix
When your co-worker's pr has merged which reformats the whole codebase, you could have a lot of conflicts.
A new git alias could help here: git resolve-conflicts
It will basically do some sort of git pull origin main --rebase but will additionally auto-resolve commits which have this Run ... syntax
It's almost like a git fixup/squash/amend commit, I probably have talked about this idea on stack overflow. Syntax could be:
exec! yarn prettier . --write
The text was updated successfully, but these errors were encountered:
Sometimes there are linting or formatting changes performed by tools, not humans. Conflicts with these changes can be automatically resolved by committing with a certain syntax in the commit message, and then re-running the command by parsing that syntax.
For example, you can commit like this:
yarn prettier . --write
yarn eslint --fix
When your co-worker's pr has merged which reformats the whole codebase, you could have a lot of conflicts.
A new git alias could help here:
git resolve-conflicts
It will basically do some sort of
git pull origin main --rebase
but will additionally auto-resolve commits which have this Run...
syntaxIt's almost like a git fixup/squash/amend commit, I probably have talked about this idea on stack overflow. Syntax could be:
The text was updated successfully, but these errors were encountered: