Skip to content
Browse files

Clean up gitconfig generator & add some settings.

  • Loading branch information...
1 parent 565272d commit b765b0e26d2c3408b234460bf7ad19e2391d8e69 @emmanuel committed
Showing with 27 additions and 26 deletions.
  1. +27 −26 gitconfig.tpl
View
53 gitconfig.tpl
@@ -1,38 +1,39 @@
#!/bin/bash
-[[ -z ${GIT_NAME+x} ]] && read -p "Your Name: " GIT_NAME
-[[ -z ${GIT_EMAIL+x} ]] && read -p "Your Email: " GIT_EMAIL
-[[ -z ${GITHUB_USER+x} ]] && read -p "GitHub Username: " GITHUB_USER
+[[ -z ${GIT_NAME+x} ]] && read -p "Your Name: " GIT_NAME
+[[ -z ${GIT_EMAIL+x} ]] && read -p "Your Email: " GIT_EMAIL
+[[ -z ${GITHUB_USER+x} ]] && read -p "GitHub Username: " GITHUB_USER
cat <<EOF
[user]
- name = $GIT_NAME
- email = $GIT_EMAIL
+ name = $GIT_NAME
+ email = $GIT_EMAIL
[core]
- excludesfile = $HOME/.gitignore
- editor = mate -w
-[color]
- diff = auto
- status = auto
- branch = auto
- interactive = auto
-[alias]
- st = status
- ci = commit
- br = branch
- co = checkout
- df = diff
- lg = log -p
- who = shortlog -s --
- slog = !git --no-pager log --format=oneline --abbrev-commit
- dfnp = !git --no-pager diff
+ excludesfile = $HOME/.gitignore
+ editor = mate -w
[github]
- user = $GITHUB_USER
- token = !security 2>&1 >/dev/null find-generic-password -gs \"Github API Token\" | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
+ user = $GITHUB_USER
+ token = !security 2>&1 >/dev/null find-generic-password -gs \"Github API Token\" | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
[merge]
- tool = opendiff
+ tool = opendiff
[credential]
- helper = cache --timeout=3600
+ helper = cache --timeout=3600
+[color]
+ diff = auto
+ status = auto
+ branch = auto
+ interactive = auto
+[alias]
+ st = status
+ ci = commit
+ br = branch
+ co = checkout
+ df = diff
+ lg = log -p
+ who = shortlog -s --
+ slog = !git --no-pager log --format=oneline --abbrev-commit
+ dfnp = !git --no-pager diff
+ up = !sh -c 'git pull --rebase --prune && git log --pretty=format:\"%Cred%ae %Creset- %C(yellow)%s %Creset(%ar)\" HEAD@{1}..'
EOF
# vim: filetype=bash :

0 comments on commit b765b0e

Please sign in to comment.
Something went wrong with that request. Please try again.