Revert to old commit on Bitbucket

I have a git setup on my web hosting and on my Bitbucket account, which are both connected.

How can I return to my first commit on my hosting (which I registered via SSH and installed git is ready and working) and on Bitbucket?

I tried: git checkout 965a793

Then I tried with a dot at the end: git checkout .

but nothing changes on the side of Bitbucket when I get to git push. It says everything is up to date, although Bitbucket is on holdcf08232

Here is a list of my three commits:

cf08232 remove the txt file
096d08f test.txt edited online with Bitbucket
965a793 Initial Commit
+4
source share
3 answers

Use -force:

 git reset --hard commitID
 git push origin branchName --force

I assume the source is a remote bitbucket

+15
source

: git reset . , / . , git revert:

git revert commitIdToBeReverted

, .

reset, checkout .

+5

, .

HEAD ? ( )

.

- .

?

0

All Articles