Git time savers I use often. [ZSH]

## Capitulation, fuck my changes and clean up.

gifu(){

branch=$(git rev-parse --abbrev-ref HEAD);

git fetch origin;

git reset --hard origin/$branch;

print -P "=> Git, I Fucked Up; cleaned it for you."

}

## Open Project on Github

gop(){

open `git remote -v | sed 's/^.*:/http:\/\/github.com\//' | sed 's/.git .*//' | tail -1`

}

## Open Project Issues on Github

gip(){

url=$(git remote -v | perl -n -e 'm{:(.+?).git} && print $1,"\n"' | uniq );

open "http://github.com/$url/issues"

}

Reply to this note

Please Login to reply.

Discussion

๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ

๐Ÿ˜‰

Somehow do git reset hard and still somehow have changes from 2017 on my local branch ๐Ÿ‘€

Since Iโ€™m using Fork I donโ€™t fuck up Git anymore ๐Ÿ˜…

Really great tool I can recommend itโ€™s worth the 50$

https://git-fork.com

I saved gop and gip really nice ๐Ÿ˜Š