Friday, May 20, 2022

Code & Coffee - 4/29/2022

Code & Coffee - 4/29/2022

 Topic: "Git Tips & Tricks"


  • The first tip came even before we started:
    • "I won't be able to make it tomorrow but I'm sure Dave will bring up many of my favorites, but in case he doesn't, git worktree, git restore, patch mode, git add -N/--intent-to-add ........"
    • git worktree:
    • git restore:
    • Patch mode:
    • git add -N/--intent-to-add ......
      • Inform git that you will be adding a path in the future, this allows you to see the files in the directory when running git status and seeing diffs with git diff.
      • Docs: https://git-scm.com/docs/git-add#Documentation/git-add.txt--N
  • Squashing commits
    • it is part of git merge, dig up docs
  • Signing commits
    • why and how
  • git bisect
    • use case and how to use it
    • it has a mode where you can pass in a script and it will automatically find the issue
  • "Arlo's git notation"
    • find a link
    • commit message prefix indicates the nature of the commit
  • Git log
    • show only merges
  • Git garbage collection
    • what it is for and how it works
    • oops checked in node_modules again
    • oops that password shouldn't have been in there.
  • Pre-commit hooks/hooks in general
    • vulgarity checker.... or maybe just runs the tests and linter
  • Interactive add
    • see git add -N
    • -P will get straight to patch mode without the menu
    • many commands that change the index support patch mode 
  • git reset -tests
  • git diff
  • dave's rebase strategy... 
    • heard only part of it, was in the other meeting already
    • git rerere - setting to help with repeated rebase resolution



No comments:

Post a Comment