Skip to content

Latest commit

 

History

History
61 lines (38 loc) · 877 Bytes

2018-09-27.md

File metadata and controls

61 lines (38 loc) · 877 Bytes

27 September 2018

or, Hands on with git

Three typical ways to use git:

ask what folks use

Finding stuff in history

git log --grep
git log -S (pickaxe)
git log -G (pickaxe)
git log --pickaxe-regex
git log --author

Building up commits piece-by-piece

Concepts:

  • Working tree/directory

  • Stage

    git add --patch git add --intent-to-add # aka: -N

Staging individual files Staging chunks of files (diff hunks) Staging individual lines

Setting git editor

git config --global core.editor "atom --new-window --wait"

Cleaning up commits

git rebase --interactive
git reset --patch

git commit --amend
  • pick ...
  • reword ...
  • fixup ...
  • squash ...
  • edit ...

bisect

start good vs. bad run (automated) stop