Git CMD - add: Record changes to the repository
命令格式
git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
[--dry-run] [(-c | -C | --fixup | --squash) <commit>]
[-F <file> | -m <msg>] [--reset-author] [--allow-empty]
[--allow-empty-message] [--no-verify] [-e] [--author=<author>]
[--date=<date>] [--cleanup=<mode>] [--[no-]status]
[-i | -o] [-S[<keyid>]] [--] [<file>…]
命令参数
-a, --all
直接将工作区的修改提交至仓库。
实例
a) 将暂存区的提交至仓库
[huey@huey-K42JE hello_git]$ date > datetime.txt
[huey@huey-K42JE hello_git]$ git add .
[huey@huey-K42JE hello_git]$ git commit -m "change datetime"
[master 7983be4] change datetime
1 files changed, 1 insertions(+), 1 deletions(-)
b) 直接将工作区的修改提交至仓库
[huey@huey-K42JE hello_git]$ rm datetime.txt
[huey@huey-K42JE hello_git]$ date > datetime.txt
[huey@huey-K42JE hello_git]$ git commit -a -m "rm testfile & change datetime"
[master 5622ecb] rm testfile & change datetime
2 files changed, 1 insertions(+), 2 deletions(-)
delete mode 100644 testfile.txt
更多
http://git-scm.com/docs/git-commit
Git CMD - add: Record changes to the repository的更多相关文章
- Git CMD - add: Add file contents to the index
命令格式 git add [--verbose | -v] [--dry-run | -n] [--force | -f] [--interactive | -i] [--patch | -p] [- ...
- 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 remote add origin错误
如果输入$ Git remote add origin git@github.com:djqiang(github帐号名)/gitdemo(项目名).git 提示出错信息:fatal: remote ...
- Difference between git remote add and git clone
http://stackoverflow.com/questions/4855561/difference-between-git-remote-add-and-git-clone git remot ...
- [git 学习篇] git remote add origin错误
http://blog.csdn.net/dengjianqiang2011/article/details/9260435 如果输入$ Git remote add origin git@githu ...
- Git CMD - remote: Manage set of tracked repositories
命令格式 git remote [-v | --verbose] git remote add [-t <branch>] [-m <master>] [-f] [--[no- ...
- Git学习篇之git remote add origin错误
提示出错信息:fatal: remote origin already exists. 解决办法如下: 1.先输入$ git remote rm origin 2.再输入$ git remote ad ...
- git cmd 命令在已有的仓库重新添加新的文件夹
正确步骤: 1. git init //初始化仓库 git add .(文件name) //添加文件到本地仓库 git commit -m “first commit” //添加文件描述信息 git ...
- OpenStack git cmd
文件流转的三个工作区域:Git 的工作目录,暂存区域,以及本地仓库. 基本的 Git 工作流程如下: 在工作目录中修改某些文件. 对修改后的文件进行快照,然后保存到暂存区域. 提交更新,将保存在暂存区 ...
随机推荐
- ssh使用ajax异步通讯. json与对象转换的几个小问题
首先是hibernate,用ssh做项目的时候,使用hibernate,这个hibernate博大精深,至今只懂皮毛.建对象时候使用它的一对多,多对多联系,. 这样子,对象转json的时候会产生循环依 ...
- 又遇BUG-ORA-01148:数据文件忽然变为recover状态
现象: RAC环境,数据文件状态变为recover,查看alert日志有如下报错: Wed Jun 26 02:31:03 2013 Thread 1 advanced to log sequence ...
- 文件频繁IO能有多大的差别
测试文件写同样大小的文件,单次记录较小和单次记录较大能有多大的性能差别. 最终写入同样大小的文件,小记录需要写入10w次,大记录需要写入1w次,看下最终的性能报告
- SQLite数据库连接方式
http://blog.csdn.net/ZF101201/archive/2010/05/26/5626365.aspx SQLite.NET Type: .NET Framework Cla ...
- Oracle DataGuard搭建(一)
第一次搭建oracle dataguard.学oracle很长时间,却没有完整的搭过dg,说起来让人笑.总得有第一次,而且第一次总是很痛苦的. 数据库版本: Oracle Database 11g E ...
- UOJ #142. 【UER #5】万圣节的南瓜灯 并查集
#142. [UER #5]万圣节的南瓜灯 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://uoj.ac/problem/142 Descrip ...
- Codeforces Round #274 (Div. 1) A. Exams 贪心
A. Exams Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/480/problem/A Des ...
- BZOJ 3931: [CQOI2015]网络吞吐量 最大流
3931: [CQOI2015]网络吞吐量 Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://www.lydsy.com/JudgeOnline/p ...
- cocos2d(3.0)一些基础的东西
1.创建项目后环境配置: 附加文件夹:加入 $(EngineRoot) $(EngineRoot)cocos $(EngineRoot)cocos\editor-support $(EngineRoo ...
- Meteor 加入账户系统
Meteor 加入账户系统 我们给meteor加入一个账户系统 导入包 meteor add ian:accounts-ui-bootstrap-3 meteor add accounts-passw ...