Git/GitHub 1- Reverting our repository to an old commit on both GitHub and the Local repository.

In our project where we use GitHub as the repository, after doing “git push”, something didn’t sometimes work properly and we want to revert to an old commit the project was working on. In this article, we will see how to revert the commit in both the local repository and the GitHub repository and return our project to the last working state. In order to achieve this, we will use the following Git Commands in our article: “git log” “git revert” “git checkout” “git reset” “git push -u origin” “git merge” commands step by step.

Cumhur Akkaya
5 min readAug 26, 2023

We often use git when developing a project. And we create commits to record and track our progress. Sometimes, an error was made in the last commit, and sometimes an undesired transaction was made.

The last state of our project in GitHub and Local repository can be seen in the Figures 1–2. After pushing the “azure-pipeline.yaml” files, our project did not work properly. We want to remove…

--

--

Cumhur Akkaya

✦ Multi-Cloud & DevOps Engineer, ✦Technical Writer, ✦AWS Community Builder, ✦LinkedInTop Voice, ✦Believes in learning by doing, ✦Linkedin: linkedin.com/in/cumh