Skip to content

Instantly share code, notes, and snippets.

@stonyw
Last active June 15, 2016 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stonyw/8cf02707dc358142c67c to your computer and use it in GitHub Desktop.
Save stonyw/8cf02707dc358142c67c to your computer and use it in GitHub Desktop.
My global git config file
# Git branch autocomplete
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/shell/git-completion.bash
if [ -f ~/shell/git-completion.bash ]; then
. ~/shell/git-completion.bash
fi
# Show git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
#!ini
[user]
name = <Your name for all git repos>
email = <Your email for all git repos>
[alias]
co = checkout
newbr = checkout -b
go = checkout
godev = checkout dev
gomaster = checkout master
ci = commit -v
st = status
br = branch
ps = push
sm = submodule
mg = merge --no-ff
mgnoff = merge --no-ff
mgff = merge
df = diff
dfc = diff --cached
oneline = log --pretty=oneline --since='2 days ago'
onelog = log -p -1
tree = log --graph --oneline
unstage = reset HEAD --
update = pull -v
last = log -1 HEAD
[color]
status = auto
branch = auto
ui = auto
[core]
excludesfile = ~/.gitignore
# https://github.com/github/gitignore
# Mac
*.DS_Store
.AppleDouble
.LSOverride
*~
*.lock
*.swp
*.out
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Dropbox settings and caches
.dropbox
.dropbox.attr
.dropbox.cache
# DartEditor
.project
.buildlog
# Eclipse
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# Eclipse Core
.project
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# JDT-specific (Eclipse Java Development Tools)
.classpath
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Mono Developer
#User Specific
*.userprefs
*.usertasks
#Mono Project Files
*.pidb
*.resources
test-results/
# SublimeText
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# sftp configuration file
sftp-config.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
# Textmate
*.tmproj
*.tmproject
tmtags
# VisualStudioCode
.vscode
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment