A
A
Alexey Tipa2021-04-05 17:31:19
git
Alexey Tipa, 2021-04-05 17:31:19

How to undo multiple commits in bitbucket?

Good day everyone!
A little scary, although in general everything is clear, I want to roll back all the edits to a certain commit.
Can you please tell me the safest way to do this?
I know the commit hash for sure, that is, these are not undefined undoes, but clearly understood ones.

Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2021-04-05
@KayzerSoze

if the changes have already been pushed to the bitbucket, then they can no longer be "rolled back".
You can simply roll back to a specific commit and commit it again as new edits.
Do this in a separate branch, if everything looks ok - merge into the master or whatever your main thing is there.

V
Vasily Bannikov, 2021-04-05
@vabka

The safest way is through revert.
Less secure - git reset --hard && git push --force

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question