-
Visualizations - See how different git operations work (in D3!)
-
GitKraken - git workflow manager with a graphical interface
-
oh-my-zsh - I really can't recommend this enough
-
iterm2-solarized - Get an elite hacker set-up for OSX
Tired of typing in your password constantly when pushing to Git? Start using SSH keys!
https://github.com/settings/keys
-
To generate an ssh-key on OSX, open Terminal and write:
ssh-keygen -t rsa -b 4096 -C "*your_email@example.com*"
-
You’ll be asked to give it a name and a password
-
The default name is
id_rsa
- stick with this for now -
id_rsa
andid_rsa.pub
will be saved to<your home folder>/.ssh
-
the . means the folder is invisible! You can list invisible files in terminal by writing
ls -a
-
id_rsa
is your private key! Keep it secret!
-
-
Type
pbcopy < ~/.ssh/id_rsa.pub
to copy your public key to your clipboard -
Go to https://github.com/settings/keys and choose New SSH key
-
Give it a name, then press Command + V to paste your public key
-
In Terminal, type
ssh-add -k ~/.ssh/id_rsa
and type in your password- You’ll need to do this every time you open Terminal (for now)
Now you can clone git repos using your SSH key!
# Instead of writing
git clone https://github.com/chufnagel/productivity-hacks.git
# You can write:
git clone git@github.com:chufnagel/productivity-hacks.git
# To change a repo to use SSH instead of HTTPS, you’ll need to run:
git remote set-url origin git@github.com:*USERNAME*/*REPOSITORY*.git
# To change a repo from using SSH to HTTPS, just write:
git remote set-url origin https://github.com/*USERNAME*/*REPOSITORY*.git
More info here: https://help.github.com/articles/changing-a-remote-s-url/
Check out the fix_github_https_repo.sh (also included in the repository)
Tired of writing out git commands? Make an alias!
-
In Terminal, type in
cd
to navigate to your home directory -
Write
touch .bash_profile
to create a bash profile -
Open up
.bash_profile
with your text editor of choice -
Add your aliases!
-
Reload Terminal to activate them. You can see your current aliases by typing in
alias
Aliases are awesome, but you should still know how git works and how to do these things on your own!
alias gcd="git checkout dev”
alias gcm="git checkout master”
alias gcb="git checkout -b”
alias gcmsg="git commit -m”
alias glud="git pull origin dev”
alias gpod="git push origin dev”
alias gpom="git push origin master”
alias gf="git fetch”
alias gfo="git fetch origin”
alias grbi="git rebase -i”
alias gcp="git cherry-pick”
Temporarily store all your uncommitted git changes:
git stash
Then bring them back (don’t wait too long):
git stash pop
See what will happen in a merge without commiting anything:
git merge --no-commit --no-ff branch-to-merge
GitKraken has a lovely interface and makes it much easier to visualize your commit history and perform some of the trickier git operations.
While GitKraken is incredibly nice, you should still know how to use git
-
Settings Sync - Move between computers and operating systems frequently? Take your configuration with you!
-
VS Live Share - Pair programming? Use this to launch a collaborative session!
-
VS Code Icons - Make it easier to navigate your project directory!
-
Power Mode - the most important extension of all