Unable to remove commits from Babylon fork: permission denied

Heya, I’m having some serious issues with my fork of the Babylon repo and wonder if anyone has any ideas/fixes to try? :pray:

The problem is that I’m 5 commits ahead even thou I didn’t make the commits - they appeared after merging new changes from the Babylon repo, which has never happened before…

Usually I would use the below terminal commands to undo 5 unwanted commits:

git reset --hard HEAD~5
git push origin -f

However this is now producing the below error: :cold_sweat:

HEAD is now at e14f95edd0 Merge pull request #11927 from carolhmj/ACEfixFramingBehaviors
remote: Permission to BabylonJS/Babylon.js.git denied to BlakeOne.
fatal: unable to access 'https://github.com/BabylonJS/Babylon.js/': The requested URL returned error: 403

I have 2 commits ahead, for some reasons, after fetching my fork from the upstream (was 677 commits behind before fetching).

Thanks for checking. :slight_smile: Must be something up with Babylon’s repo then I guess, not something to fix on our end… :thinking:

1 Like

I had problems a long time ago. In my case, l did do the commits. Are you needing this repo just to do pull requests, and have no changes just for you?

If so, then just deleting the fork, doing it again has a fixed amount of effort involved, but it is going to work for sure.

2 Likes

Yes, after deleting the fork and creating a new one everything seems to be OK.

Thanks, I’m saving that for the last resort (not sure if everyone deleting their forks is the best solution if this is a widespread issue beyond the two of us and also slightly worried it would kill the analytical data). The commits weren’t made by us, they just showed up after we fetched and merged from upstream. When they were my own unwanted commits, removing them like I showed above has always worked in the past…

EDIT: ok is fixed now, I was just issuing commands from the wrong directory accidentally… TLDR :point_up:

My guess is that you forked the repo and then BJS had to revert some commits for whatever reason.

Hmm, it’s not that new of a new fork thou… I forked the Babylon repo last summer and have been using it ever since without issue… :thinking: Can you check too please and see if you fetch and merge from upstream now if it adds commits to your repo like it did for @labris and I? :slight_smile:

git push origin -f

Maybe you should only push to your fork?

git push -f

Note: I know about as much as I need to know when using GIT.

1 Like

Aha right you are! I was doing the commands from working directory of a clone of the BJS repo accidentally. I just tried them from the directory of my cloned fork and it worked to remove the commits like normal. And now have fetched and merged and am up-to-date now without any extra commits. Thank you very much! :slight_smile:

2 Likes