loading...

Discussion on: My Personal Git Tricks Cheatsheet

Collapse
vonc profile image
VonC

On the current branch alias, don't forget git branch --show-current with Git 2.22: stackoverflow.com/a/55088865/6309.

I used it in stackoverflow.com/a/56713414/6309

Collapse
antjanus profile image
Antonin Januska Author

I HAD NO IDEA. This is awesome! Thank you! :)

Collapse
slash5toaster profile image
Clyde

also if you've got git > 2 this works

git status --porcelain=v2 --untracked-file=no --branch \
| grep branch.head \
| cut -d ' ' -f 3

Collapse
antjanus profile image
Antonin Januska Author

looks like I'm still a little behind on versions. I'm on v2.17.x

Neat tip though, I'll have to remember to come back and change my rc files to use this :)