Skip to content

Instantly share code, notes, and snippets.

@cauesmelo
Created March 26, 2025 02:31
Show Gist options
  • Select an option

  • Save cauesmelo/58672750b5944ca14f2786d231952055 to your computer and use it in GitHub Desktop.

Select an option

Save cauesmelo/58672750b5944ca14f2786d231952055 to your computer and use it in GitHub Desktop.
Git aliases
git config --global alias.ac '!git add . && git commit -m'
git config --global alias.ck '!f() { \
branch=$(git branch -a | grep -v HEAD | sed "s/.* //" | fzf); \
git checkout "$branch"; \
}; f'
git config --global alias.rmb '!f() { \
branch=$(git branch | sed "s/^[*[:space:]]*//" | fzf); \
git branch -d "$branch"; \
}; f'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment