Linux下使用git管理项目

当你安装完成git的时候,你须要简单的配置一下,打开终端:html

用户名

第一步,你须要告诉git你的名字,这个名字会出如今你的提交记录中。git

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

Email

而后是你的Email,一样,这个Email也会出如今你的提交记录中,请尽可能保持此Email和您的Git@OSC的注册Email一致。spa

git config --global user.email "你的Email"

Clone 和 Push

Clone 项目.net

git clone http://git.oschina.net/xxxxxx/xxxxxx.git

建立特性分支htm

git checkout -b $feature_name

增长新的文件blog

git add xxx.h xxx.cpp ...

提交变动get

git commit -am "My feature is ready"

将你的提交推送到 Git@OSC,主分支使用master,其余使用自定义的名称it

git push origin $feature_name

在提交页面你能够查看你的变动!ast

http://git.oschina.net/oschina/git-osc/wikis/%E5%B8%AE%E5%8A%A9
http://www.javashuo.com/article/p-tohulhry-hu.htmlemail

相关文章
相关标签/搜索