Description Usage Arguments Value Examples
The status of a Git repo is a set of paths, typically broken down like so:
Paths with modifications that are staged for inclusion in the next commit.
Paths that are tracked by Git but that have unstaged modifications.
Paths that are not yet tracked by Git but that are also not gitignored.
What does that leave? Two kinds of paths
Unchanged, tracked files.
Ignored files.
Use ls = TRUE
to request a status that includes these paths as well,
i.e. a complete census of all the files in the repo.
1 | git_status(repo = ".", ls = FALSE)
|
repo |
Path to a Git repo. If unspecified, current working directory is checked to see if it is or is inside a Git repo. |
ls |
Logical, indicating whether to include unchanged, tracked files
and gitignored files. Default is |
a data frame where each row describes changes to a path, invisibly
1 2 3 4 5 6 7 8 9 10 11 | repo <- git_init(tempfile("githug-"))
owd <- setwd(repo)
write("Add me", "add-me")
write("Don't add me", "dont-add-me")
git_status()
git_add("add-me")
git_status()
git_commit(message = "first commit")
git_status()
git_status(ls = TRUE)
setwd(owd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.