Skip to content

Instantly share code, notes, and snippets.

@segfly
Last active April 26, 2016 15:35
Show Gist options
  • Save segfly/7efcc86f0b5015b0099b to your computer and use it in GitHub Desktop.
Save segfly/7efcc86f0b5015b0099b to your computer and use it in GitHub Desktop.
Git aliases and other configurations I like to apply to Cloud 9 workspaces
###### BEGIN Entries from http://git.io/vO5fH
[core]
# Allows the C9 editor to be used for git
# editor = c9 --wait
# Forces output direct to C9 terminal
pager = cat && echo
[alias]
# Visualize log. Thanks to http://stackoverflow.com/a/9074343
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%w(120)%C(bold blue)%h%C(reset) %C(bold yellow)(%ar)%C(reset) %C(auto)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%w(120)%C(bold blue)%h%C(reset)%C(auto)%d%C(reset)%n %C(bold yellow)(%ar)%C(reset) %C(dim white)%aD%C(reset) %C(dim white)- %an%C(reset)%n %C(auto)%s%C(reset)%n' --all
lg = !"git lg1"
# Clean and reset within Cloud 9 IDE
cleanall = clean -dfxe .c9/
cleanrst = !"git reset HEAD && git cleanall"
# Clobber's the current branch with a different branch
nukeit = merge -X theirs --no-ff --no-commit
# Various aliases
st = status
co = checkout
cob = checkout -b
pick = cherry-pick
rsth = reset --hard
rsts = reset --soft
bra = branch -vva
###### END Entries from http://git.io/vO5fH
@segfly
Copy link
Author

segfly commented Aug 6, 2015

To use in a Cloud9 workspace, run the following in a terminal:
wget -qO- http://git.io/vO5fH >> .git/config

@segfly
Copy link
Author

segfly commented Nov 24, 2015

To use with repo:
repo forall -c 'wget -qO- http://git.io/vO5fH >> .git/config'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment