Answer the question
In order to leave comments, you need to log in
Git: rollback changes while preserving history?
The question was not completed, accidentally sent!
Interested in the correct way (if it exists) to roll back changes while preserving the history of the file (git blame).
For example:
Take two files - file1 and file2.
file1 has been in version control for a long time, it has a lot of changes and commits.
file2 is new, in the last commit we created this file and moved a piece from file1.
Some time passed, a lot of commits appeared in the history.
It turned out that it would be better to leave the changes in file1, which we transferred to file2.
What are we doing? git revert commit_hash
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question