Description Usage Arguments Examples
Forcing pushing means restoring a tracked environment to what it looked like as of that commit. You can force push with either the commit index or the name of the commit.
1 | force_push(env, commit)
|
env |
tracked_environment. |
commit |
integer or character. If character, the commit with this name will be attempted for the force push. If there are multiple commits with this same name, a warning will be issued. |
1 2 3 4 5 6 7 | env <- tracked_environment()
env$x <- 1
commit(env) <- 'first commit'
env$y <- 2
commit(env) <- 'second commit'
force_push(env, 'first commit') # equivalent to force_push(env, 1)
stopifnot(identical(as.list(environment(env)), list(x = 1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.