Attribution: These instructions are borrowed from bobthecow.
By far the easiest way to install both Git and git-completion is via Homebrew, so you should pick that one.
| ;;; OSX specific settings | |
| ;;; Borrowed heavily from https://github.com/rejeep/emacs | |
| (defun live-copy-from-osx () | |
| (shell-command-to-string "pbpaste")) | |
| (defun live-paste-to-osx (text &optional push) | |
| (let ((process-connection-type nil)) | |
| (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) | |
| (process-send-string proc text) |
| alias fixssh='eval $(tmux showenv -s SSH_AUTH_SOCK)' | |
| Or for tmux that does not have showenv -s: | |
| alias fixssh='export $(tmux showenv SSH_AUTH_SOCK)' |
| import os, sys, IPython | |
| print(os.environ['VIRTUAL_ENV']) | |
| print(sys.executable) | |
| print(IPython.__file__) | |
| print(sys.path) |
| #!/usr/bin/env python | |
| import sys | |
| import subprocess | |
| diff_requirements = 'git diff ORIG_HEAD HEAD --exit-code -- requirements.txt' | |
| exit_code = subprocess.call(diff_requirements.split()) | |
| if exit_code == 1: | |
| print 'The requirements file has changed! Remember to install new dependencies.' | |
| else: |
| alias ga='git add' | |
| alias gp='git push' | |
| alias gpu='git pull' | |
| alias gs='git status' | |
| alias gd='git diff' | |
| alias gds='git diff --staged' | |
| alias gm='git commit -m' | |
| alias gc='git checkout' |
Tips for using less on the command line.
To navigate:
To search:
Set which editor git should use.
This is the program that will open during a commit with no -m flag, a merge, a rebase, etc...
Select from any installed editor. Examples:
emacsvi or vimSet up a pretty git log
run:
git config --global alias.lg "log --graph --pretty=format:'%C(auto)%h -%d %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
to use:
git lg
A collection of random articles, videos and other links to stuff, re-posted from our slack channel and other places.
Guide: Use structured interviewing https://rework.withgoogle.com/guides/hiring-use-structured-interviewing/steps/introduction/
Five Reasons Why You Should Hire an Old Programmer