Fetch

This command is to make sure your local repository has the same knowledge of the remote-tracking branches as the server.

git fetch <remote name>

Check out a Remote Branch

If a new remote branch doesn't have a local branch mapped to it, you need to check out the remote branch locally to work on it. The complete command is,

git checkout -b <local branch name> <remote name>/<remote branch name>

If you want to fetch  all the branches on the server

git branch -v -a

References:

http://stackoverflow.com/questions/1783405/checkout-remote-git-branch

Push

Push changes to remote. (If the remote doesn't have the branch, the branch will be created)

git push <remote name> <branch name>

Renaming a branch (a complete version of push command)

This can delete a  remote branch by providing empty local branch name.

git push <remote name> <local branch name>:<remote branch name>

References:

https://help.github.com/articles/pushing-to-a-remote/

http://stackoverflow.com/questions/2765421/push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too

最新文章

  1. iOS5.0以上使用新浪微博开放平台OAuth 续(及解决登录无效问题)
  2. Python第二模块(文件和函数)
  3. 小说一下case ~
  4. [转载]窗口之间的主从关系与Z-Order
  5. POJ 2195:Going Home(最小费用最大流)
  6. 【20160924】GOCVHelper MFC增强算法(4)
  7. iq 格式分析
  8. StyleCop学习笔记——默认的规则
  9. SQL —— 一些需要注意的地方(持续更新)
  10. 文件中的类都不能进行设计,因此未能为该文件显示设计器。设计器检查出文件中有以下类: FormMain --- 未能加载基类“WinForm.Win.FormsBase.FormMainBase”。请确保已引用该程序集并已生成所有项目
  11. python中如何使用help命令?
  12. 寻找大学目标及行动步骤——记ITAEM团队第二期宣讲会(2014.05.14)
  13. DevExpress 学习使用之 TreeList
  14. hadoop源码调试
  15. maven web工程缺少 src/main/java 和 src/test/java 资源文件夹的方法
  16. jeffy-vim-v3.1.tar.gz
  17. Scrapy学习篇(七)之Item Pipeline
  18. ArcGIS案例学习笔记4_1_水文分析
  19. 笔记:使用mailto在网页中链接Email地址
  20. spring mvc接收数组

热门文章

  1. [转载]深入理解HTTP Session
  2. localstorage 和 sessionstorage 本地存储
  3. Cvim的安装与使用
  4. 1.44tft
  5. css3 自定义字体的使用方法
  6. Battleships in a Board
  7. IntelliJ IDEA WEB项目的部署配置
  8. 转行进入IT前端,目标全栈
  9. Linux 添加完硬盘后,如何挂载和分区、以及其他的分区不足,如何从新的硬盘上挂载借用
  10. rem、px、em之间的区别以及网页响应式设计写法