print(paste0("Git Update Started at: ", Sys.time()))
CommitMessage <- paste("updated on: ", Sys.time(), sep = "")
wd <- "~/serdarbalci"
setorigin <- "git remote set-url origin git@github.com:sbalci/MyJournalWatch.git \n"
gitCommand <- paste("cd ", wd, " \n git add . \n git commit --message '", CommitMessage, "' \n", setorigin, "git push origin master \n",  sep = "")
system(command = paste(gitCommand, "\n") , intern = TRUE, wait = TRUE)
Sys.sleep(5)
print(paste0("Git Update Ended at: ", Sys.time()))

Happy Git and GitHub for the useR

https://happygitwithr.com


http://r-bio.github.io/intro-git-rstudio/

https://andrewbtran.github.io/NICAR/2018/workflow/docs/03-integrating_github.html

https://aberdeenstudygroup.github.io/studyGroup/lessons/SG-T1-GitHubVersionControl/VersionControl/

http://r-bio.github.io/intro-git-rstudio/

https://stackoverflow.com/questions/41688164/using-rstudio-to-make-pull-requests-in-git

https://bookdown.org/rdpeng/RProgDA/version-control-and-github.html

https://www.r-bloggers.com/rstudio-and-github/

http://happygitwithr.com/fork.html

https://kbroman.org/github_tutorial/

https://kbroman.org/simple_site/

https://github.com/thisisnic/first-contributions

require(rstudioapi)
CommitMessage <- paste("updated on ", Sys.time(), sep = "")
wd <- getwd()
gitCommand <- paste("cd", wd, " \n git add . \n git commit --message '", CommitMessage, "' \n git push origin master \n", sep = "")
Sys.sleep(time = 1)
gitTerm <- rstudioapi::terminalCreate(show = FALSE)
Sys.sleep(time = 1)
rstudioapi::terminalSend(gitTerm, gitCommand)
CommitMessage <- paste("updated on ", Sys.time(), sep = "")
wd <- getwd()
gitCommand <- paste("cd ", wd, " \n git add . \n git commit --message '", CommitMessage, "' \n git push origin master \n", sep = "")
system(command = gitCommand, intern = TRUE)
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKLS0tCgpgYGAKcHJpbnQocGFzdGUwKCJHaXQgVXBkYXRlIFN0YXJ0ZWQgYXQ6ICIsIFN5cy50aW1lKCkpKQpDb21taXRNZXNzYWd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