Under Jira, I did create a bitbucket development branch called "RHI-89"
I wanted this development branch to point three commits behind the master's HEAD.
After running git fetch
to fetch the newly created branch onto my local machine, I checked out to this development branch and performed a hard rest:
git checkout RHI-89
git reset --hard HEAD~3
Running git log
confirmed that the reset worked properly.
However, trying to push to the remote repository returns a "rejected" error, followed by these hints:
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 understand what is going on, but I do not know how to fix this issue. Is there a way to "prune" the remote development branch so that I can push the local branch without raising any conflict?