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添加文件时出现这样错误 ...
随机推荐
- MySQL BINARY和BIT类型
BINARY和VARBINARY类型 BINARY和VARBIANRY类型同CHAR和VARCHAR类型相似,除了BIANARY和VARBINARY类型只包含二进制字符串,即它们只包含byte串而非字 ...
- socket断开连接的四次握手及常见过程解析
TCP的协议文档对TCP的一些规定:文档名称-RFC793 TCP消息头的控制位 URG:紧急指针字段有效 ACK:确认头部字段有效 PSH:强制函数 RST:重置链接 SYN:同步系列号码 FIN ...
- jquery 绑定省份和城市
前台代码: <asp:DropDownList runat="server" ID="ddlProvince"></asp:DropDownL ...
- Cocos2d-x——Cocos2d-x 屏幕适配新解【转载】
Cocos2d-x 屏幕适配新解 本文出自[无间落叶](转载请保留出处):http://blog.leafsoar.com/archives/2013/05-10-19.html 为了适应移动终端的各 ...
- Educational Codeforces Round 1 B. Queries on a String 暴力
B. Queries on a String Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/59 ...
- Android Studio升级后projectBuild failed.
近期在升级Android Studio后,发现原先能编译通过的project,突然就编译只是了,原因是生成的AndroidManifest.xml文件里有乱码. 升级后: android studio ...
- orcle经常使用语句
--1.创建暂时表空间 create temporary tablespace AUTOMONITORV5_temp tempfile 'D:\ORACLE\KARL\ORADATA\ORCL\AUT ...
- swift3.0 中NSNotification 的使用
swift3.0 有很大变化,其中之一就是NSNotification使用跟原来不一样,以前NSNotification name是String:3.0中定义了一个类型NSNotification.n ...
- ViewGroup源码部分解析
ViewGroup的官方解析是: A <code>ViewGroup</code> is a special view that can contain other views ...
- PHP获取用户真实 IP , 淘宝IP接口获得ip地理位置(转)
<?php /** * 获取用户真实 IP */ function getIP() { static $realip; if (isset($_SERVER)){ if (isset($_SER ...