帮助中心

git快速上手

2014-12-02 14:28:46

下载和安装Git的客户端

  1. windows下载安装 https://git-scm.com/download/win
  2. 非windows下载安装 https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git

配置用户名和邮箱

  1. git config --global user.name "test_user_name"
  2. git config --global user.email "test_user_name@kkgit.com"

注册用户和创建项目

  1. 首先你需要先注册一个kkgit的帐号并成功激活。
  2. 登录后,个人中心 -> 项目管理,在里面新建一个项目。
  3. 新建成功后,在项目管理,复制该项目的项目URL 。

clone项目

clone http://repo.git.uujuju.com/git/test_user_name/test_project1.git

按照提示,输入kkgit的账户名(不是邮箱)和登录密码就可以正常clone项目了

提交代码并push

cd test_project1
echo "test" > test.txt
git add test.txt
git commit -m "first commit"
git push -u origin master