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 的使用的更多相关文章

  1. git: fatal: Not a git repository (or any of the parent directories): .git

    在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 ...

  2. git 解决fatal: Not a git repository

    我用git add file添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没 ...

  3. 把Git Repository建到U盘上去(转)

    把Git Repository建到U盘上去 转 把Git Repository建到U盘上去 Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具备神二代的气质和品质: 促进了生 ...

  4. fatal: Not a git repository (or any of the parent directories): .git

    $ git remote add origin https://github.com/heyuanchao/YouxibiClient.gitfatal: Not a git repository ( ...

  5. Git CMD - init: Create an empty Git repository or reinitialize an existing one

    命令格式 git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir &l ...

  6. git错误:fatal: Not a git repository (or any of the parent directories): .git

    git错误:fatal: Not a git repository (or any of the parent directories): .git 我用git add file添加文件时出现这样错误 ...

  7. git 使用过程中遇到的问题does not appear to be a git repository Could not read from remote respository

    想把本地的git库上传到github上.github已经新建了一个public仓库,利用网站的命令 git Bash报错:does not appear to be a git repository  ...

  8. 执行git命令时出现fatal: 'origin' does not appear to be a git repository错误

    在执行git pull origin master时出现: fatal: 'origin' does not appear to be a git repository fatal: Could no ...

  9. git出现: not a git repository

    使用用git add . 出现这样错误: fatal: not a git repository (or any of the parent directories): .git 意思是说:.git没 ...

  10. linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法

    输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...

随机推荐

  1. JavaScript 运动框架 Step by step(转)

    1,运动原理 Js运动,本质来说,就是让 web 上 DOM 元素动起来.而想要 DOM 动起来,改变其自身的位置属性,比如高宽,左边距,上边距,透明度等.动画的原理就是把不同状态的物体,串成连续的样 ...

  2. [jquery备忘]

    has :包含,找元素里面的子元素(单个) <div><span>123</span></div> $('div').has('span').css() ...

  3. xlrd doc

    The xlrd Module A Python module for extracting data from MS Excel ™ spreadsheet files. Version 0.7.3 ...

  4. openwrt下关于snmpd的一些信息

    cd /tmp/ 上传: tftp -gr libnetsnmp_5.4.4-1_ar71xx.ipk 192.168.11.56 安装: opkg install libnetsnmp_5.4.4- ...

  5. PBO

    #include <GL/glew.h> #include <GL/freeglut.h> #include <iostream> GLuint pboID[]; ...

  6. 带密钥的sha1加密

    带密钥的sha1加密: private static string HmacSha1Sign(string jsonStr, string secretKey, string enCoding ) { ...

  7. UITextField的属性设置

    1.背景颜色 field.backgoundColor = [UIColor redColor]; 2.设置field文字 field.text = @"输入文字"; 3.设置fi ...

  8. PMP培训感想

      终于等到了C打头的邮件,等了几个星期,悬着的心终于放了.1P4M,基本跟平时模块成绩一致.当初模考时,第一次考了126,还算比较满意,毕竟还没开始苦逼看嘛,悲剧的是不管后面再怎么努力,成绩始终在1 ...

  9. C# 读取二进制文件

    using UnityEngine; using System.Collections; using System; using System.IO; public class Test : Mono ...

  10. java程序使用memcached

    Memcached是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载. 1.linux环境下安装与启动memcache: 以编译安装的方式安装.具体参看: http://wang ...