2 pages tagged with "git"
How to ignore files outside of a .gitignore
July 22, 2023 - 110 words - 1 mins
Summary
Some repositories have files you don't want to add to a .gitignore, but never want to open in your editor (e.g., image files for my blog).
When using the helix editor, this was a particular problem, as the default sort rendered *.jpg and *.png files early in the list for some reason.
A solut…
read more
Git rebase --onto
February 17, 2022 - 102 words - 1 mins
Squashed commits can pose a problem when there is a chain of branches, e.g.:
branch-1 targets main, contains commit A
branch-2 targets branch-1, contains commit A and commit B
Imagine that before merge, a subsequent commit is made in branch-1, so it is now A + C. Upon merge, this becomes A' on mai…
read more