Git使用教程<一>
设置用户名:
git config --global user.name "Your Name Here"
设置邮箱:
git config --global user.email "your email"
在网页上新建repository
,点击如下图所示的网址
克隆项目到本地:
git clone https://github.com/gavincook/test.git
提交代码:
通过git status
可以查看相应的改动
然后使用git add
将改动加至缓存区
当有多项改动需要add时,输入
git add -A
即可全部添加至缓存区。
然后使用git commit -m "备注信息"
将改动提交到本地仓库
最后将代码提交到远程服务器
至此,就完成了一次环境搭建和代码的提交。