Description Usage Arguments Value Examples
Brief summary of merge result
1 2 | ## S4 method for signature 'git_merge_result'
show(object)
|
object |
The |
None (invisible 'NULL').
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Not run:
## Initialize a temporary repository
path <- tempfile(pattern="git2r-")
dir.create(path)
repo <- init(path)
## Create a user and commit a file
config(repo, user.name="Alice", user.email="[email protected]")
writeLines("First line.",
file.path(path, "example.txt"))
add(repo, "example.txt")
commit(repo, "First commit message")
## Create and checkout a new branch. Update 'example.txt' and commit
checkout(repo, "new_branch", create=TRUE)
writeLines(c("First line.", "Second line."),
file.path(path, "example.txt"))
add(repo, "example.txt")
commit(repo, "Second commit message")
## Checkout 'master' branch
checkout(repo, "master", force = TRUE)
## Display 'example.txt'
readLines(file.path(path, "example.txt"))
## Merge and display brief summary of the fast-forward merge
merge(repo, "new_branch")
## Display 'example.txt'
readLines(file.path(path, "example.txt"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.