Browse Source

Add git aliases for signing commits (#1126)

master
Ihab Soliman 8 years ago committed by Kaleb Elwert
parent
commit
a75c63768c
  1. 8
      modules/git/README.md
  2. 5
      modules/git/alias.zsh

8
modules/git/README.md

@ -59,12 +59,16 @@ Aliases are enabled by default. You can disable them with: @@ -59,12 +59,16 @@ Aliases are enabled by default. You can disable them with:
- `gc` records changes to the repository.
- `gca` stages all modified and deleted files.
- `gcm` records changes to the repository with the given message.
- `gcS` records changes to the repository. (Signed)
- `gcSa` stages all modified and deleted files. (Signed)
- `gcSm` records changes to the repository with the given message. (Signed) - `gco` checks out a branch or paths to work tree.
- `gcam` stages all modified and deleted files, and records changes to the repository with the given message.
- `gco` checks out a branch or paths to work tree.
- `gcO` checks out hunks from the index or the tree interactively.
- `gcf` amends the tip of the current branch using the same log message as
*HEAD*.
- `gcf` amends the tip of the current branch using the same log message as *HEAD*.
- `gcSf` amends the tip of the current branch using the same log message as *HEAD*. (Signed)
- `gcF` amends the tip of the current branch.
- `gcSF` amends the tip of the current branch. (Signed)
- `gcp` applies changes introduced by existing commits.
- `gcP` applies changes introduced by existing commits without committing.
- `gcr` reverts existing commits by reverting patches and recording new

5
modules/git/alias.zsh

@ -53,11 +53,16 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then @@ -53,11 +53,16 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
alias gc='git commit --verbose'
alias gca='git commit --verbose --all'
alias gcm='git commit --message'
alias gcS='git commit -S --verbose'
alias gcSa='git commit -S --verbose --all'
alias gcSm='git commit -S --message'
alias gcam='git commit --all --message'
alias gco='git checkout'
alias gcO='git checkout --patch'
alias gcf='git commit --amend --reuse-message HEAD'
alias gcSf='git commit -S --amend --reuse-message HEAD'
alias gcF='git commit --verbose --amend'
alias gcSF='git commit -S --verbose --amend'
alias gcp='git cherry-pick --ff'
alias gcP='git cherry-pick --no-commit'
alias gcr='git revert'

Loading…
Cancel
Save