Skip to content

Instantly share code, notes, and snippets.

View paulrobinson's full-sized avatar

Paul Robinson paulrobinson

  • Red Hat
  • Whitley Bay, UK
View GitHub Profile
#!/bin/bash
git remote | grep origin > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo This script assumes you have origin set as the repo to create reqs in
exit
fi
upstreamname=`git remote -v | grep upstream | grep fetch | sed "s#upstream.*github.com[:/]\(.*\)/.*#\1#"`
reponame=`git remote -v | grep origin | grep push | sed "s#.*/\(.*\)\.git.*#\1#g"`
myname=`git remote -v | grep origin | grep fetch | sed "s#origin.*github.com[:/]\(.*\)/.*#\1#"`
#!/bin/bash
git remote | grep upstream > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
echo This script assumes you have upstream set as the repo to hand reqs in
exit
fi
if [ ! -d .git ]; then
echo This script assumes you are in the root of a repo clone
exit