tag( object =".", name =NULL, message =NULL, session =FALSE, tagger =NULL, force =FALSE)
Arguments
object: The repository object.
name: Name for the tag.
message: The tag message. Specify a tag message to create an annotated tag. A lightweight tag is created if the message parameter is NULL.
session: Add sessionInfo to tag message. Default is FALSE.
tagger: The tagger (author) of the tag
force: Overwrite existing tag. Default = FALSE
Returns
invisible(git_tag) object
Examples
## Not run:## Initialize a temporary repositorypath <- tempfile(pattern="git2r-")dir.create(path)repo <- init(path)## Create a userconfig(repo, user.name ="Alice", user.email ="alice@example.org")## Commit a text filefilename <- file.path(path,"example.txt")writeLines("Hello world!", filename)add(repo,"example.txt")commit(repo,"First commit message")## Create an annotated tagtag(repo,"v1.0","Tag message")## List tagstags(repo)## Make a change to the text file and commit.writeLines(c("Hello world!","HELLO WORLD!"), filename)add(repo,"example.txt")commit(repo,"Second commit message")## Create a lightweight tagtag(repo,"v2.0")## List tagstags(repo)## End(Not run)