提交更改是什么意思呀怎么写啊_信息提交成功能修改吗

提交更改是什么意思呀怎么写啊_信息提交成功能修改吗Jerry已经提交了更改,他想更正他的上一次提交。在这种情况下,git amend操作会有所帮助。修改操作更改最后的提交,包括您的提交消息;它创建一个新的提交ID。在修改操作之前,他检查提交日志。[jerry@CentOS project]$ git

Jerry已经提交了更改,他想更正他的上一次提交。在这种情况下,git amend操作会有所帮助。修改操作更改最后的提交,包括您的提交消息;它创建一个新的提交ID。

在修改操作之前,他检查提交日志。

[jerry@CentOS project]$ git log 

上面的命令将产生以下结果。

commit cbe1249b140dad24b2c35b15cc7e26a6f02d2277 Author: Jerry Mouse <jerry@tutorialspoint.com> Date: Wed Sep 11 08:05:26 2013 +0530 Implemented my_strlen function commit 19ae20683fc460db7d127cf201ab0e319 Author: Tom Cat <tom@tutorialspoint.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  string.c 

现在,git log将显示具有新提交ID的新提交消息-

[jerry@CentOS project]$ git log 

上面的命令将产生以下结果。

commit d1e19dcddc437e3ed34ec3c931ad Author: Jerry Mouse <jerry@tutorialspoint.com> Date: Wed Sep 11 08:05:26 2013 +0530 Changed return type of my_strlen to size_t commit 19ae20683fc460db7d127cf201ab0e319 Author: Tom Cat <tom@tutorialspoint.com> Date: Wed Sep 11 07:32:56 2013 +0530 Initial commit

2024最新激活全家桶教程,稳定运行到2099年,请移步至置顶文章:https://sigusoft.com/99576.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。 文章由激活谷谷主-小谷整理,转载请注明出处:https://sigusoft.com/16951.html

(0)
上一篇 2024年 9月 17日
下一篇 2024年 9月 17日

相关推荐

关注微信