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) 创建版本库
[huey@huey-K42JE git]$ mkdir hello_git
[huey@huey-K42JE git]$ cd hello_git/
[huey@huey-K42JE hello_git]$ git init
Initialized empty Git repository in /home/ucm/git/hello_git/.git/
b) 为已存在的代码库创建版本库
[huey@huey-K42JE git]$ mkdir hello_world
[huey@huey-K42JE git]$ echo -e '#!/usr/bin/python\nprint "hello world"' > hello_world/hello.py
[huey@huey-K42JE git]$ chmod a+x hello_world/hello.py
[huey@huey-K42JE git]$ cd hello_world/
[huey@huey-K42JE hello_world]$ git init
Initialized empty Git repository in /home/huye/git/hello_world/.git/
[huey@huey-K42JE hello_world]$ git add .
[huey@huey-K42JE hello_world]$ git commit -m "Start a new Git repository for an existing code base"
[master (root-commit) b65bd46] Start a new Git repository for an existing code base
1 files changed, 2 insertions(+), 0 deletions(-)
create mode 100755 hello.py
更多
http://git-scm.com/docs/git-init
Git CMD - init: Create an empty Git repository or reinitialize an existing one的更多相关文章
- Git CMD - add: Record changes to the repository
		
命令格式 git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend] [--dry-run] [(-c ...
 - Git CMD - tag: Create, list, delete or verify a tag object signed with GPG
		
命令格式 git tag [-a | -s | -u <keyid>] [-f] [-m <msg> | -F <file>] <tagname> [& ...
 - 指定文件夹 指定文件后缀名    删除整个文件夹 git  冲突解决  create a new repository on the command line   push an existing repository from the command line
		
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375840038939c2 ...
 - Git CMD - clone: Clone a repository into a new directory
		
命令格式 git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare ...
 - Git CMD连接,管理(remote,add,commit,push)github repository
		
git initmd testcd testgit statusgit add test //git add test/a.txtgit status git remote add origin g ...
 - git clone all branch and create a empty branch
		
/******************************************************************** * git clone all branch and cre ...
 - Git CMD - config: Get and set repository or global options
		
命令参数 --get 获取指定的配置项. --global 对于写选项:全局配置,将参数配置于 ~/.gitconfig 而不是仓库目录下的 .git/config.对于读选项:只从 ~/.gitco ...
 - Git CMD - branch: List, create, or delete branches
		
命令格式 git branch [--color[=<when>] | --no-color] [-r | -a] [--list] [-v [--abbrev=<length> ...
 - 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添加文件时出现这样错误 ...
 
随机推荐
- hdu4614Vases and Flowers(线段树,段设置,更新时范围的右边值为变量)
			
Problem Description Alice is so popular that she can receive many flowers everyday. She has N vases ...
 - POJ1062昂贵的聘礼(dijkstra)
			
昂贵的聘礼 题目大意是说有N个物品,每个物品都有自己的价格,但同时某些物品也可以由其他的(可能不止一个)替代品,这些替代品的价格比较“优惠”,问怎么样选取可以让你的花费最少来购买到物品1 由于有N个物 ...
 - 从Jetty、Tomcat和Mina中提炼NIO构架网络服务器的经典模式(三)
			
转载 http://blog.csdn.net/cutesource/article/details/6192163 最后我们再看看NIO方面最著名的框架Mina,抛开Mina有关session和处理 ...
 - swfupload用法总结
			
<script src="${base}/thirdparty/swfupload/swfupload.js" type="text/javascript" ...
 - exit和_exit的区别
			
参考 http://www.cnblogs.com/hnrainll/archive/2011/08/17/2142001.html p.p1 { margin: 0.0px 0.0px 0.0px ...
 - Python魔术师--self
			
(原文是 Python's Magical Self ,来自 http://concentricsky.com ) Python的self参数有时真让人抓狂,比如,你必须在每一个类的方法里显示定义se ...
 - Python3学习
			
要做一个儿童搜索引擎的项目(www.kidsearch.cn),所以开始接触各种新的语言,初步学了PHP爬虫,觉得要做大点的项目用PHP确实不太方便,中文兼容性就是一个比较棘手的问题.python的爬 ...
 - log_bin_trust_function_creators错误解决
			
log_bin_trust_function_creators错误解决 当有mysql本地或远程建立function或procedure时报上面的错误 经试验是log_bin_trust_fun ...
 - Linux下的图形界面——X Window的安装
			
X Window即X Windows图形用户接口,是一种计算机软件系统和网络协议,提供了一个基础的图形用户界面(GUI)和丰富的输入设备能力联网计算机.其中软件编写使用广义的命令集,它创建了一个硬件抽 ...
 - PostgreSQL的 initdb 源代码分析之十五
			
继续分析: if (pwprompt || pwfilename) get_set_pwd(); 由于我启动initdb的时候,没有设置口令相关的选项,故此略过. 接下来: setup_depend( ...