git Android Studio 中的变基命令

git rebase command in Android Studio

我正在尝试在 Android Studio 终端中编辑提交者的作者姓名:

> git log

D:\Users\me\AndroidStudioProjects\ex4_android_fly>git log
commit e4877c673dc89a716c964ea958355573f789628e (HEAD -> master)
Merge: 99849c3 fd3eab5
Author: Devy <devy-example@gmail.com>
Date:   Sun Jun 23 20:57:49 2019 +0300

> git rebase -i e4877c673dc89a716c964ea958355573f789628e

noop

# Rebase e4877c6..99849c3 onto e4877c6 (1 command)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c <commit> to reword the commit message.

所有最后的文本现在都显示在终端中,我不知道该怎么做,我想执行命令 git commit --amend --author="Author Name <email@address.com>"

我的意思是我似乎被这条短信卡住了,不知道如何处理以执行下一个 git 命令。

您正在使用 git rebase 命令 (-i) 的交互模式。

只需按Ctrl+C,然后执行下一条命令。

如果您想更改上次提交的作者,您可以使用: git commit --amend --author="Author Name <email@address.com>"

否则你应该使用: git rebase -i origin/master

在 rebase 列表中,将 'pick' 替换为 'edit'(或 'e')以用于您要更改的每个提交。

Git 将变基,在您标记的每个提交处停止。现在为您标记的每个提交执行此操作:

  • git commit --amend --author="author name "
  • git 变基 --continue