Back to Blog

Helpful Git Commands and Mac Shortcuts

A collection of my useful shortcuts and Git commands

Mac Shortcuts

Show Hidden Files: ⌘command + shift + .

Command Line

Pull in changes to master into working branch:

git pull --rebase origin master
git push origin [yourBranchName] --force

Interactive Rebase

git rebase -i HEAD~3
Commands:
* p, pick = use commit
* r, reword = use commit, but edit the commit message
* e, edit = use commit, but stop for amending
* s, squash = use commit, but meld into previous commit
* f, fixup = like "squash", but discard this commit's log message
* x, exec = run command (the rest of the line) using shell
git push origin [yourBranchName] --force

ES Lint

// eslint-disable-line no-console

Kill all node processes

killall node