This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.gun.io/blog/how-to-github-fork-branch-and-pull-request | |
# (run on local repo after forking) | |
# This step isn't absolutely necessary, but I find it very useful if you plan on working on this project for anything more than a very quick fix. Use the following commands to add the 'upsteam' (original project location) as a remote branch so that you can get their updates into your branch. Replace the 'upstreamname' and 'projectname' values with that actual user/project name that you're trying to track. | |
git remote add --track master upstream git://github.com/upstreamname/projectname.git | |
# This will add the original project as a remote named 'upstream'. To get the code, type: | |
git fetch upstream | |
# Then, to merge it into your own project, type: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.skip-ci '!git reset && COMMIT_MSG=`git show --format=format:%B -s` && git commit --allow-empty --amend -m "[skip ci] $COMMIT_MSG"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Go to iTerm Preferences → Profiles | |
2. select your profile, then the Keys tab | |
3. Find ⌥← and ⌥→ and set them to send escape sequence b and send escape sequence f respectively. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in terminal) | |
defaults write NSGlobalDomain KeyRepeat -int 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the below lines to ~/.bash_profile | |
# Show Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Taken from this page: http://code-worrier.com/blog/autocomplete-git/ | |
Step 1: download this bash script (make sure to name it ".git-completion.bash"): | |
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash. | |
You can run this curl from your home directory to download it directly: | |
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash | |
Step 2: Place the file in your home directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp /etc/rc.conf{,-old} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.lola "log --all --graph --decorate --pretty=oneline --abbrev-commit" |