How to push your code in git
1. display all the branches
git branch -a
2. delete branches
git br -d <branch> # 删除某个分支 git br -D <branch> # 强制删除某个分支 (未被合并的分支被删除的时候需要强制) 分支合并和rebase git merge <branch> # 将branch分支合并到当前分支 git merge origin/master --no-ff # 不要Fast-Foward合并,这样可以生成merge提交
Make sure you have the latest code
$git pull
Create your local_branch and checkout to it from [master]
$git checkout -b loca_branch
Modify your code and add all modified files you want to commit
$git add -A
Input commit messages $git commit -s
Create your remote_local_branch and push your commit to it. $git push origin local_branch:remote_local_branch
查看分支
git branch
或者
git branch -v A) 创建分支
git branch mystudygit1. B) 切换分支
git checkout mystudygit1. C) 删除分支
git branch -d mystudygit1. //如果该分支没有合并到主分支会报错
或者
git branch -D mystudygit1. //强制删除 D) 分支合并
比如,如果要将开发中的分支(develop),合并到稳定分支(master),
首先切换的master分支:git checkout master。
然后执行合并操作:git merge develop。
如果有冲突,会提示你,调用git status查看冲突文件。
解决冲突,然后调用git add或git rm将解决后的文件暂存。
所有冲突解决后,git commit 提交更改。
例如:将acc2f69提交合并到当前分支
git merge acc2f69 E)合并 git如何clone 远程github中的分支?
git clone -b release_branch https://github.com/jetty/
How to push your code in git的更多相关文章
- git push代码时的'git did not exit cleanly (exit code 1)'问题解决
在利用git管理本地发布的galleryLeftOrRight插件项目时,按照git的使用方法:先commit→master,再 push,发现提示错误git did not exit cleanly ...
- 使用vs code实现git同步
用了git最方便的就是项目同步管理,回到家打开vscode只需要点击一下pull就能全部同步过来.是不是很方便....毕竟之前我都是拿u盘拷贝回家或者存到云盘再下载下来.. 我这里用的是国内的码云 ...
- VS Code使用Git管理代码
Visual Studio Code(简称VS Code)是一个轻量级且强大的代码编辑器,后台是微软,支持Windows.Mac和Linux操作系统,拥有丰富的插件生态系统,可通过安装插件来支持C++ ...
- 【转载】使用阿里云code和git管理项目
使用代码云托管和git来管理项目可以使多客户端和多人开发更加高效.通过对比github,bitbucket和国内一些云托管服务发现阿里云在项目空间和传输速度及稳定性上更能满足公司开发的要求.本文将介绍 ...
- Salesforce学习之路(三)利用VS Code结合Git开发Salesforce
在前面说了一些有关Admin的知识,但实际开发运用中,仅凭Admin的配置很难满足项目的定制化需求,因此基于CRM的二次开发则应运而生. 由于国内资料相对较少,所以很多入门新手无处下手,那这里就简单介 ...
- Visual Studio Code 使用Git进行版本控制
Visual Studio Code 使用Git进行版本控制 本来认为此类教程,肯定是满网飞了.今天首次使用VS Code的Git功能,翻遍了 所有中文教程,竟没有一个靠谱的.遂动笔写一篇. 请确保你 ...
- git push origin master、git pull出现如下错误
git push origin master出现如下错误: Counting objects: , done. Writing objects: % (/), bytes, done. Total ( ...
- 【转】Visual Studio Code 使用Git进行版本控制
原文链接:https://www.cnblogs.com/xuanhun/p/6019038.html?utm_source=tuicool&utm_medium=referral 本来认为此 ...
- 解决failed to push some refs to git
Administrator@PC-20150110FGWU /K/cocos2d/yc (master) $ git push -u origin master To git@github.com:y ...
随机推荐
- linux nginx 配置ssl证书访问
http://www.linuxidc.com/Linux/2013-08/88271.htm 一.什么是 SSL 证书,什么是 HTTPSSSL 证书是一种数字证书,它使用 Secure Socke ...
- Linq 多条件连接
var total = (from a in all join g in group_M ...
- maxscript, 数组和字符串下标是从1开始的
maxscript中数组和字符串下标是从1开始的.
- P1027 木瓜地
/*=========================================================== 描述 Description Bessie不小心游荡出Farmer John ...
- SqlParameter设定的value值为0时、调用的存储过程获取到的值却为null解决方法
原C#代码如下: if (query != null) { switch (query.MethodFlag) { //进出口退补税额统计表 case (int)EnumClassifyCorrect ...
- 转载:使用sklearn进行数据挖掘
目录 1 使用sklearn进行数据挖掘 1.1 数据挖掘的步骤 1.2 数据初貌 1.3 关键技术2 并行处理 2.1 整体并行处理 2.2 部分并行处理3 流水线处理4 自动化调参5 持久化6 回 ...
- apache配置weblogic部署集群,多节点的项目和单节点项目并存 负载均衡
开启模块如下: LoadModule weblogic_module modules/mod_wl_22.so LoadModule lbmethod_byrequests_module module ...
- CentOs 设置静态IP 方法 dhcp的配置
0.自动获取配置 DEVICE=eth0 HWADDR=00:0C:39:AD:11:48 TYPE=Ethernet UUID=c230a1e5-a535-487a-aab5-2fad7cd5583 ...
- .NET中的Timer类型用法详解
这篇文章主要介绍了.NET中的Timer类型用法,较为详细的分析了Timer类型在各种环境下的用法,需要的朋友可以参考下 在.NET FrameWork中有多个Timer,那么怎么根据实际情况进行 ...
- Activation successful 数据库邮件无法发送
问题现象: 配置好数据库邮件后发送测试邮件. 在数据库邮件发送日志中显示状态为:Activation successful.而邮件是无法收到的. 解决方法: 本次解决是将SQL Server Agen ...