Make sure your working tree is clean. Stash or commit anything you're working on.
❯ git status
# On branch features/enrollment_popout
nothing to commit, working directory clean
Fetch the latest changes from the server.
❯ git fetch
remote: Counting objects: 201, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 118 (delta 69), reused 117 (delta 69)
Receiving objects: 100% (118/118), 623.03 KiB | 554.00 KiB/s, done.
Resolving deltas: 100% (69/69), completed with 51 local objects.
etc...
Checkout the branch that has been force pushed:
❯ git checkout features/enrollment_popout
Switched to branch 'features/enrollment_popout'
Make sure you don't have any work on this branch that wasn't pushed. If you do, you'll lose the work at this step.
Finally reset the branch pointer to the value that is up on origin:
❯ git reset --hard origin/features/enrollment_popout
HEAD is now at bfd23a7 Add some placeholder validation styles
On the checkout step, I get this:
Already on 'features/enrollment_popout'
Your branch and 'origin/features/enrollment_popout' have diverged,
and have 24 and 38 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)