Built at:

Git#

Tags, Upstream, and detached HEAD#

Git tags from upstream#

How do I sync tags to a forked github repo?

  1. git remote add upstream if upstream is not defined in .git/config
  2. git fetch --tags upstream
  3. git tag now tags from upstream listed

Push single tag#

git push origin tag

HEAD vs detached HEAD#

how to switch back to HEAD

Git has two modes HEAD:

Given that the second mode is called detached HEAD mode, I like to call the first mode attached HEAD mode.

While you can use Git in the second mode as much as you like, the way most people prefer to use Git is in the first mode, because it's usually more useful. The detached HEAD mode exists for two primary reasons:

To force detached mode when using a branch name, you can (as you noted at one point) use git checkout --detach name—but unless you're implementing a new Git command, or something along these lines, that's not a normal thing to do.

Key points: