To manage your Git history and view or revert changes, here are some steps you can follow: Viewing Git History 1. View Commit History - You can see the commit history using the command: git log - For a more concise view, you can use: git log --oneline Reverting to a Previous Commit 1. Identify the Commit - Find the commit hash from git log that you want to revert to. 2. Revert to a Specific Commit - If you want to revert your working directory to a specific commit without changing the commit history, you can use: git checkout <commit-hash> - If you need to make this a new commit on your branch, you might want to create a new branch first: git checkout -b <new-branch-...
I’m Yasiru Viyara, a software developer passionate about web technologies. Here I share coding tips, snippets, real-world projects, and new ideas from my experience in software development.