-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
GIT - The Brief Introduction
GIT入门ABC
What is GIT?
- 当前最流行的
分布式版本控制系统 - 轻巧而强大的
分支控制
Some Basic Commands
注意GIT的分布式特性以及与SVN的对比
clone=~svn checkoutsuch asgit clone https://github.com/chenkan/Demo.gitstatusis a smart command, such asgit statusaddsuch asgit add <filename>(here a concept:stage/index)commitsuch asgit commit <filename> -m 'this is a msg'push=~svn commitsuch asgit pushpull/fetch=~svn up
拓展阅读
git status详解pull与fetch详解
Branch Control
分支控制算是GIT的必杀技,在GIT中分支创建和管理的成本几乎为零
大量使用分支进行开发是GIT的特色及优势所在
What is GIT's Branch?
《ProGit》书曰
Git中的分支,其实本质上仅仅是个指向commit对象的可变指针那么,Git又是如何创建一个新的分支的呢?答案很简单,创建一个新的分支指针
Some Branch Commands
git branch -a: 显示所有分支git checkout -b myfeature dev: 基于dev分支创建一个新分支git merge --no-ff myfeature: 将完成开发的分支merge回来git checkout -b remote_branch origin/remote_branch: 切换至指定资源库分支进行工作git checkout remote_branch: 效果等同于上一句命令git push -u origin local_created_branch: 将本地创建的分支推送至资源库git stash: 暂存当前工作内容
拓展阅读
merge与rebase详解及对比
GIT Flow
一些开发模型与方式
- GIT标准开发模型(
http://www.oschina.net/translate/a-successful-git-branching-model) - 本地小分支开发(讨论)
- 前后端联调开发(讨论)
Demo with Eclipse
插件 : Egit
基本上与SVN操作很类似,假设不涉及分支操作,相似度可达95%
GIT Tools
托管服务器
githubgitlabgerrit
命令行工具
zsh- Mac/LinuxPowerShell + posh-git- Windows
Reference
《pro git》前三章 - 基础知识,建议认真阅读http://robbinfan.com/blog/34/git-common-command- 推荐打印出来,随手可查http://marklodato.github.io/visual-git-guide/index-zh-cn.html?no-svg
THE END
拥抱变化 拥抱GIT
改变工具 改变流程
Reactions are currently unavailable