(八)Git 提交更改
来源:互联网 发布:1920淘宝全屏轮播海报 编辑:程序博客网 时间:2024/05/18 13:08
Jerry 已经提交的更改,他想纠正他的最后一次提交,在这种情况下,git 的修改将帮助操作。最后提交修改操作的变化,包括提交信息,它创建新的提交ID。
修改操作之前,他会检查提交日志。
[jerry@CentOS project]$ git log
上面的命令会产生以下结果。
commit cbe1249b140dad24b2c35b15cc7e26a6f02d2277Author: Jerry Mouse <jerry@yiibai.com>Date: Wed Sep 11 08:05:26 2013 +0530Implemented my_strlen functioncommit 19ae20683fc460db7d127cf201a1429523b0e319Author: Tom Cat <tom@yiibai.com>Date: Wed Sep 11 07:32:56 2013 +0530Initial commit
Jerry 提交了新的变化 - 修改操作,并查看提交日志。
[jerry@CentOS project]$ git status -sM string.c?? string[jerry@CentOS project]$ git add string.c[jerry@CentOS project]$ git status -sM string.c?? string[jerry@CentOS project]$ git commit --amend -m 'Changed return type of my_strlen to size_t'[master d1e19d3] Changed return type of my_strlen to size_t1 files changed, 24 insertions(+), 0 deletions(-)create mode 100644 string.c
现在 git 的日志,将显示新的提交信息与新的提交ID
[jerry@CentOS project]$ git log
上面的命令会产生以下结果。
commit d1e19d316224cddc437e3ed34ec3c931ad803958Author: Jerry Mouse <jerry@yiibai.com>Date: Wed Sep 11 08:05:26 2013 +0530Changed return type of my_strlen to size_tcommit 19ae20683fc460db7d127cf201a1429523b0e319Author: Tom Cat <tom@yiibai.com>Date: Wed Sep 11 07:32:56 2013 +0530Initial commit
0 0
- (八)Git 提交更改
- Git - 基本概念(更改提交)
- git提交更改
- git commit 提交最新更改
- git 之 git diff 与 更改提交
- iOS-在Xcode中使用Git进行源码版本控制(二:提交更改)
- GitHub入门与实践(2)掌握Git 3、更改提交操作
- Git 学习笔记(简介、安装、添加提交文件、查看状态及更改信息)
- git - 查看已提交的代码的更改
- git查看某次提交/更新所更改的文件
- git撤销本地所有未提交的更改
- git 更改-单个项目-提交时显示的名字
- git版本控制管理系列-----第十章 更改提交
- (六)Git 执行更改
- (七)Git审查更改
- git——创建仓库、提交、忽略文件、撤消更改、查看提交记录
- git更改提交用户名报错:remote: Permission to EvoIos/standford_ios_7_lecture.git denied to xxx
- Git(八)、Bug分支
- IIS——服务开启及本地发布网站图解(一)
- 抽象工厂模式
- [精]Oracle APEX 5.0 新手教程(一) Form表单
- 最大公约数---- C++
- 使用ReactiveCocoa实现iOS平台响应式编程
- (八)Git 提交更改
- Centos修炼----->Centos7之安装eclipse
- VisualDDK + Windbg 进行Windows内核调试(二)
- springmvc+mybatis 无极限树形结构菜单(第三种)
- (九)Git 推送操作
- 时间戳转化时间和星期
- SolrCloud
- ios学习--XCode打包.a静态库文件&正确导出.h头文件
- U盘系统安装盘的制作