Git Revert Some Changes
Tasks
- Access the git repository at - /usr/src/kodekloudrepos/betaon the- Storage serverin- Stratos DC.
- Identify the current HEAD commit to be reverted. 
- Revert the HEAD commit to the previous commit with the message "initial commit". 
- Use - git revert HEADto create a new commit with the message "revert beta".
Steps
1
SSH to the Storage server
ssh natasha@ststor012
Get root/sudo access
sudo su -3
Navigate to the beta repo
cd /usr/src/kodekloudrepos/beta4
Check recent commits
git log --oneline -2
5
Revert the latest commit
git revert HEAD --no-edit
6
Change the commit message to exactly "revert beta"
git commit --amend -m "revert beta"
7
Verify the commit history
git log --oneline -2
Last updated