Say you're working on your code in Git and something didn't go as planned. So
now you need to revert your last commit. How do you do it? Let's find out!
There are two possible ways to undo your last commit. We'll look at both of them
in this article.
The revert command
The revert command will create a commit that reverts the changes of the commit
being targeted. You can use it to revert the last commit like this:
git revert
When committing sensitive data, such as a password or SSH key, to a Git repository, it can be removed from the log. You can use the git filter-repo tool or the open source tool BFG Repo-Cleaner to completely remove unnecessary files from the repository history.
How to use composer to require Git repos within a PHP project.
Version control is an inseparable part of software developers' daily lives. It's hard to imagine any team developing software without using a version control tool.