I accidently pushed .idea/workspace.xml. and made more push after that.
My code is merged on development branch. My team member asked me to revert .idea/workspace.xml changes.
So I followed:
git revert <commit sha>
git push origin <my branch>
as commit reverted had some changes which i want to persist, therefore copied my changes from development and
git add .
git commit -m'added back changes in filepath'
git push origin mybranch
! [remote rejected] mybranch -> mybranch (pre-receive hook declined) error: failed to push some refs to 'git@bitbucket.org:reponame/projectname.git'
I tried to find solution on internet but could not figureout. Any help would be appreciated.
I also tried git push with -force flag. but that also did not work.