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语言文法
<程序>→<外部声明>|<程序><外部声明> <外部声明>→<函数定义>|<声明> <函数定义>→< ...
- linux 下安装 mysql5.7.16安装
1.groupadd mysql ## 添加一个mysql组 2.useradd -r -g mysql mysql ## 添加一个用户 3.解压缩下载的包,tar -xzvf /da ...
- PHP中常见的提示对照表
.Notice: Undefined variable: 变量名 in 注:使用了一个没有被定义的变量 .Parse error: syntax error, unexpected T_ELSE in ...
- 将Vuforia程序发布到Windows10系统的基本流程
最新博客地址已转到: http://blog.csdn.net/zzlyw?viewmode=contents ------------------------------------------ ...
- 如何将Sphinx生成的html文档集成进入Django
参考 http://stackoverflow.com/questions/10594618/django-and-sphinx-how-to-view-the-html-sphinx-generat ...
- Mac Vim + ctags 实现多目录跳转
set tags=tags; set autochdir :wq保存. 在源码根目录中输入ctags -R命令.后重启vim,打开src文件,就能使用Ctrl+] 或 g Ctrl+] 来实现跳转了. ...
- rocketmq生产者和消费者
1.生产者: package com.ebways.mq.test.mq; import com.alibaba.rocketmq.client.exception.MQClientException ...
- iOS 编译时的警告导致无法通过编译
今天编译react native的代码,发现了2个警告,但是系统却当做错误,不能编译成功,查看了一下编译选项,看到了如下配置: 注意到这个-Werror 了吗? 就是这个标志导致系统把所有的 警告都当 ...
- 移植一个cocos2d-x游戏
1.编译的时候,如果遇到如下的提示信息: No rule to make target `jni/./../Classes/KeyBoardInput.cpp', needed by `obj/loc ...
- WPF制作的VS黑色风格的Listbox
最近写的一个玩具,WPF写出来的东西还是挺好看的 style.xaml <ResourceDictionary xmlns="http://schemas.microsoft.com/ ...