[feature-request] Git resolve conflicts
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 18.1k
- Forks
- 1.2k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue proposes a new git-extras alias, git resolve-conflicts, around git pull origin main --rebase and exec! commands. First clarify the commit-message syntax, rebase behavior, and how commands such as yarn prettier . --write and yarn eslint --fix are identified. Done would mean the alias safely resolves only matching formatting commits and leaves other conflicts for manual resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100