Is it possible to reset a remote branch to another remote branch?
Let's say I have two branches: master
and develop
. The develop
branch is made from master
and used as an integration/build branch. It serves no other purpose.
At the end of a sprint all feature branches, which are approved, are merged into master.
At the end of the sprint, everyone is required to delete his local copy of the develop branch, we delete the remote one, and a new one is made from master. This is not ideal, but the strategy we use itself is the one we agreed upon and bests suits or needs. It's loosely based on the branch-per-feature strategy.
The problem is that, if someone doesn't delete his local copy, and performs an update, he gets the message that his local develop branch is ahead of the remote one. This is because feature branches which were merged in from the previous sprint but did not make it into master are still on his local copy. The build infrastructure itself is also at risk, because if we don't perform a fully clean checkout we risk old stuff still being present.
Actions like reset --hard
don't work, they might reset my local copy, but I'm not able to push these through to the remote branch.
Is there a way to make the develop branch completely identical to the master branch using commits, rather than recreating it?