Disclaimer : In all cases, before doing anything, be sure to :
discuss it in details with your team so that you all agree on a plan
everyone saves/commits their local changes before reseting anything, either with git stash
like hinted at by simbo1905 in his comment, or by commiting on the branch then backing it up with
git branch backup-branch old-branch
Now in short, 2 approaches, depending on the specifics of your project and the nature of the changes you just pushed :
1) either everyone goes for your version
Every other user updates his/her local branch with
git fetch
git reset --hard <remoteName>/<branchName>
2) or their version is to be kept
In this case, one of the other users with the old ref for this branch* does a git push -f <remoteName> <branchName>
, and you are to do the above operations to sync back with them.
* (in case noone can do that for any reason, you could also recover the ref locally from the branch's reflog
and push it again to remote with force, it's just often quicker to push it from the repo of someone with the old ref)