Skip to content
Snippets Groups Projects
Commit c5cfa062 authored by fxi's avatar fxi
Browse files

set update relative to current branch

parent 3d14be29
No related branches found
No related tags found
No related merge requests found
......@@ -33,15 +33,16 @@ then
git config --global user.email $email
fi
# get current branch
currentBranch=$(git branch | grep '*' |awk '{ print $2}')
# fetch changes, git stores them in FETCH_HEAD
git fetch
git fetch origin $currentBranch
# check for remote changes in origin repository
newUpdatesAvailable=`git diff HEAD FETCH_HEAD`
if [ "$newUpdatesAvailable" != "" ]
then
# get current branch
currentBranch=$(git branch | grep '*' |awk '{ print $2}')
# create the fallback
git checkout -B fallbacks
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment