Browse Source

Sort Git conflict aliases

master
Sorin Ionescu 12 years ago
parent
commit
05a6653284
  1. 20
      modules/git/README.md
  2. 18
      modules/git/alias.zsh

20
modules/git/README.md

@ -66,6 +66,16 @@ Aliases @@ -66,6 +66,16 @@ Aliases
- `gcs` displays various types of objects.
- `gcl` displays lost commits.
### Conflict
- `gCl` lists unmerged files.
- `gCa` adds unmerged file contents to the index.
- `gCe` executes merge-tool on all unmerged file.
- `gCo` checks out our changes for unmerged paths.
- `gCO` checks out our changes for all unmerged paths.
- `gCt` checks out their changes for unmerged paths.
- `gCT` checks out their changes for all unmerged paths.
### Data
- `gd` displays information about files in the index and the work tree.
@ -104,16 +114,6 @@ Aliases @@ -104,16 +114,6 @@ Aliases
- `gix` removes files/directories from the index (recursively).
- `giX` removes files/directories from the index (recursively and forced).
### Conflict
- `gCl` lists unmerged files.
- `gCa` adds unmerged file contents to the index.
- `gCe` executes merge-tool on all unmerged file.
- `gCo` checks out our changes for unmerged paths.
- `gCO` checks out our changes for all unmerged paths.
- `gCt` checks out their changes for unmerged paths.
- `gCT` checks out their changes for all unmerged paths.
### Log
- `gl` displays the log.

18
modules/git/alias.zsh

@ -56,6 +56,15 @@ alias gcR='git reset "HEAD^"' @@ -56,6 +56,15 @@ alias gcR='git reset "HEAD^"'
alias gcs='git show'
alias gcl='git-commit-lost'
# Conflict (C)
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
alias gCa='git add $(gCl)'
alias gCe='git mergetool $(gCl)'
alias gCo='git checkout --ours --'
alias gCO='gCo $(gCl)'
alias gCt='git checkout --theirs --'
alias gCT='gCt $(gCl)'
# Data (d)
alias gd='git ls-files'
alias gdc='git ls-files --cached'
@ -90,15 +99,6 @@ alias giR='git reset --patch' @@ -90,15 +99,6 @@ alias giR='git reset --patch'
alias gix='git rm -r --cached'
alias giX='git rm -rf --cached'
# Conflict (C)
alias gCl='git status | sed -n "s/^.*both [a-z]*ed: *//p"'
alias gCa='git add $(gCl)'
alias gCe='git mergetool $(gCl)'
alias gCo='git checkout --ours --'
alias gCO='gCo $(gCl)'
alias gCt='git checkout --theirs --'
alias gCT='gCt $(gCl)'
# Log (l)
alias gl='git log --topo-order --pretty=format:${_git_log_medium_format}'
alias gls='git log --topo-order --stat --pretty=format:${_git_log_medium_format}'

Loading…
Cancel
Save