S
S
svilkov872017-09-14 09:23:37
git
svilkov87, 2017-09-14 09:23:37

How to change the latest commits if the push has already passed?

Good afternoon!
The situation looks like this:
Yesterday I pushed two commits (now they are the last ones), but today I realized that I made a mistake in the name.
Now we only need to change the names of these commits. How can I do it?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artyom Dontsov, 2017-09-14
@ExtremeCode

You can undo with the revert command:
If you need to undo multiple commits, you can specify a range:
After that, you will need to commit the changes again.

I
Ivan Koryukov, 2017-09-14
@MadridianFox

If there are enough rights, then after you have made local changes, you can do push --force

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question