Skip to content

Instantly share code, notes, and snippets.

@malikbenkirane
Created June 29, 2023 06:15
Show Gist options
  • Save malikbenkirane/b4ea86153e49140878d20384497364b4 to your computer and use it in GitHub Desktop.
Save malikbenkirane/b4ea86153e49140878d20384497364b4 to your computer and use it in GitHub Desktop.
alias gi="git add -i"
alias gv="git commit -v"
g() {
case $1 in
ai)
git add -i
;;
a)
git commit -v --amend
;;
s)
git status -s
;;
ss)
git status
;;
c)
git commit -v
;;
ca)
git commit -av
;;
*)
echo git $@
;;
esac
}
export EDITOR=hx
alias ext="exa -T"
alias wezrc="${EDITOR} ~/.wezterm.lua:13:16"
alias hxrc="${EDITOR} ~/.config/helix/config.toml"
alias zrc="${EDITOR} ~/.zshrc"
@malikbenkirane
Copy link
Author

malikbenkirane commented Jun 29, 2023

g func

disclaimer: no shift yet it's like aliases

eval `git <$@>`
short long
ai add interactive
a amend last commit
s status short
ss status original default
c commit with diff
ca commit unstaged changes
* echo git command

Config

  • helix-editor.com
  • zsh (Mac OS, upgraded with brew.sh)
  • exa instead of ls (no alias yet)
  • wezterm terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment