Reset feature branch to master

Hello,

I would like to reset my feature branch to master.
I usually do “git reset --hard master” when my feature branch is checked out.
That work, but then I’m unable to push it to gitlab origin, because it tell me that there is a a pending pull… and when I pull on it, it kinda cancel the “reset --hard”… so, how can I do a reset to master on my feature branch, please ?

Hi,

if you change history of your local branch that is already pushed to remote, you need to force push to rewrite the histore in the remote.

git push --force

1 Like