Skip to content

Instantly share code, notes, and snippets.

@Iman
Created August 27, 2015 09:36
Show Gist options
  • Save Iman/a29184fe3b9cab83e5c9 to your computer and use it in GitHub Desktop.
Save Iman/a29184fe3b9cab83e5c9 to your computer and use it in GitHub Desktop.
Git profile + git info like svn info
alias gi='~/git-info.sh'
[core]
filemode = false
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[user]
name = Iman Samizadeh
email = iman@imanpage.com
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[color "diff"]
whitespace = red reverse
[core]
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
trustctime = false
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[branch]
autosetupmerge = true
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
dc = diff --cached
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lolc = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ls = ls-files
# Show files ignored by git:
ign = ls-files -o -i --exclude-standard
[push]
default = matching
#!/bin/bash
# author: Duane Johnson
# email: duane.johnson@gmail.com
# date: 2008 Jun 12
# license: MIT
#
# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496
pushd . >/dev/null
# Find base of git directory
while [ ! -d .git ] && [ ! `pwd` = "/" ]; do cd ..; done
# Show various information about this git directory
if [ -d .git ]; then
echo "== Remote URL: `git remote -v`"
echo "== Remote Branches: "
git branch -r
echo
echo "== Local Branches:"
git branch
echo
echo "== Configuration (.git/config)"
cat .git/config
echo
echo "== Most Recent Commit"
git —no-pager log —max-count=1
echo
echo "Type 'git log' for more commits, or 'git show' for full commit details."
else
echo "Not a git repository."
fi
popd >/dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment