git 简明教程(2) --获取工程与更新
来源:互联网 发布:淘宝不能网银付款 编辑:程序博客网 时间:2024/04/29 23:30
当要参与github上面的t项目时,首先需要 fork 工程到自己的github帐号中,然后 clone到本地,进行编辑并提交
1.获取工程到自己的github中
在 目标项目 中点击 fork ,自己的github帐号中
2.clone -获取工程到本地
git clone https://github.com/username/Spoon-Knife.git# Clones your fork of the repository into the current directory in terminal
3.编辑并上传 参考上篇
git add .
git commit -am 'add files'
git push origin master
4.获取原工程(不是自己github中的工程)的实时更新
git remote add upstream https://github.com/octocat/Spoon-Knife.git# Assigns the original repository to a remote called "upstream"
git fetch upstream# Fetches any new changes from the original repositorygit merge upstream/master# Merges any changes fetched into your working files
此时 工程中的任何更新都会合并入本地工程中。
至此,完成 对 目标工程的跟踪以及对目标文件的提交。
参考 fork a repository
- git 简明教程(2) --获取工程与更新
- 【git】:git简明教程
- 【Git】Git简明教程
- GIT简明教程
- Git使用简明教程
- Git 简明教程
- git简明操作教程
- Git 简明教程
- Git简明教程
- Git简明教程
- git 简明教程
- git简明教程
- Git简明教程
- Git 简明使用教程
- GIT简明教程
- Git简明教程
- Git简明教程
- Git简明教程
- TCP/IP协议
- pat 1055. The World's Richest (25)
- Lua中的table函数库
- ASP.NET免费发送邮件|
- how to enable auto hide laucher function in ubuntu12.04
- git 简明教程(2) --获取工程与更新
- oracle 等待事件查询
- pat 1055. The World's Richest (25)
- 如何在oracle中设置字段自动增长
- 黑马程序员 .NET学习笔记 <2>
- [PythonChallenge]第0关
- MYSQL 把表中某个字段出现在字符列出来
- 最近写的一个关于统计某个时间点所有组织内CAS 服务计数器的脚本,有需要可以将你的需求发给我!
- Jquery中的each()使用帮助手册