I know that there are questions like this, but that's not what I'm asking.
I also know that:
git checkout tag-name
:
- Detaches you from the branch. (i.e. moves
HEAD
pointer, keepsBRANCH
pointer)
git reset --hard tag-name
:
- Does not detach you from the branch, but makes the previous commits to become "dangling". (i.e. moves both
HEAD
andBRANCH
pointers)
I wonder which one makes more sense for updating to a tag, i.e. should a production be reseted or checked out. I know that a garbage collector may run, removing dangling commits, but then again, if the production is always "pulled" before the process of updating to a tag, I see nothing bad there.
Should a production update to a tag with reset
or checkout
, considering that a pull
is always done prior to this update call?