git repository 的使用

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.

时间: 2024-10-09 20:27:14

git repository 的使用的相关文章

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

在看书 FlaskWeb开发:基于Python的Web应用开发实战 时,下载完源码后 git clone https://github.com/miguelgrinberg/flasky.git 试着 切换到 提交历史 1a, $ git checkout 1a,出现error: fatal: Not a git repository (or any of the parent directories): .git 这个提示表明现在不在一个git repository目录下,需要切换到flask

把Git Repository建到U盘上去

Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具备神二代的气质和品质: 促进了生产力的发展,Git的分布式版本控制理念,并非首创,但非常适合开源社区的协作方式(不存在master-slave的关系) GitHub GitHub很好,号称代码界的facebook. facebook,twitter,Microsoft,vmware,redhat,LinkedIn,Yahoo等公司都在GitHub上有建立数目不等的repositories.一些知名开源项目,例如jQuer

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

fatal: Not a git repository (or any of the parent directories): .git 在用个git上传android项目时发现 git add file添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录,解决办法如下: 接着在下一行直接输入git init就可以了!

新目录下使用git管理,未配置.git目录,报错fatal: Not a git repository (or any of the parent directories): .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 This tells you that the directory you're in is not a git repository. Before you can add

git 解决fatal: Not a git repository

我用 git remote add origin [email protected]:michaelliao/learngit.git 添加远程库时提示: fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录, 解决办法如下: 当时发现自己所在目录并非git初始化库目录,所以跳转到git库,重新运行ok;

getting “fatal: not a git repository: '.'” when using post-update hook to execute 'git pull' on another repo

Here is the script that ultimately worked. I think the bit I was originally missing that prevented it from working remotely was the unset GIT_DIR #!/bin/shcd /path/to/working-copy/ || exitunset GIT_DIRgit pull repo branch exec git-update-server-info

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

把Git Repository建到U盘上去 转 把Git Repository建到U盘上去 Git很火.原因有三: 它是大神Linus Torvalds的作品,天然地具备神二代的气质和品质: 促进了生产力的发展,Git的分布式版本控制理念,并非首创,但非常适合开源社区的协作方式(不存在master-slave的关系) GitHub GitHub很好,号称代码界的facebook. facebook,twitter,Microsoft,vmware,redhat,LinkedIn,Yahoo等公司

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

命令格式 git init [-q | --quiet] [--bare] [--template=<template_directory>] [--separate-git-dir <git dir>] [--shared[=<permissions>]] [directory] 命令参数 --quiet, -q 安静模式,只打印错误和警告信息. 实例 a) 创建版本库 [[email protected] git]$ mkdir hello_git [[email 

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添加文件时出现这样错误: fatal: Not a git repository (or any of the parent directories): .git 提示说没有.git这样一个目录,解决办法如下: git init就可以了!

repo sync出现“fatal: &#39;../platform/abi/cpp.git&#39; does not appear to be a git repository”的解决方案

在我下载Android源代码时,在最后一步调用repo sync,出现“fatal: '../platform/abi/cpp.git' does not appear to be a git repository”,后来在网上查了资料,参考http://zxquiet.iteye.com/blog/1470991和http://bbs.csdn.net/topics/380254094. 1.在存放android系统源代码的目录(也就是执行repo sync命令的目录)下,有个.repo的隐藏