How to revert the latest commit that is published to the remote repo

Started by Manj75, June 16, 2021, 13:15:37 PM

Previous topic - Next topic

Manj75

I've committed a change to my local GIT repo and then published it to the remote one, however I now need to revert this as if it never happened.  Is this possible to do within Archi/coArchi?  Basically, both local and remote will be on the previous commit prior to my changes losing them completely.

I noticed that there is an option context menu (right-click) when pointing over a previous commit in the Change History tab, 'Restore to this commit'.  This does what I want in that the local repo will now be in the state prior to my changes, however what I now want to do is to revert the remote to this previous commit so my commit changes are removed and removed from the Change History.

I know this can be done using GIT command line but wanted to check if it is possible in coArchi first.

Jean-Baptiste Sarrodie

Hi,

The good way of doing it with coArchi is by doing a "Restore to this commit" which will ADD a new commit which, in effect, will revert all changes, and then to publish this new commit. This makes it possible to undo your changes and this will be visible in the history for traceability.

You can't "remove" the commit from within coArchi. This is possible in theory with Git by doing a forced push to the reposity, but this requires everyone to remove the model from the workspace and to reimport it again for it to take effect (and to cross your fingers to make sure nobody will publish something on top of it in between).

In short: go for solution 1 ;-)

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.