hash值 更改git_git修改commit信息。

在Android Studio上面直接操作Version Control的reword是最直接的。

用git的方式来:

git rebase -i HEAD~1

打开了文本编辑器

pick 10130de msg

# Rebase da71f75..10130de onto da71f75 (1 command)

#

# Commands:

# p, pick = use commit

# r, reword = use commit, but edit the commit message

# e, edit = use commit, but stop for amending

# s, squash = use commit, but meld into previous commit

# f, fixup = like "squash", but discard this commit's log message

# x, exec = run command (the rest of the line) using shell

# d, drop = remove commit

# l, label = label current HEAD with a name

# t, reset = reset HEAD to a label

# m, merge [-C | -c ] [# ]

# . create a merge commit using the original merge commit's

# . message (or the oneline, if no original merge commit was

# . specified). Use -c to reword the commit message.

#

# These lines can be re-ordered; they are executed from top to bottom.

#

# If you remove a line here THAT COMMIT WILL BE LOST.

#

# However, if you remove everything, the rebase will be aborted.

#

#

# Note that empty commits are commented out

保存,关闭。

git显示命令:

$ git rebase -i HEAD~1

hint: Waiting for your editor to close the file...

然后打开了文本编辑器,显示的就是

msg

//提示信息

这里把msg改成123456798,然后保存,关闭。

$ git rebase -i HEAD~1

[detached HEAD 951f653] 123456789

Date: Fri Jul 20 15:26:26 2018 +0800

1 file changed, 0 insertions(+), 0 deletions(-)

create mode 100644 新建文本文档.txt

Successfully rebased and updated refs/heads/master.

这个时候commit信息已经修改,并且也改了版本快照的hash值。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值