You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# make sure to have your origin set correctly
# git remote set-url origin "[email protected]:DrPsychick/docker-telegraf.git"
branch="testbranch"
# checkout master from origin, skip if you already have a fresh checkout!
git checkout --track origin/master
# create new local branch (push later) and pull from origin
git checkout -b $branch
git pull origin $branch # fails if branch is not (yet) on origin, but does not matter
# does not always work:
#create=$([ -z "$(git branch -r |grep "$branch")" ] && echo "-b " || echo "--track origin/")
#git checkout $create$branch
# merge master and resolve conflicts by ignoring the branch version and commit
git merge -X theirs --no-edit --commit master
# do and commit changes, keep it simple
#sed -i -e 's/OLDVERSION/NEWVERSION/' file
#run tests/build/...
#git add file && git commit -m 'automated commit'
# push to origin and update/track the remote
git push -u origin $branch