如何利用RStudio开发R包,并使用git同步到github中(How to)作者按:
需要的软件
1,github账号,新建一个project比如命名为:2018test1,勾选下面的“Initialize this repository with a README” 创建完成之后,界面如下: 2, 设置git比如我的账号为: myname, 邮箱为: myemail@163.com $ git config --global user.name "myname"
$ git config --global user.email myemail@163.com
$ ssh-keygen -t rsa -C "myemail@163.com" //邮箱同上 git会在C:\Users\Admin-pc.ssh 中生成两个文件, id_rsa 和 id_rsa.pub. 使用text 打开id_rsa.pub,复制里面的秘钥,放到github中 SSH and GPG keys, 打开方法:
3, 设置RStudio
4, 将RStudio中的内容同步到github中
github中查看同步的内容可以看出,设置成功! |
|