Tagged articles
git reset
12 articles · Page 1 of 1
This guide walks through Git's reset command, detailing the differences between --soft, --mixed, and --hard modes, when each is appropriate, and how they affect commits, the index, and the working tree for commits that haven't been pushed.
Gitcommitgit reset
0 likes · 5 min read

When you realize a recent Git commit has an incorrect message or missing files, you can safely amend the last commit using git commit --amend, provided the commit hasn't been pushed, avoiding the need for reset and keeping history clean.
Tutorialamendcommit
0 likes · 6 min read

This guide explains why you might need to erase a Git commit, compares git revert and git reset, provides step‑by‑step commands with examples, and shows how to force‑push to remove the unwanted history from both local and remote repositories.
GitGit Revertcommit history
0 likes · 11 min read

This article explains why you might need to remove a commit from Git history, demonstrates how to use git revert to create a new commit that undoes changes while preserving history, and shows how git reset combined with a forced push can completely erase unwanted commits from both local and remote repositories.
GitGit Revertcommit history
0 likes · 12 min read

Learn how to safely undo changes in Git using commands like git revert, git reset (soft, mixed, hard), git checkout, and git restore, with clear explanations, usage examples, and best‑practice tips to keep your project history clean and recover lost work.
GitGit Revertgit reset
0 likes · 7 min read

This article explains why you might need to remove a mistaken Git commit, demonstrates how to use git revert and git reset with various options, shows step‑by‑step commands—including force‑pushing to remote—to completely erase the unwanted commit while preserving or discarding history as required.
GitGit Revertcommit history
0 likes · 11 min read

This article explains when and how to use git revert to undo commits while preserving history, demonstrates git reset for removing commits entirely, and shows how to force‑push the cleaned state to a remote repository, including safety warnings and practical command examples.
GitGit Revertcommit history
0 likes · 10 min read

This article explains why and how to remove unwanted Git commit history by using git revert to create undo commits, git reset to move the HEAD pointer and discard changes, and finally force‑pushing the cleaned local branch to overwrite the remote repository, with step‑by‑step code examples and safety tips.
GitGit Revertcommit history
0 likes · 11 min read

This article explains why you might need to remove a Git commit from history and provides step‑by‑step instructions for using git revert, git reset (soft, mixed, hard), and force‑push to permanently delete unwanted commits while highlighting the risks involved.
GitGit Revertcommit history
0 likes · 8 min read

This guide explains Git's core workflow—adding, committing, and pushing—breaks down the four Git areas and five file states, shows how to inspect changes with various git diff commands, and provides step‑by‑step commands to undo modifications at each stage, all illustrated with practical examples.
Gitgit checkoutgit diff
0 likes · 8 min read

This article explains the differences between git reset and git revert, shows how each command moves the HEAD pointer, demonstrates step‑by‑step examples for undoing erroneous commits, and advises when to prefer revert to preserve history and avoid forced pushes.
GitGit Revertcode-rollback
0 likes · 6 min read


21CTOAug 21, 2018 · Fundamentals
This article explains Git's three core areas—working directory, staging (index) area, and history—detailing how commands like git add, commit, reset, checkout, and revert manipulate these zones, with visual diagrams and practical examples for effective version control.
GitGit RevertStaging Area
0 likes · 12 min read
