I'm doing this:
git checkout master
git pull
git checkout feature
git rebase origin/master
then resolve all the problems... Try to push - not gonna happen...
Git is telling me that after doing a rebase, I have two options:
use
--force
, which seems risky and stupidor
pull
again and deal with the merge conflicts again... and end up in the same situation?
error: failed to push some refs to 'ssh://[email protected]/yyy/xxx.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I have locally: feature branch, master (up to date).
And remote: featureBranch (which is ahead now ?!) and master.
I just want to update my feature branch so it's even close to version on master.
I've read many threads about this, and the only solution seem to be to use --force
This doesn't seem like a solution at all, for me, for such a commonly used tool.
git push --force-with-lease
: #52824192 – Helianthus