Skip to content

Instantly share code, notes, and snippets.

@angrychimp
Last active May 7, 2022 21:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angrychimp/f0f73dba6fae9f346624ce3abf8d3ab1 to your computer and use it in GitHub Desktop.
Save angrychimp/f0f73dba6fae9f346624ce3abf8d3ab1 to your computer and use it in GitHub Desktop.
A collection of tools, scripts, browser extensions, etc. that I've found make my life easier.

Browser Extentions

Applications

  • Cacher
    • https://cacher.io
    • Tool for managing snippets and GitHub Gists (see web tools below)
  • Postman
  • Keybase
    • https://keybase.io
    • Secure messenger and file storage. Creates a method of establishing trust between people online, collaborating with those people, and storing secure content on your devices.

Scripts/Command-Line Utilities

Web tools

Git Tricks

  • Aliases
[alias]
    unstage = reset -q HEAD --
    discard = checkout --
    nevermind = !git reset --hard HEAD && git clean -d -f
    uncommit = reset --mixed HEAD~
    save = commit -m
    resave = commit --amend
    invert = revert
    last = log -1 HEAD --format=format:"%Cred%H"
    summary = status -u -s
    graph = log --graph -10 --branches --remotes --tags  --format=format:'%Cgreen%h %Creset• %<(75,trunc)%s (%cN, %ar) %Cred%d' --date-order
    history = log -10 --format=format:'%Cgreen%h %Creset• %s (%cN, %ar)'
    clg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
    branchout = checkout -b
    tags = tag
    branches = branch -a
    stashes = stash list
    remotes = remote -v
    prestage = diff -w --word-diff=color
    precommit = diff --cached -w --word-diff=color --word-diff-regex='[^[:space:]<>]+'
    move = mv
    remove = rm
    unmerged = branch --no-merged
    unstash = stash pop
    what = show -w
    untrack = rm -r --cached
    rewrite = rebase -i
    amend = commit --amend
    back = checkout "-"
    contributors = shortlog -s -n
    filetrail = log --follow -p -w
    mergetrail = log --ancestry-path --merges
    unmerged = diff --name-only --diff-filter=U
  • Command Prompt Modifications
sudo curl -s -o /etc/profile.d/git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
sudo curl -o /etc/profile.d/git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
# add to ~/.bash_profile:
export PS1="$PS1 $(__git_ps1 " (%s)")"

Links

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