Tags
Overview
Teaching: 5 min
Exercises: 0 minQuestions
How do I label my work?
Objectives
Understand tags.
If you’re developing an experiment or a paper in git you may want to label the repo at relevant timepoints. This makes going back and finding exactly what code you ran much easier.
To create a tag at the current revision:
$ git tag experiment-20180118
$ git push --tags
The above will first tag your local repo with experiment-20180118,
and then push all of the tags to github.
Delete a tag
Use
git tag --helpto work out how to delete a tag, and do it.
Make a tag for an earlier timepoint
How would you create a tag for an earlier timepoint? Try it.
Key Points
Use tags to label the code at different time points.