From my .gitconfig
[color]diff = autostatus = autobranch = autoui = true[alias]ci = commitcloen = cloneco = checkoutchekcout = checkoutdif = diffl = logl1 = log -n1 -pll = log -pstauts = status
git config user.name "Aizat Faiz"git config user.email [email protected]
Include branch in shell.
You always know which branch is being worked on.
From my .bash_profile
alias ga='git add'alias gb='git branch'alias gba='git branch -a'alias gau='git add -u'alias gca='git commit --amend --no-edit'alias gci='git commit'alias gcm='git commit -m'alias gco='git checkout'alias gdc='git diff --cached'alias gd='git diff'alias gdd='git diff --name-only HEAD^ | cat'alias gf='git fetch'alias gfgsr='git fetch && git svn rebase'alias gl='git log'alias gl1='git log -n1'alias gl1p='git log -n1 -p'alias gll='git log -p'alias gp='git pull'alias gpr='git pull --rebase'alias grc='git rebase --continue'alias gs='git status'alias gsi='git submodule init'alias gsu='git submodule update'alias gsr='git svn rebase'alias gsrgf='git svn rebase && git fetch && git svn rebase'alias gf='git diff-tree --no-commit-id --name-only -r HEAD'
git diff --name-onlygit log --graph
Compare diff with another branch, good for flattening:
git diff master..branchnamegit diff branchname..mastergit diff master..HEAD
Display file changes between revisions:
git diff --name-only HEAD^git diff --name-status branchname..developgit diff --name-only branchname..developgit diff --name-only HEAD^ | xargs mvim -p # useful for opening in multiple tabsgit diff --name-only --diff-filter=d HEAD^ | xargs mvim -p # Filter to ignore deleted files
Which tags include a particular commit:
git tag --contains 741326a842e8c3d443c2787980f2fe6e079ccb39
Delete remote branch
git push origin :dotfiles
Squash branches as much as possible
git rebase -i master..
No equivalent of
brew install hub
Disable 2factor temporarily
Open current repository in your browser
Doesn't show size of pull requests
Makes it easier to quickly gauge which PRs to review
Code comments don't span multiple lines
You cannot comment on files outside modified lines (within a window), this is useful for pointing out other errors in the file.
Commit Message is not prefilled with 1st comment. You can have Pull Request Templates, but it's not the same. That is a "post" event. we should be able to edit the message before merging.
Styling. The Headers (h1) make it feel like such a heavy code.
Personal email address can leak into repositories via merges
Go is on GitHub, but they use Gerrit for code review
Critque (Used at Google)
Alot more tools.
Time Tracking, Milestones, Weight
You can work on the commit message before merginging.
UI is sparse
In command mode, will open a browser pointing to the file in GitHub
This works when lines are highlighted as well.