码迷,mamicode.com
首页 > 其他好文 > 详细

git repository 的使用

时间:2016-11-26 19:58:20      阅读:399      评论:0      收藏:0      [点我收藏+]

标签:fetch   developer   director   type   out   mit   rom   工作   ras   

1. You should only be pushing to a bare repository. A bare repository is a repository that has no checked out branches. If you were to cd to a bare repository directory, you‘d only see the contents of a .git directory.

技术分享

 

2.git 是分布式的,distributed. 有几种常见的工作流的工作方式

Distributed

One of the nicest features of any Distributed SCM, Git included, is that it‘s distributed. This means that instead of doing a "checkout" of the current tip of the source code, you do a "clone" of the entire repository.

Multiple Backups

This means that even if you‘re using a centralized workflow, every user essentially has a full backup of the main server. Each of these copies could be pushed up to replace the main server in the event of a crash or corruption. In effect, there is no single point of failure with Git unless there is only a single copy of the repository.

Any Workflow

Because of Git‘s distributed nature and superb branching system, an almost endless number of workflows can be implemented with relative ease.

Subversion-Style Workflow

A centralized workflow is very common, especially from people transitioning from a centralized system. Git will not allow you to push if someone has pushed since the last time you fetched, so a centralized model where all developers push to the same server works just fine.

技术分享

Integration Manager Workflow

Another common Git workflow involves an integration manager — a single person who commits to the ‘blessed‘ repository. A number of developers then clone from that repository, push to their own independent repositories, and ask the integrator to pull in their changes. This is the type of development model often seen with open source or GitHub repositories.

技术分享

Dictator and Lieutenants Workflow

For more massive projects, a development workflow like that of the Linux kernel is often effective. In this model, some people (‘lieutenants‘) are in charge of a specific subsystem of the project and they merge in all changes related to that subsystem. Another integrator (the ‘dictator‘) can pull changes from only his/her lieutenants and then push to the ‘blessed‘ repository that everyone then clones from again.

技术分享

 

git repository 的使用

标签:fetch   developer   director   type   out   mit   rom   工作   ras   

原文地址:http://www.cnblogs.com/oxspirt/p/6104747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!