Git Impact
READ-ONLY PREVIEW
Synthetic demo · no personal repository dataDownload Git ImpactSource & instructions
sample-project / command preview

Know what changes.
Before you run it.

Git ran this command in a temporary sandbox. Your source repository was left unchanged. Review the effects on each part of your repository below.

git reset --hard HEAD~1
4index entries change
6files on disk change
1commits leave history
Branch feature/invoicesHEAD 6bf54a4d → d29fc86aReset mode hard

Same target, three reset modes

Actual simulations of this observed state. All three move HEAD to the same target. Soft preserves staging and disk; mixed preserves disk; hard resets both. Choose according to your intent.

ModeIndex changesDisk changesLocal work paths
--soft000
--mixed402
--hard464

Staging area

The versions staged for your next commit.

outputcreated
--- before/output
+++ after/output
@@ -0,0 +1 @@
+A committed export placeholder.

Target version change; no local work identified in this changed version.

src/draft.pystaged changes replaceddeleted
--- before/src/draft.py
+++ after/src/draft.py
@@ -1,2 +0,0 @@
-# Staged work that has never been committed
-DRAFT_LIMIT = 25
src/export.pydeleted
--- before/src/export.py
+++ after/src/export.py
@@ -1,2 +0,0 @@
-def export(invoice):
-    return str(invoice)

Target version change; no local work identified in this changed version.

src/invoice.pystaged changes replacedmodified
--- before/src/invoice.py
+++ after/src/invoice.py
@@ -1,2 +1,2 @@
-def total(items, tax=0.17):
-    return round(sum(items) * (1 + tax), 2)
+def total(items):
+    return sum(items)

Working tree

The files on disk, including untracked obstructions.

README.mdunstaged changes replacedmodified
--- before/README.md
+++ after/README.md
@@ -1,3 +1,3 @@
 # Invoice service
 
-Draft deployment instructions, not staged yet.
+A tiny demonstration project.
outputcreated
--- before/output
+++ after/output
@@ -0,0 +1 @@
+A committed export placeholder.

Target version change; no local work identified in this changed version.

output/local-export.csvuntracked obstruction replaceddeleted
--- before/output/local-export.csv
+++ after/output/local-export.csv
@@ -1,2 +0,0 @@
-invoice,total
-LOCAL-DRAFT,118.00
src/draft.pystaged content on disk replaceddeleted
--- before/src/draft.py
+++ after/src/draft.py
@@ -1,2 +0,0 @@
-# Staged work that has never been committed
-DRAFT_LIMIT = 25
src/export.pydeleted
--- before/src/export.py
+++ after/src/export.py
@@ -1,2 +0,0 @@
-def export(invoice):
-    return str(invoice)

Target version change; no local work identified in this changed version.

src/invoice.pyunstaged changes replacedmodified
--- before/src/invoice.py
+++ after/src/invoice.py
@@ -1,3 +1,2 @@
-def total(items, tax=0.18):
-    # This newer version is not staged yet
-    return round(sum(items) * (1 + tax), 2)
+def total(items):
+    return sum(items)

Current history

These commits leave this branch’s history. Other refs or the reflog may retain them.

6bf54a4dAdd export and round invoice totals

Why not git diff?

git diff compares the index and working tree. git diff --cached (or --staged) compares HEAD and the index. Supply the target commit to compare against it. These are useful native tools; Git Impact combines the proposed reset’s effects on staging, disk, obstructions, and history in one report.

In this synthetic example, output was a committed file at the target but is now an untracked directory. Hard reset replaces it, including output/local-export.csv. The diffs show the target file but omit the untracked CSV’s content. notes.txt is also untracked and stays unchanged.

git diff --cached HEAD~1 --name-only

Index compared with the target; --staged is a synonym for --cached.

output
src/draft.py
src/export.py
src/invoice.py
git diff HEAD~1 --name-only

Tracked working files compared with the target; ordinary untracked content is omitted.

README.md
output
src/draft.py
src/export.py
src/invoice.py
git ls-files --others --exclude-standard

Untracked paths, including an unrelated note and the obstructing export.

notes.txt
output/local-export.csv