Requirements
I wrote a code like below, but I think there will be more clean answer. Any suggestion?
(For a tag, the last git reset ... is useless. It's for a branch)
git fetch && git fetch --tags && \
git checkout -- . && \
git checkout branch_or_tag && \
git reset --hard origin/branch_or_tag
Emil Moe
Senior Data Engineer
I think this is what you are looking for stackoverflow.com/questions/1125968/how-do-i-forc…