milingo
2/18/2014 - 12:02 AM

Git

Git

Tutorial

###Remove a merged branch git branch -d BRANCH

git push origin --delete BRANCH

Merge develop with feature branch

git checkout develop

git pull

git checkout BRANCH

git rebase develop

-- solve possible conflicts

git rebase --continue

git push --force

Log

git log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short

Aliases in .profile

alias gs='git status ' alias ga='git add ' alias gb='git branch ' alias gc='git commit' alias gd='git diff' alias go='git checkout ' alias gk='gitk --all&' alias gx='gitx --all'

alias got='git ' alias get='git '

Aliases in .gitconfig

[alias] co = checkout ci = commit st = status br = branch hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short type = cat-file -t dump = cat-file -p

Sync forked repo

git fetch upstream git checkout master git merge upstream/master