Git 命令及使用经验
手册中的基本命令:
CONFIGURE TOOLING
Configure user information for all local repositories
$ git config --global user.name "[name]"
Sets the name you want attached to your commit transactions
$ git config --global user.email "[email address]"
Sets the email you want attached to your commit transactions
$ git config --global color.ui auto
Enables helpful colorization of command line output
CREATE REPOSITORIES
Start a new repository or obtain one from an existing URL
$ git init [project-name]
Creates a new local repository with the specified name
$ git clone [url]
Downloads a project and its entire version history
MAKE CHANGES
Review edits and craft a commit transaction
$ git status
Lists all new or modified files to be committed
$ git add [file]
Snapshots the file in preparation for versioning
$ git reset [file]
Unstages the file, but preserve its contents
$ git diff
Shows file differences not yet staged
$ git diff --staged
Shows file differences between staging and the last file version
$ git commit -m "[descriptive message]"
Records file snapshots permanently in version history
REVIEW HISTORY
Browse and inspect the evolution of project files
$ git log
Lists version history for the current branch
$ git log --follow [file]
Lists version history for a file, including renames
$ git diff [first-branch]...[second-branch]
Shows content differences between two branches
$ git show [commit]
Outputs metadata and content changes of the specified commit
经验:
ERROR1: git status
和 git diff
出下面乱码
解决方法来源:http://www.cnblogs.com/vipzrx/p/3488717.html
解决方法: 键入命令 git config --global core.quotepath false
解决结果:问题解决
解决记录:如下图
Git 命令及使用经验的更多相关文章
- Git初探--笔记整理和Git命令详解
几个重要的概念 首先先明确几个概念: WorkPlace : 工作区 Index: 暂存区 Repository: 本地仓库/版本库 Remote: 远程仓库 当在Remote(如Github)上面c ...
- 工作中常用的git命令
一 常用Git命令 git clone:(区分SSH or HTTP) git init:初始化仓库 二 Git命令详解 Git Bash下,cd /c git clone,从远程Git版本库克隆一份 ...
- 常用 Git 命令清单
我每天使用 Git ,但是很多命令记不住. 一般来说,日常使用只要记住下图6个命令,就可以了.但是熟练使用,恐怕要记住60-100个命令. 下面是我整理的常用 Git 命令清单.几个专用名词的译名如下 ...
- 常look的Git命令
常用的Git命令 命令 简要说明 git add 添加至暂存区 git add–interactive 交互式添加 git apply 应用补丁 git am 应用邮件格式补丁 git a ...
- ***Linux下使用git命令及github项目
在linux下搭建git环境1.创建Github账号,https://github.com2.Linux创建SSH密钥: ssh-keygen ##一直默认就可以了 3.将公钥加入到Github账户 ...
- 我所记录的git命令(非常实用)
一.前言 记录一下工作中常用到的git命令,只是简单的笔记,欢迎大家交流... [ 顺便问下园友们,怎么感觉博客园发布的博客搜索有时都搜不到,后台编辑能填的都填写了,还是觉得搜索排名不高? 相同的标题 ...
- GIT命令行的使用
新手了解 有不对的地方指点下 首先, 了解下什么是GIT,GIT是一款开元的分布式版本控制工具, 在世界上的所有分布式版本控制工具中,GIT是最简单,最流行,同时也是最常用的 相比于其他版本的控制工具 ...
- 简明 Git 命令速查表(中文版)
原文引用地址:https://github.com/flyhigher139/Git-Cheat-Sheet/blob/master/Git%20Cheat%20Sheet-Zh.md在Github上 ...
- 常用 Git 命令清单 转
我每天使用 Git ,但是很多命令记不住. 一般来说,日常使用只要记住下图6个命令,就可以了.但是熟练使用,恐怕要记住60-100个命令. 下面是我整理的常用 Git 命令清单.几个专用名词的译名如下 ...
随机推荐
- winform中webBrowser模拟网页操作中遇到的问题
我们通过网页上传一些特殊数据的时候,由于必填项众多,数量量大的时候,会发现工作相当繁琐,前段时间做了一个winform内嵌webBrowser模拟网页上传文档的小工具,发现了许多问题,总结一下: 先说 ...
- Discuz的一处越权操作,强制回复无权限帖子
合购vip 等教程论坛 都用的是Discuz 看操作步骤: 随便找一处vip教程 接下来 我们审查元素 找到这段代码 然后修改 <a href="http://xxx.xxx.xx ...
- 关于$.fn.scrollPath is not a function
关于$.fn.scrollPath is not a function 在做项目过程中,用到了一个jQuery的滚动路径插件——jQuery Scroll Path.引入相关的js文件后,但是控制台一 ...
- ubuntu 13.10 无法播放 mp3
添加源: #deb cdrom:[Ubuntu 13.10 _Saucy Salamander_ - Release i386 (20131016.1)]/ saucy main restricted ...
- Windows环境下JDK的配置及多版本JDK切换的方法记录
(这里记录了笔者了解的关于JDK环境配置的信息,以及针对系统上存在不同版本JDK时所尝试的解决方案.具体来说,是已安装 JDK 8 后,又安装了 JDK 9 时所遇到的问题和尝试的解决方法.这次记录以 ...
- angular cli
1. 安装cnpm: npm install -g cnpm --registry=https://registry.npm.taobao.org 2. 安装angular/cli: cnpm ins ...
- BZOJ4653:[NOI2016]区间(线段树)
Description 在数轴上有 n个闭区间 [l1,r1],[l2,r2],...,[ln,rn].现在要从中选出 m 个区间,使得这 m个区间共同包含至少一个位置.换句话说,就是使得存在一个 x ...
- [CQOI2017]小Q的表格
题目 神仙题,神仙题 这是一道很适合盯着发呆的题目 看到这个规律 \[ f(a,b)=f(b,a) \] \[ b\times f(a,a+b)=(a+b)\times f(a,b) \] 这也没什么 ...
- luogu P2742 【模板】二维凸包
嘟嘟嘟 没错,我开始学凸包了. 其实挺简单的. 前置技能: 1.极坐标系 2.向量叉积 1.极坐标系 就是一种二维坐标系.只不过两个坐标分别表示向量和极轴的角度和自身的长度.对于不同的问题,极轴可以自 ...
- pop链构造
class Person { private $name; private $sex; private $age; //__set()方法用来设置私有属性 function __set($proper ...