forked from InseadDataAnalytics/INSEADAnalytics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_fork.R
25 lines (20 loc) · 909 Bytes
/
update_fork.R
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
# Sync a forked copy of INSEADAnalytics with the master project. For details,
# see https://github.com/InseadDataAnalytics/INSEADAnalytics/issues/7
if (!require(git2r)) {
install.packages("git2r", repos="http://cran.r-project.org/", quiet=TRUE)
library(git2r)
}
repo <- repository(".")
if (!("upstream" %in% remotes(repo))) {
remote_add(repo, "upstream", "https://github.com/InseadDataAnalytics/INSEADAnalytics")
}
fetch(repo, "upstream")
checkout(repo, "master")
merge(repo, "upstream/master")
message("
Your local copy of INSEADAnalytics is now in sync with the master project.
You can update your remote copy by clicking 'Push' in the 'Git' panel or
by executing the following:
push(repo, credentials=cred_user_pass(readline('Github username: '), readline('Github password: ')))
")
# push(repo, credentials=cred_user_pass(readline("Github username: "), readline("Github password: ")))