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 命令清单.几个专用名词的译名如下 ...
随机推荐
- 沉淀再出发:ElasticSearch的中文分词器ik
沉淀再出发:ElasticSearch的中文分词器ik 一.前言 为什么要在elasticsearch中要使用ik这样的中文分词呢,那是因为es提供的分词是英文分词,对于中文的分词就做的非常不好了 ...
- SQL查询含有%号的字段
select * from EMS_ANNOUNCEMENT where 1=1 and title like '%\%%' escape '\'
- Python文件基础操作(IO入门1)
转载请标明出处: http://www.cnblogs.com/why168888/p/6422270.html 本文出自:[Edwin博客园] Python文件基础操作(IO入门1) 1. pyth ...
- git修改远程仓库
三种方式都可以. 1. 修改命令 git remte origin set-url URL 2.先删后加 git remote rm origin git remote add origin git@ ...
- TCP握手建立与释放连接
网络层次模型 TCP/UDP区别 UDP,在传送数据前不需要先建立连接,远地的主机在收到UDP报文后也不需要给出任何确认.虽然UDP不提供可靠交付,但是正是因为这样,省去和很多的开销,使得它的速度比较 ...
- 【[CQOI2011]动态逆序对】
这是我的第一个数据结构套数据结构 不是线段树套\(Splay\),而是非常蛇皮的块状链表套树状数组 如果这里按照\(\sqrt{n}\)的大小来分块,那么就需要\(n\sqrt{n}\)的空间,可能开 ...
- java把行政区划放到一个节点树形中
作者原创:转载请注明出处.https://www.cnblogs.com/yunqing/p/9486923.html 先放数据,t_city表 //津京冀地区行政区划数据 SET FOREIGN_K ...
- VC++ TCP网络控制台程序
在Windows7系统下,采用工具为VS2008,Win32控制台应用程序,编写一个基于TCP的Client/Server网络程序. 1.服务器端代码 #include <WinSock2.h& ...
- shell一次性执行多条命令
1.每个命令之间用;隔开说明:各命令的执行给果,不会影响其它命令的执行.换句话说,各个命令都会执行,但不保证每个命令都执行成功. 2.每个命令之间用&&隔开说明:若前面的命令执行成功, ...
- keepalived 的进程/usr/sbin/keepalived -D 只有2个
操作系统:openSUSE 11.3 (x86_64) /usr/sbin/keepalived -D 只有2条 日志:ls /var/log/messages* -lrth Can't init ...