Created
August 9, 2010 19:16
-
-
Save ralfebert/515937 to your computer and use it in GitHub Desktop.
git settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompt (Debian) | |
source /usr/local/bin/git-completion.sh | |
# Prompt (OS X + homebrew) | |
source /usr/local/etc/bash_completion.d/git-completion.bash | |
PS1="\[\033[31;38m\]\w\[\033[1;31m\]\$(__git_ps1)\[\033[00m\] " | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
# Editor | |
export GIT_EDITOR='nano -Y patch' | |
# Shortcuts | |
# Creates git repostitory with some reasonable default settings in current folder | |
function git_here() { | |
git init | |
git config color.ui auto | |
echo "log tmp db/*.sqlite3 nbproject/private bin .DS_Store" | tr " " "\n" > .gitignore | |
git add .gitignore | |
git commit -m "initial project setup" | |
} | |
alias d='git diff --word-diff $@' | |
alias s='d;git status -sb' | |
alias b='git branch -avv' | |
alias a='git add $@' | |
alias c='git commit -v $@' | |
alias ac='git add .;c $@' | |
alias lg='git lg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.lg "log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative" | |
git config --global alias.wipe '!git reset --hard;git clean -fd' | |
git config --global color.ui auto | |
git config --global core.editor "nano -Y patch" |
@lukashillebrand: Looks like an alias "git wipe" that does these two things:
- git reset --hard (resets the index and the work tree to the contents in HEAD, aka "revert all")
- git clean -fd (removes all untracked files and directories)
whre can i ge this files?
source /usr/local/etc/bash_completion.d/git-completion.bash
oh thank you!, can you add it to this gist as a comment?, very usefull :)
@tfnico - thank you :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does this command "git config --global alias.wipe '!git reset --hard;git clean -fd'" exactly do?