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. JS复习:第二十二章

    一.高级函数 1.在任何值上调用Object原声的toString( )方法,都会返回一个[object NativeConstructorName]格式d字符串.每个类在内部都有一个[[Class] ...

  2. JavaScript的计时器对象

    1.JavaScript计时器,我们可以在设定的时间间隔之后来执行代码,而不是在函数被调用后立即执行. 计时器类型:    1)一次性计时器:仅在指定的延迟时间之后触发一次.    2)间隔性触发计时 ...

  3. sql表命名规范

    tb_new_Count 新闻内容表:首先表加tb_,如果是视图则加V_存储过程加_p. 下划线后面要大写. 切记.(萌萌的国庆要加油)

  4. Bootstrap介绍

    Bootstrap是基于HTML.CSS和JavaScript开源的前端开发工具包. 1.响应式布局: 效果:根据浏览器的宽度来调整页面布局. 例如: <html lang="en&q ...

  5. lldpd启动脚本分析

    #!/bin/sh /etc/rc.common # Copyright (C) 2008-2012 OpenWrt.org #启动顺序 START=90 #创建PID文件 SERVICE_USE_P ...

  6. Nimbus<三>Storm源码分析--Nimbus启动过程

    Nimbus server, 首先从启动命令开始, 同样是使用storm命令"storm nimbus”来启动看下源码, 此处和上面client不同, jvmtype="-serv ...

  7. LeetCode OJ 75. Sort Colors

    Given an array with n objects colored red, white or blue, sort them so that objects of the same colo ...

  8. 此 ObjectContext 实例已释放,不可再用于需要连接的操作

    EF 查询包含导航属性的Model,经常会遇到 此 ObjectContext 实例已释放,不可再用于需要连接的操作 这种错误,解决方法如下: db.T_DailyRecord.Include(&qu ...

  9. Openjudge-计算概论(A)-回文串判断

    描述: 任意给定一个非空的字符串,判断其是否是回文串.回文串是指正向看和反向看均相等的串,如AbcDcbA和cDDc.如果是回文串,则输出1,否则,输出0 输入长度不小于1不大于100的字符串输出如果 ...

  10. C# 二维数组和集合

    本次课我主要学习了二维数组和集合的部分内容. 在二维数组的部分中,我主要学习了二维数组的定义方法:int [,] array=new int [4,2];做了一个小练习:用二维数组打印自己的姓氏. s ...