使用GitHub和Git进行版本控制
来源:互联网 发布:软件需求变更单 编辑:程序博客网 时间:2024/05/22 02:35
参考:http://hi.baidu.com/hk2305621/item/340c150f5820c612addc70f9
http://blog.csdn.net/cdkd123/article/details/8959484
http://www.kuqin.com/managetool/20111119/315043.html
http://www.kuqin.com/managetool/20111113/314830.html
环境:win7
1、Git的优势
为什么不选CVS或SVN
2、注册GitHub账号
GitHub的网址https://github.com/
3、Git的安装与测试
请参考http://www.kuqin.com/managetool/20111113/314830.html
4、Git上传本地代码
(1)创建远程代码库
在GitHub上新建一个repository
(2)创建本地代码库
(a)在需要上传的代码文件夹下,右键弹出菜单单击 Git Init Here
(b)在Git Bash窗口下输入命令:git status 查看,发现目前还没有增加要上传的文件
(3)增加要提交的文件
(a)右键需要上传的文件夹,右键弹出菜单选择Git Bash
(b)右键需要上传的文件夹,右键弹出菜单选择Git Add All Files Now
(c)在Git Bash窗口下输入命令:git status 可以查看增加的文件
(d)忽略不需要的文件
(d1)git rm --cache <file name> (git rm --cache testBl/Debug/* -r ,表示忽略testBl/Debug下的所有文件 -r表示递归忽略的意思)
(d2)http://blog.csdn.net/benkaoya/article/details/7932370(用这个方法我没有成功)
(4)开始上传本地代码库
(a)接下来我们要做的就是把本地仓库传到github上去,在此之前还需要设置username和email,因为github每次commit都
会记录他们。
$ git config --global user.name "your name" $ git config --global user.email "your_email@youremail.com"
(b)添加远程地址
$ git remote add origin git@github.com:yourName/yourRepo.git
这个是你在GitHub网站上新建repository时的那个地址,origin代表本地代码库的意思
(c)提交更改
git commit -m "first commit"
(d)上传文件:在Git Bash下输入git push origin master
5、成功后你就可以在GitHub网站看到自己的代码文件了
6、和VS2010的结合
请参看http://blog.csdn.net/softwave/article/details/7957938
- 使用GitHub和Git进行版本控制
- 使用github和git进行版本控制
- 使用git和github 进行代码的版本控制
- android studio配置git和github进行版本控制
- Windows下Qt Creator使用版本控制器Git来进行版本控制,GitHub进行代码托管
- 版本控制发展及git和github的使用
- 版本控制发展及git和github的使用
- Git 版本控制 和 github 使用( Android项目为例 )
- 使用git进行版本控制
- 使用git进行版本控制
- 使用git进行版本控制
- 使用git 进行版本控制
- 使用git进行版本控制
- 使用git进行版本控制
- 使用Git进行版本控制
- 使用Git进行版本控制
- Mac下从安装Git到使用github进行版本控制(git命令/Xcode管理)
- Mac下从安装Git到使用github进行版本控制(git命令/Xcode管理)
- Eclipse安装SVN插件
- 25、内省
- 分享公司在用的发布系统
- sed用法笔记
- 增加交叉编译器
- 使用GitHub和Git进行版本控制
- 26、类加载器
- HDU1093
- android中关于如何动态改变include引入的布局的问题
- 27、代理和动态代理
- js标签引入php文件
- 养老情节
- 构造AD组织结构(Organizational Unit)的树形结构的另一个方法
- Tom DeMarco:软件工程这个概念已过时?