在rstudio中使用git版本控制

2015/03/26

Categories: R Tags: git github RStudio

git安装

# //先安装git依赖的包 
yum install zlib-devel 
yum install openssl-devel 
yum install perl 
yum install cpio 
yum install expat-devel 
yum install gettext-devel 
//安装autoconf 
yum install autoconf 
# //安装git 
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz 
tar xzvf git-latest.tar.gz 
cd git-{date} 
autoconf 
./configure --with-curl=/usr/local 
make 
make install
yum install git  
测试安装成功:
git --version
mkdir ~/githubtest
touch README.md
echo intime-data-analyse >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/username/rstudio-intime.git
git push -u origin master

生成密钥

#生成rsa密钥对
ssh-keygen -t rsa
#查看公钥
cat /home/gXcloud/.ssh/id_rsa.pub

将公钥上传到github

img

使用rstudio-server新建项目

img

添加comment

img

同步(push-上传; pull-下载)文件

img


参考:

多人在线开发R

知乎git学习建议

git pro book 教程

rstudio官网说明