Skip to content

Instantly share code, notes, and snippets.

@souhaiebtar
Created January 30, 2026 21:32
Show Gist options
  • Select an option

  • Save souhaiebtar/6af24871eea6256d7008a312867a1945 to your computer and use it in GitHub Desktop.

Select an option

Save souhaiebtar/6af24871eea6256d7008a312867a1945 to your computer and use it in GitHub Desktop.
[git alias]git alias #git #alias

git config --global alias.undo '!git reset --hard HEAD^ && git clean -df'

git config --global alias.stash-all '!f() { git stash push --include-untracked -m "$(date +"%Y-%m-%d %H:%M:%S")"; }; f'

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