DEV Community

Discussion on: GIT - Unorthodox commands I use from time to time

Collapse
 
evolutionxbox profile image
Jonathan Cousins

Well, the reset only moves which commit the branch is pointing to. The commit still exists. The force push does the same to the remote.

As long as that commit is still reachable from another tag or branch it will never be removed.

Even if it is unreachable, the commit can be recovered by creating a branch that points to it.

The commit can be found using the reflog or other commands which find unreachable commits.

Thread Thread
 
sm0ke profile image
Sm0ke

Ty! We have a GIT master here.

Thread Thread
 
evolutionxbox profile image
Jonathan Cousins

Definitely not a master!
Just someone who's read a lot of git related stackoverflow questions...