Git远程仓库
2014-01-06 23:43
141 查看
To push our local repo to the GitHub server we’ll need to add a remote repository.
The name of our remote is origin and the default local branch name ismaster. The
-u tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do.
Let’s pretend some time has passed. We’ve invited other people to our github project who have pulled your changes, made their own commits, and pushed them.
We can check for changes on our GitHub repository and pull down any new changes by running:
Looks like there has been some additions and changes to the my project. Let’s take a look at what is different from our last commit by using the git diff command.
In this case we want the diff of our most recent commit, which we can refer to using the HEAD pointer.
by dukeyunz
The name of our remote is origin and the default local branch name ismaster. The
-u tells Git to remember the parameters, so that next time we can simply run git push and Git will know what to do.
git push -u origin master
Let’s pretend some time has passed. We’ve invited other people to our github project who have pulled your changes, made their own commits, and pushed them.
We can check for changes on our GitHub repository and pull down any new changes by running:
git pull origin master
Looks like there has been some additions and changes to the my project. Let’s take a look at what is different from our last commit by using the git diff command.
In this case we want the diff of our most recent commit, which we can refer to using the HEAD pointer.
git diff HEAD
by dukeyunz
相关文章推荐
- windows如何设置本地git仓库与远程的github关联
- git本地仓库管理远程仓库
- 使用Git将本地仓库与GitHub远程仓库相关联
- Git 远程仓库搭建
- Git学习之路(5)- 同步到远程仓库及多人协作问题
- ubuntu-git远程仓库管理
- git fetch 更新远程代码到本地仓库
- git - 远程仓库的删除和重命名
- 使用git将代码存入远程仓库github和从github上克隆代码到本地
- windows下多个git账号配置并且将本地仓库项目推送到远程仓库
- git_彻底的回退到指定版本,远程仓库也需要彻底回退,不留痕迹
- git远程仓库回滚
- git 将一个本地文件目录提交到远程仓库的步骤
- git使用GitHub远程仓库
- 本地Git仓库和远程仓库的创建及关联
- can't resolve host-使用GIT 请求远程仓库时出现的问题以及解决办法
- git 远程仓库和分支的一点经验
- Git教程:远程仓库
- Git克隆远程仓库
- 关于git远程仓库的配置