Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

git: Always delete and checkout main branch to avoid merge conflicts 2

  • Loading branch information...
commit c7e60e33210dbbdfdd7c9102a10ca6ae0361d6fc 1 parent b974fad
@KeshavA2015 authored
Showing with 12 additions and 3 deletions.
  1. +12 −3 git/git_update.sh
View
15 git/git_update.sh
@@ -104,15 +104,24 @@ _RUN()
_GIT_REMOTE_BRANCH='master'
fi
+ git checkout "${_GIT_REMOTE_BRANCH}"
+ echo
+
+ git merge "remotes/origin/${_GIT_REMOTE_BRANCH}"
+ echo
+
+ git reset --hard
+ echo
+
+ git checkout "remotes/origin/${_GIT_REMOTE_BRANCH}"
+ echo
+
git branch -D "${_GIT_REMOTE_BRANCH}"
echo
git checkout "${_GIT_REMOTE_BRANCH}"
echo
- # git merge "remotes/origin/${_GIT_REMOTE_BRANCH}"
- # echo
-
git reset --hard
echo
fi
Please sign in to comment.
Something went wrong with that request. Please try again.