Git Commands Quick Notes
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/
Git Commands Quick Notes的更多相关文章
- Basic Git commands
Basic Git commands Skip to end of metadata Created by Paul Watson [Atlassian], last modified on Nov ...
- [label][git-commands] Several Git Commands
The process of Git commands Operation 1. git commit -m 'fist post' Windows PowerShellCopyright (C) 2 ...
- Git Commands
Show ssh key file: ssh -v git@github.com
- Useful Git Commands for me
查看Git追踪的文件 git ls-files 移除远程仓库的文件夹 git rm -r --cached some-directory git commit -m "Remove th ...
- Very Good Article on How Git Commands Work
http://stackoverflow.com/questions/30038999/differences-between-commit-commit-and-push-commit-and-sy ...
- Quick Notes
激励 每当在书中读及那些卑微的努力,都觉得感动且受震撼.也许每个人在发出属于自己的光芒之前,都经历了无数的煎熬,漫长的黑夜,无尽的孤独,甚至不断的嘲讽和否定,但好在那些踮脚的少年,最后都得到了自己想要 ...
- Git for Windows v2.11.0 Release Notes
homepage faq contribute bugs questions Git for Windows v2.11.0 Release Notes Latest update: December ...
- git submodule 使用
这个是备忘录,原网页: https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407 http://cncc.bingj.c ...
- 实践中的Git常用指令分析
从工作开始,一直都在使用为知笔记(作为程序员需要知道的内容很多---不需要很深入理解,一段时不使用的东西可能就会忘记).但本周一同步不同PC端时,了解到为知会在2017/1/1开始收费! 既然收费了, ...
随机推荐
- 由表单验证说起,关于在C#中尝试链式编程的实践
在web开发中必不可少的会遇到表单验证的问题,为避免数据在写入到数据库时出现异常,一般比较安全的做法是前端会先做一次验证,通过后把数据提交到后端再验证一次,因为仅仅靠前端验证是不安全的,有太多的htt ...
- Android的Intent.FLAG_ACTIVITY_CLEAR_TOP无效
转载:http://blog.csdn.net/u011361576/article/details/48626237 今天写代码遇到了一个问题: 当 B - A - B 跳转的时候,使用Intent ...
- WPF中弹出菜单
在WPF里弹出菜单是用Popup,你那个右键的是上下文菜单(也就是快捷菜单). <Grid> <Button x:Name="BtnPop" Width=&quo ...
- mongodb 数据库查询
- Feature Access
在ArcGIS Server中发布支持Feature Access地图服务,你需要知道的几点: 所绘制的mxd地图文件中包含的数据,必须来自企业级数据库链接: mxd中包含的所有图层的数据,必须来自同 ...
- css3中变形函数(同样是对元素来说的)和元素通过改变自身属性达到动画效果
/*对元素进行改变(移动.变形.伸缩.扭曲)*/ .wrapper{ margin:100px 100px auto auto; width:300px; height:200px; border:2 ...
- ABAP READ TABLE语句注意
READ TABLE 后注意判断 sy-subrc 是否等于0
- linux commands
abrt-cli --since ;查看abrt捕捉的异常 alias ;别名,alias rm='rm -i':使用“ \rm ” 使用原命令 alsamixer ;图形音量调节,q 增加左声道, ...
- JSP复习整理(二)基本语法
最基础的整理.. 一.语句声明 <%@ page language="java" contentType="text/html; charset=UTF-8&quo ...
- netstat相关
1. netstat基本参数: 参数 说明 输出 -a 列出所有连接. 列出 tcp, udp 和 unix 协议下所有套接字的所有连接.然而这些信息还不够详细,管理员往往需要查看某个协议或端口的具体 ...