benthayer / git-gud

Wanna git gud? Then get git-gud, and git gud at git!
MIT License
401 stars 42 forks source link

Level: Rewriting History 3 - "The Same Commit" #257

Open benthayer opened 3 years ago

benthayer commented 3 years ago
3) The Same Commit - Use branches to show that the commit hash changes

git gud status (#264)

Before (branch):
Hash: 1234
Message: Commit

After (master):
Hash: 4321
Message: New Commit

======= Simulating: git log --oneline --all --graph
Blah
<<<<<<<

Trees:

A) Starting tree
Initial ---- Commit (master)

B) Branch
Initial ---- Commit (master, branch)

C)
Initial --- New Commit (master)
    \
   Commit (branch)

D)
Initial --- New Commit ---- Merge (master)
    \                       /
   Commit (branch) --------
sahansk2 commented 3 years ago

@benthayer Voop