Skip to content

Instantly share code, notes, and snippets.

@ericsampson
Created March 19, 2021 16:04
Show Gist options
  • Save ericsampson/27ce09bf92758fcfb674c2b0383d06ea to your computer and use it in GitHub Desktop.
Save ericsampson/27ce09bf92758fcfb674c2b0383d06ea to your computer and use it in GitHub Desktop.
Git tips and tricks
1) Viewing only main/master "linear commit history" as if you'd done squash merges, while actually using merge commits in order to maintain feature branch commit history:
https://stackoverflow.com/questions/60796729/keep-commits-in-feature-branch-after-squash-merge-to-master
https://marcgg.com/blog/2015/08/04/git-first-parent-log/
2) Ignoring local changes to file:
git update-index --skip-worktree $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment