DEV Community

Discussion on: Fun with Git aliases

Collapse
 
sinewalker profile image
Mike Lockhart

Show remote URL:

url = config --get remote.origin.url

and also, blow up the local (edited to be without swearing...):

screw-this-noise = !echo 'Well, screw this noise!'; NOISE=$(git url); THIS=$(basename $PWD); cd ..; rm -rf $THIS; git clone $NOISE; unset THIS NOISE

and my favorite, push to a merge request (GitLab, but works on GitHub too):

pmr = !git push --push-option=mergerequest.create --set-upstream origin $(git branch|awk '/\*/{print $2}')

Collapse
 
vishalraj82 profile image
Vishal Raj

Whatever you wish my pal !!