Git 提交更改
Jerry 已经提交的更改,他想纠正他的最后一次提交,在这种情况下,git 的修改将帮助操作。最后提交修改操作的变化,包括提交信息,它创建新的提交ID。
修改操作之前,他会检查提交日志。
[jerry@CentOS project]$ git log
上面的命令会产生以下结果。
commit cbe1249b140dad24b2c35b15cc7e26a6f02d2277 Author: Jerry Mouse <jerry@yiibai.com> Date: Wed Sep 11 08:05:26 2013 +0530 Implemented my_strlen function commit 19ae20683fc460db7d127cf201a1429523b0e319 Author: Tom Cat <tom@yiibai.com> Date: Wed Sep 11 07:32:56 2013 +0530 Initial commit
Jerry 提交了新的变化 – 修改操作,并查看提交日志。
[jerry@CentOS project]$ git status -s M string.c ?? string [jerry@CentOS project]$ git add string.c [jerry@CentOS project]$ git status -s M 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_t 1 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 string.c
现在 git 的日志,将显示新的提交信息与新的提交ID
[jerry@CentOS project]$ git log
上面的命令会产生以下结果。
commit d1e19d316224cddc437e3ed34ec3c931ad803958 Author: Jerry Mouse <jerry@yiibai.com> Date: Wed Sep 11 08:05:26 2013 +0530 Changed return type of my_strlen to size_t commit 19ae20683fc460db7d127cf201a1429523b0e319 Author: Tom Cat <tom@yiibai.com> Date: Wed Sep 11 07:32:56 2013 +0530 Initial commit
PS:如果您想和业内技术大牛交流的话,请加qq群(521249302)或者关注微信公众 号(AskHarries),谢谢!
Git 提交更改的更多相关文章
- git提交更改都是一个作者
为什么提交到github的commit都是一个作者 参考链接 重要知识点讲解 问题如下所示 git是分布式去中心化的管理系统 ssh秘钥对生成.并把id_rsa.pub加入github.com中(这个 ...
- git 如何更改某个提交内容/如何把当前改动追加到某次commit上? git rebase
原文地址 http://www.jianshu.com/p/8d666830e826 [自己总结] 0, git diff git diff a b 是以a为基准,把b和a的区别展示出来 ...
- 从 Git Gui 管理的Repository(库) 提交更改到 Bonobo服务器管理的Repository(库)
要提交更改到Bonobo服务器管理的某个Repository(库),必须先得在Bonobo服务器上有此Repository(库)——简直就是废话.那么怎么才能这个Repository(库)变出来呢?其 ...
- Git提交引用和引用日志
转载自:https://github.com/geeeeeeeeek/git-recipes/wiki/5.5-Git%E6%8F%90%E4%BA%A4%E5%BC%95%E7%94%A8%E5%9 ...
- linux下git使用记录1 git 提交
linux下git使用记录1 浏览:985 发布日期:2013/08/08 分类:技术分享 在使用github的时候,不可避免的接触到了git,用他来更新项目,做版本控制.这里特别把常用的命令记录 ...
- 写得好 git 提交信息
编写好 git 提交信息 提交信息 我们作出答复,更改将提交相关信息,这些信息通常被认为是重要的信息会小心留下应该离开,你为什么需要这个提交实例,提交解决任何问题. 我们需要良好的信息组织,虽然后来, ...
- Git 执行更改
Jerry 克隆库,他决定实现基本字符串操作.于是,他创建文件string.c,在添加内容到 string.c 会这个样子. #include <stdio.h> int my_strle ...
- Git 提交代码和更新代码
首先,操作之前一定要看清分支!! 其次,提交代码之前一定要先更新代码!! git branch -----查看当前分支 git pull -----更新代码到本地 ...
- 解决git提交敏感信息(回退git版本库到某一个commit)
解决git提交敏感信息(回退git版本库到某一个commit) Fri 07 June 2013 git是一个很好的版本库, 现在很多人用它, 并在github上创建项目, 相信大家都有过将敏感信息提 ...
随机推荐
- python标准库介绍——34 commands 模块详解
==commands 模块== (只用于 Unix) ``commands`` 模块包含一些用于执行外部命令的函数. [Example 3-7 #eg-3-7] 展示了这个模块. ====Exampl ...
- iphone5 jail break
dfu恢复恢复备份越狱afc2add删除2个文件,如果只有1个也没问题/var/mobile/Library/Caches/com.apple.mobile.installation.plist/va ...
- SQLMap 学习
注入完整流程:http://mp.weixin.qq.com/s/G_DUUVuPH9DeWagjELCPfA sqlmap命令:http://www.cnblogs.com/handt/p/855f ...
- SVN不显示对号的解决方法
具体操作方法如下: 1.到C:\Windows文件夹下,打开regedit.exe 2.Ctrl+F,搜索“ShellIconOverlayIdentifiers” 3.将TortoiseAdded. ...
- CNN卷积可视化与反卷积
1.<Visualizing and Understanding Convolutional Networks> 2.<Adaptive deconvolutional networ ...
- 深入云存储系统Swift核心组件:Ring实现原理剖析
http://www.cnblogs.com/yuxc/archive/2012/06/22/2558312.html 简介 OpenStack是一个美国国家航空航天局和Rackspace合作研发的开 ...
- Custom Sublime Text Build Systems For Popular Tools And Languages
Sublime Text is currently the text editor of choice for a number of developers in the open-source co ...
- 从强制解包看 Swift 的设计
从强制解包看 Swift 的设计 不知道大家有没有发现,在一个 Objective-C 和 Swift 混编的 App 中,当把一个 OC 中的参数转到 Swift 时,Swift 会自动把这个变量进 ...
- grpc-golang实现账号and密码认证
// I would recommend to use interceptors: // client grpc.Dial(target, grpc.WithPerRPCCredentials(&am ...
- 【内核】linux2.6版本内核编译配置选项(一)
Linux 2.6.19.x 内核编译配置选项简介 作者:金步国 版权声明 本文作者是一位自由软件爱好者,所以本文虽然不是软件,但是本着 GPL 的精神发布.任何人都可以自由使用.转载.复制和再分发, ...