What about Tags?
Learn about “tags” in Git.
We'll cover the following
Let’s cover “off tags” really quickly while we’re here.
Tags#
Tags are the same as branches, except they do not have history. They point to a particular commit, but it doesn’t change (unless you force a change, or delete it).
How to apply tags?#
You can tag something where you are:
1 git tag i_was_here
Or you can tag wherever a branch pointer is pointed at in your repository, even if you are not on it:
2 git checkout e36355ed00ac3af009d7113a9dd281c269a79afd
3 git branch -f newfeature
The -f
flag means --force
. If a branch of newfeature
already exists, then Git will not allow you to override it unless you use the -f
flag.
4 git checkout master
5 git tag remember_to_tell_bob_to_rewrite_this newfeature
Use git tag
to confirm that the tag now exists within the repository.
Detached Heads
Conclusion: Git Branching
Mark as Completed
Report an Issue