Skip to content

Instantly share code, notes, and snippets.

@andrewmriley
andrewmriley / gist:6401eef48859519f483c
Last active May 28, 2024 16:43
Copy your current git branch name to clipboard
## Choose one and add it as an alias or throw it in a script ##
### Modern Git Thanks to @Pezmc
# Linux/Unix Wayland
git branch --show-current | wl-copy
# Linux/Unix X11
git branch --show-current | xclip -selection clipboard
# MacOS