Home>
Version management is done with SourceTree.
Normally, the feature branch is started from Git-flow, the revision commit, the new release is started, and the revision is committed (the version name is attached to the tag).
Here, I want to go back to the old version from the latest version and perform subsequent source control. How should I operate on SourceTree?
Example)
It is transitioned from Ver1.0 → Ver1.1 → Ver1.2 → Ver1.3 → Ver1.4, and I want to return all the Master branch and Develop branch to the state of Ver1.1 and perform subsequent management and development.

Even if you don't delete Ver1.2 or later
Return it in the form of Ver1.0->Ver1.1->Ver1.2->Ver1.3->Ver1.4->Ver1.1, and then you can manage from Git-flow.

  • Answer # 1

    As a general rule, you should avoid the act of reverting the version as much as possible.

    However, if you really want to revert to the original version, you can often do one of the following:

    Use

    git resetto return to the old version.

    Overwrite all files with older versions.

    Create a new branch based on the old version and treat that branch as master.

    If you have git pushed the wrong contents due to an operation mistake etc., I think that the method of "1" is fine, but if you want to treat it as the master based on the old version for some reason, "2" " I think that it is better to respond by one of the methods of "3".