初出茅庐之基础篇

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是否会产生冲突?)

2->git rebase vs git merge

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:

最新文章

  1. 使用WebRTC搭建前端视频聊天室——点对点通信篇
  2. bash学习
  3. c++局部变量经典举例
  4. C# ComBox 垂直滚动条
  5. python deep copy and shallow copy
  6. [LeetCode] Min Stack
  7. [转]LINQ之路系列博客导航
  8. Cocos2dx-3.0版本 从开发环境搭建(Win32)到项目移植Android平台过程详解
  9. Struts2的使用以及Spring整合Struts2
  10. 响应式HTML5+CSS3 网站开发测试实践
  11. Linux安装配置JDK
  12. gulp edm测试
  13. merge into Oracle里的 saveOrUapdate
  14. WPF Binding
  15. js常用正则表达式汇总
  16. css基础之 图片瀑布流布局:用CSS+DIV等宽格子堆砌瀑布流效果 (一)
  17. Android 点亮屏幕
  18. Linux查看分区文件系统类型总结
  19. caffe程序中出现的db.cpp:#line(行号) unknown database backend问题
  20. byte数组和int之间相互转化的方法

热门文章

  1. Longest Continuous Increasing Subsequence II
  2. [Flutter] Custom a Slider with SliderTheme
  3. 任晓蕊 2019-2020-1 20199302《Linux内核原理与分析》第四周作业
  4. php 压缩文件
  5. 在Android Studio中找不到AppCompatActivity解决方案
  6. Hbase监控指标项
  7. 任意模数FFT
  8. js 中数组对象的定义赋值 以及方法
  9. GO语言strconv包的使用
  10. input标签type="file"上传文件的css样式