Terminal
I've recently picked up an amazing Terminal shortcut: Ctrl + R. Gone are the days of hitting up arrow a bunch of times to get to a previous command. This little shortcut will let you search through your recent commands. Just start typing what you want and it pop it shows up.
Random Git commands
I recently watched Zach Holman's Git and GitHub Secrets and it had a bunch of great nuggets. It helps to be able to go back through his slides. Here are some of my favorites.
Github
Add
?w=1to any url to ignore whitespaceGists are repos
?in github to see all shortcutsSearch commits by author:
?author=holman
Git
Commitless Commits:
git commit -m "..." --allow-emptyStaging parts:
git add -pSearch commits:
git show :/queryGo back to previous selection:
cd -,git checkout -See which branches have been merged into current:
git branch --mergedSee which branches have not been merged:
git branch --no-mergedSee which branches contain a commit:
git branch --contains 838ad46Copy file without switching:
git checkout branch -- path/to/file.rb
git commit --amend -C HEAD- alias this!
git reset --soft HEAD^undoes the last commit and puts it on staging
There are a bunch more, so watch the video.
source Git and Github Secrets