Git Commit Utilities
get_commit_msgs(sha = NULL, n = 1)scrape_commits(n)
git_unstage(file = NULL)
git_reset_soft(n = 1)
git_uncommit()
git_reset_hard()
git_diffcommits(top = 1, n = 2)
NULL
... invisibly.
A list containing commit message entries. The sha
and author
of each commit is added as attributes.
Character. The commit SHA-1 hash to pull messages from.
If NULL
, the most recent commit on the current branch.
Numeric. How far back to go from current HEAD
.
Same as the command line git log -n
parameter.
For git stash
commands, zero-index into the stash list.
Character. The path name to a file.
Numeric. The commit to consider the "top" of the commit stack.
Defaults to HEAD
or n = 1
.
get_commit_msgs()
: gets the commit messages corresponding to the commit sha
.
scrape_commits()
: scrapes n
commit messages for useful change log commits
to be used to create a NEWS.md
.
git_unstage()
: un-stages a file from the index to the working directory.
Default un-stages all files.
git_reset_soft()
: un-commits the most recently committed file(s) and
add them to the staging area.
git_uncommit()
: un-commits the most recently committed file(s) and
add them to the staging area. Wrapper around git_reset_soft()
git_reset_hard()
: git reset --hard origin/<branch>
.
git_diffcommits()
: gets the diff of the corresponding 2 commits. Order matters.