1.1 KiB
Git Usage
When NOT to manually resolve merge conflicts
When it is an automatically generated file!
For composer.lock
, for example:
rm composer.lock
ddev composer update
git add composer.lock
git commit
Bringing feature branches into main
It is OK to do git merges rather than rebase on top of the main branch, especially when in the GitLab UI where merge is the only option— but be absolutely certain "Squash commits" is not checked.
Discussion
Hmm git GUIs would show all the commits in the branch they were worked on when there are merge requests, right? (if not squashed?) Maybe better to prefer merges than rebases for feature branches, for preserving the history of where the work was done. My problem with git merge commits is they can rewrite history inside them, like have changes not shown in any other commit, and they make it hard to see what happened— does not show up in git log -p for instance. (You can see the history but if the stack overflow explanation does not fit on one page i don't want it as part of my daily workflow. https://stackoverflow.com/a/40986893/1028376 )