透过SourceTree再谈Git
初出茅庐之基础篇
1. Download SourceTree from:
https://www.sourcetreeapp.com/
2.Complete the installation.
3.After installation, you can see below page:

4.Clone a repository from the remote url:

5.When you open the repository, click Branch of the menu to create a new branch named Dev:

6.Click Push of the menu, select the newly created branch and push it to the remote, then it will be a remote branch:

7.Now you can see the new remote branch from the left panel:

声名鹊起之进阶篇
1->git pull vs git fetch
In the simplest terms, git pull does a git fetch followed by a git merge.

- When you use pull, Git tries to automatically do your work for you. It is context sensitive, so Git will merge any pulled commits into the branch you are currently working in. pull automatically merges the commits without letting you review them first. If you don’t closely manage your branches, you may run into frequent conflicts.
- When you fetch, Git gathers any commits from the target branch that do not exist in your current branch and stores them in your local repository. However, it does not merge them with your current branch. This is particularly useful if you need to keep your repository up to date, but are working on something that might break if you update your files. To integrate the commits into your master branch, you use merge.
One of the git tips that I find myself frequently passing on to people is:
- Don’t use git pull, use git fetch and then git merge.
(Q:如果开发的feature已经commit到了local repository,此时通过git fetch是否会产生冲突?)
Rebasing is the process of moving or combining a sequence of commits to a new base commit. Rebasing is most useful and easily visualized in the context of a feature branching workflow. The general process can be visualized as the following:

透过SourceTree再谈Git的更多相关文章
- 再谈git和github-深入理解-3
git tag -a 和 -m的区别? -a是 注解 是单词 "annotate"的意思 , 表示 "给标签一个名字, 标签名 -m 是创建标签时的消息备注 git ta ...
- 再谈git和github-深入理解-2
github中的 sloc是什么意思? sloc: source lines of code: 代码行数, 源代码行. 要向仓库中 create file/upload file/edit file等 ...
- 再谈git和github-深入理解
git中的 objects 和 refs 是什么? 目录objects是仓库的 "对象库" , 是包含 代码, 提交, 日志, 信息, 索引等信息的关键所在 refs是一些 sha ...
- 再谈git的http服务-权限控制gitweb版(未成功)
截至目前,对gitweb的掌握还没达到最终目标,仅仅实现了通过浏览器来浏览项目,通过git命令仍然未能clone项目.但仍然要记录下来,主要是因为打算暂时放弃这条路,而所收获的一些经验还是要记录下来. ...
- 再谈git的http服务-权限控制hooks版
通过git-http-backend方法提供的http服务基本上可以做到认证用户才能使用,但只能控制到服务器路径访问,而且无法区分读写.经过不懈努力,找到了方法,相关脚本及配置见后. 基本思路就是利用 ...
- 再谈git的http服务
因为git服务器搬迁,需要重新安装git服务器,在网上搜索了下,发现之前的方法太复杂,复杂到自己都没彻底弄明白.其实通过git自带的git-http-backend脚本配合apache2的http服务 ...
- 基于SourceTree 下的 Git Flow 模型
基于SourceTree 下的 Git Flow 模型 1. sourceTree 是一个开源的git 图形管理工具,可下载mac版本,windows版本 2. Git Flow 是一套使用Git进 ...
- 浅谈GIT
浅谈GIT: 牛老师提出的git,于我而言,是一个陌生和新鲜的词汇,在此之前我从未听过git,按照老师的要求,我去搜索了关于git的介绍,有些看懂了,但大部分还是不懂得,在介绍中我了解git其实之前使 ...
- 开发工具--浅谈Git
工具|浅谈Git Git这个工具,是我一直想写文章,终于我实现了我的想法.在我开始写之前,发表一下自己的看法,git只是一个工具,既然已经认定是一个工具,那么一定具备工具这类的共同特征,请用面向对象的 ...
随机推荐
- LeetCode 321. Create Maximum Number
原题链接在这里:https://leetcode.com/problems/create-maximum-number/description/ 题目: Given two arrays of len ...
- MySQL InnoDB存储引擎事务的ACID特性
1.前言 相信工作了一段时间的同学肯定都用过事务,也都听说过事务的4大特性ACID.ACID表示原子性.一致性.隔离性和持久性.一个很好的事务处理系统,必须具备这些标准特性: 原子性(Atomicit ...
- 码农,就要做有范儿的geek【网摘】
摘要: “我是个geek,圈子里都称呼我为xx,我周一到周五亲自写写代码,指导指导新人,周末参加圈子的活动,跟别人分享一下我的经验.至于未来嘛,还没想过,反正自己技术水平在这了,呵呵,扎克伯格当年不也 ...
- cf 1037D BFS
$des$一个 n 个点 m 条边的无向连通图从 1 号点开始 bfs,可能得到的 bfs 序有很多,取决于出边的访问顺序.现在给出一个 1 到 n 的排列,判断是否可能是一个 bfs 序. $sol ...
- 生活中需要一台mac本子
用了好多年的windows系统,各种快捷键玩得飞起.当时对mac笔记本的印象就是. mac本子好高大上,搞设计的人才会去用的.(这个也是我听其他人说的) 在当时公司搞IOS开发的人中,面对这个高大上的 ...
- 几款抓包工具在windows,mac,linux下的支持分析
抓包工具的使用 几款抓包工具在windows,mac,linux下的支持分析 抓包工具简介 Chrome/Firefox 开发者工具: 浏览器内置,方便易用 Fiddler/Charles: 基于代理 ...
- Struts2.5入门之环境设置
1. 下载Struts2.5,下载地址 2. 新建项目struts2 3. 解压后将struts\lib下的所有jar包复制到WEB-INF/lib文件夹下 4. 修改web.xml配置文件,添加如下 ...
- Intellij IDEA中maven项目打包问题
学习使用java写项目的时候,java的jar包对我来说是很神奇又很复杂不想去了解的东西,如今形势所迫开始写java项目,做了些了解,也有几个问题. 1.其中一个打包方式 在pom文件中输入如下插件( ...
- ManualResetEven使用的最清楚说明
ManualResetEven使用的最清楚说明 快速阅读 理解ManualResetEvent,以及如何使用. 官方说明 官方介绍:https://docs.microsoft.com/en-us/d ...
- 像母语者一样说美语 How to Improve Spoken American English - Sound like a Native Speaker
视频讲解: 视频详情见:https://www.bilibili.com/video/av75075387/ 总结分析: 001 要点总结: 1. 本富兰克林方法: 要你写下一切听到的东西 2. 辅音 ...