diff options
author | evuez <helloevuez@gmail.com> | 2015-10-16 10:42:41 +0200 |
---|---|---|
committer | evuez <helloevuez@gmail.com> | 2015-10-16 10:42:41 +0200 |
commit | 85adff2c39e6eae77a915638961f2144ef18b5c9 (patch) | |
tree | ad87847bd5cca361b2e4582a361c4d4d70948aec /git.html.markdown | |
parent | 375f0c18ae9b8d8732c480d0647becf1e82adf3e (diff) | |
parent | 25e49b8cf10d3879431eae6ffe8a8e5f88843b8d (diff) |
Merge 'master' of github.com:adambard/learnxinyminutes-docs
Diffstat (limited to 'git.html.markdown')
-rw-r--r-- | git.html.markdown | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/git.html.markdown b/git.html.markdown index 72079f6c..971d53e4 100644 --- a/git.html.markdown +++ b/git.html.markdown @@ -5,6 +5,7 @@ contributors: - ["Jake Prather", "http://github.com/JakeHP"] - ["Leo Rudberg" , "http://github.com/LOZORD"] - ["Betsy Lorton" , "http://github.com/schbetsy"] + - ["Bruno Volcov", "http://github.com/volcov"] filename: LearnGit.txt --- @@ -76,6 +77,11 @@ other repositories, or not! A branch is essentially a pointer to the last commit you made. As you go on committing, this pointer will automatically update to point the latest commit. +### Tag + +A tag is a mark on specific point in history. Typically people use this +functionality to mark release points (v1.0, and so on) + ### HEAD and head (component of .git dir) HEAD is a pointer that points to the current branch. A repository only has 1 *active* HEAD. @@ -206,6 +212,28 @@ $ git branch -m myBranchName myNewBranchName $ git branch myBranchName --edit-description ``` +### tag + +Manage your tags + +```bash +# List tags +$ git tag +# Create a annotated tag +# The -m specifies a tagging message,which is stored with the tag. +# If you don’t specify a message for an annotated tag, +# Git launches your editor so you can type it in. +$ git tag -a v2.0 -m 'my version 2.0' +# Show info about tag +# That shows the tagger information, the date the commit was tagged, +# and the annotation message before showing the commit information. +$ git show v2.0 +# Push a single tag to remote +$ git push origin v2.0 +# Push a lot of tags to remote +$ git push origin --tags +``` + ### checkout Updates all files in the working tree to match the version in the index, or specified tree. |