Santanu
Santanu

Reputation: 960

Remove a commit from github remote with commit number

I have a 2 days old commit. How can I remove a particular git commit from remote permanently? So that it can not be visible from browser with that commit number.

Upvotes: 1

Views: 44

Answers (1)

VonC
VonC

Reputation: 1323883

If you still can access that commit, after having rebasing and dropping said commit, and force pushing a branch, that means it is still referenced by another branch.

Removing a commit from a branch only removes it from the repo (and store it in the local repo git reflog) if no other branches reference it.

Upvotes: 1

Related Questions