使用开源中国的git服务器管理团队代码

1.项目组的每个人都在开源中国注册帐号https://git.oschina.net/signup


2.项目的创建者添加成员:单击添加成员

使用开源中国的git服务器管理团队代码_第1张图片

3.单击添加用户:


4.下载git客户端,下载地址:

http://git-scm.com/downloads
5.安装完git后,在任意文件夹下单击右键,选择git bash 
使用开源中国的git服务器管理团队代码_第2张图片
6.配置用户名和密码:

用户名

第一步,你需要告诉git你的名字,这个名字会出现在你的提交记录中。

git config --global user.name "你的名字"

Email

然后是你的Email,同样,这个Email也会出现在你的提交记录中,请尽量保持此Email和您的Git@OSC的注册Email一致。

git config --global user.email "你的Email"
7.创建SSH加密连接:

SSH Keys

SSH key 可以让你在你的电脑和 Git @ OSC 之间建立安全的加密连接。

你可以按如下命令来生成sshkey

ssh-keygen -t rsa -C "[email protected]"# Creates a new ssh key using the provided email
# Generating public/private rsa key pair...

查看你的public key,并把他添加到 Git @ OSC http://git.oschina.net/keys

cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc....

添加后,在终端(Terminal)中输入

若返回

Welcome to Git@OSC, yourname! 

则证明添加成功。

8 从远程版本库克隆代码到本地:
git clone [email protected]:[email protected]
9.修改相应的代码,修改完成后提交
git add -u
git commit -m "对修改代码的说明"
10.将修改提交到远程版本库
git push [email protected]:[email protected]

你可能感兴趣的:(源代码管理)