sgaunet / conf-linux

collection of ansible role to configure my Linux account for a new PC (debian based)
GNU General Public License v3.0
2 stars 0 forks source link

Git aliases #50

Open sgaunet opened 1 month ago

sgaunet commented 1 month ago

List of alias to test and maybe add in the configuration:

alias gst="git status"
alias gb="git branch"
alias gc="git checkout"
alias gl="git log --oneline --decorate --color"
alias amend="git add . && git commit --amend --no-edit"
alias commit="git add . && git commit -m"
alias diff="git diff"
alias force="git push --force"
alias nuke="git clean -df && git reset --hard"
alias pop="git stash pop"
alias prune="git fetch --prune"
alias pull="git pull"
alias push="git push"
alias resolve="git add . && git commit --no-edit"
alias stash="git stash -u"
alias unstage="git restore --staged ."
alias wip="commit wip"
sgaunet commented 1 month ago

Add alias in git configuration itself:

[alias]
    wip =      commit --message 'wip' --no-verify
    uncommit = reset --soft "HEAD~1"
    unamend =  reset --soft "HEAD@{1}"