推送后更改 git 提交消息(假设没有人从远程拉取)

发布于 2024-12-28 12:02:11 字数 114 浏览 1 评论 0原文

我已经进行了 git 提交和后续推送。我想更改提交消息。如果我理解正确,这是不可取的,因为在我进行此类更改之前可能有人已经从远程存储库中提取了内容。如果我知道没有人拉动怎么办?

有办法做到这一点吗?

I have made a git commit and subsequent push. I would like to change the commit message. If I understand correctly, this is not advisable because someone might have pulled from the remote repository before I make such changes. What if I know that no one has pulled?

Is there a way to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(21

森罗 2025-01-04 12:02:11

更改历史记录

如果这是最近的提交,您可以简单地执行以下操作:

git commit --amend

这将打开带有最后提交消息的编辑器,并让您编辑该消息。 (如果您想清除旧消息并使用新消息,可以使用 -m。)

推送

然后当您推送时,执行以下操作:

git push --force-with-lease <repository> <branch>

或者您可以使用“+”:

git push <repository> +<branch>

或者您可以use --force

git push --force <repository> <branch>

使用这些命令时要小心。

  • 如果其他人将更改推送到同一分支,您可能希望避免破坏这些更改。 --force-with-lease 选项是最安全的,因为如果有任何上游更改,它将中止(

  • 如果您没有显式指定分支,Git 将会中止)如果您使用默认推送设置,则使用默认推送设置。是“匹配”,那么您可以同时销毁多个分支上的更改

之后拉取/提取的

任何人现在都会收到一条错误消息,并且他们需要通过执行类似的操作来更新(假设他们自己没有进行任何更改)。 :

git fetch origin
git reset --hard origin/master # Loses local commits

使用reset时要小心--hard 如果您对分支进行了更改,这些更改将被销毁。

关于修改历史记录的说明

被破坏的数据实际上只是旧的提交消息,但 --force 不知道这一点,并且也会很乐意删除其他数据。因此,可以将 --force 视为“我想要销毁数据,并且我确切地知道哪些数据正在被销毁。”但是,当提交被破坏的数据时,您通常可以从引用日志中恢复旧的提交——数据实际上是孤立的,而不是被破坏的(尽管孤立的提交会定期删除)。

如果您认为自己没有破坏数据,请远离 --force...可能会发生不好的事情

这就是为什么 --force-with-lease 更安全。

Changing history

If it is the most recent commit, you can simply do this:

git commit --amend

This brings up the editor with the last commit message and lets you edit the message. (You can use -m if you want to wipe out the old message and use a new one.)

Pushing

And then when you push, do this:

git push --force-with-lease <repository> <branch>

Or you can use "+":

git push <repository> +<branch>

Or you can use --force:

git push --force <repository> <branch>

Be careful when using these commands.

  • If someone else pushed changes to the same branch, you probably want to avoid destroying those changes. The --force-with-lease option is the safest, because it will abort if there are any upstream changes (

  • If you don't specify the branch explicitly, Git will use the default push settings. If your default push setting is "matching", then you may destroy changes on several branches at the same time.

Pulling / fetching afterwards

Anyone who already pulled will now get an error message, and they will need to update (assuming they aren't making any changes themselves) by doing something like this:

git fetch origin
git reset --hard origin/master # Loses local commits

Be careful when using reset --hard. If you have changes to the branch, those changes will be destroyed.

A note about modifying history

The destroyed data is really just the old commit message, but --force doesn't know that, and will happily delete other data too. So think of --force as "I want to destroy data, and I know for sure what data is being destroyed." But when the destroyed data is committed, you can often recover old commits from the reflog—the data is actually orphaned instead of destroyed (although orphaned commits are periodically deleted).

If you don't think you're destroying data, then stay away from --force... bad things might happen.

This is why --force-with-lease is somewhat safer.

可遇━不可求 2025-01-04 12:02:11

只需说:

git commit --amend -m "New commit message"

然后

git push --force

Just say:

git commit --amend -m "New commit message"

and then

git push --force
寒冷纷飞旳雪 2025-01-04 12:02:11

要编辑除最新之外的提交:

第 1 步git rebase -i HEAD~n 对受影响的最后 n 提交进行交互式变基。 (即如果你想更改提交消息 3 次提交,请执行 git rebase -i HEAD~3 )

git 将弹出一个编辑器来处理这些提交,请注意这个命令:

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

这正是我们需要的!

第 2 步:对于您想要更新消息的提交,将 pick 更改为 r。不要在此处更改提交消息,它将被忽略。您将在下一步中执行此操作。保存并关闭编辑器。

请注意,如果您编辑变基“计划”,但它不会开始让您重命名文件的过程,请运行:

git rebase --continue

如果您想更改用于交互式会话的文本编辑器(例如从默认的 vi 到 nano), run:

GIT_EDITOR=nano git rebase -i HEAD~n

Step3:Git 将为您之前输入 r 的每个修订版弹出另一个编辑器。根据需要更新提交消息,然后保存并关闭编辑器。

第四步:更新所有提交消息后。您可能需要执行 git push -f 来更新遥控器。

To edit a commit other than the most recent:

Step1: git rebase -i HEAD~n to do interactive rebase for the last n commits affected. (i.e. if you want to change a commit message 3 commits back, do git rebase -i HEAD~3)

git will pop up an editor to handle those commits, notice this command:

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

that is exactly we need!

Step2: Change pick to r for those commits that you want to update the message. Don't bother changing the commit message here, it will be ignored. You'll do that on the next step. Save and close the editor.

Note that if you edit your rebase 'plan' yet it doesn't begin the process of letting you rename the files, run:

git rebase --continue

If you want to change the text editor used for the interactive session (e.g. from the default vi to nano), run:

GIT_EDITOR=nano git rebase -i HEAD~n

Step3: Git will pop up another editor for every revision you put r before. Update the commit msg as you like, then save and close the editor.

Step4: After all commits msgs are updated. you might want to do git push -f to update the remote.

我是有多爱你 2025-01-04 12:02:11

在控制台中使用以下两个步骤:

git commit --amend -m "new commit message"

然后

git push -f

完成:)

Use these two steps in console:

git commit --amend -m "new commit message"

and then

git push -f

Done :)

静若繁花 2025-01-04 12:02:11

情况 1:未推送 + 最近提交:

   git commit --amend

这将打开您的 $EDITOR 并让您更改消息。继续您常用的git Push origin master

情况 2:已推送 + 最近提交:

  git commit --amend
  git push origin master --force

我们像上面一样编辑消息。但需要--force推送来更新远程历史记录。

⚠️但是!更改后强制推送您的提交很可能会阻止其他人与存储库同步(如果他们已经提取了副本)。您应该首先与他们核实。

情况 3:未推送 + 旧提交:

    git rebase -i HEAD~X
    # X is the number of commits to go back
    # Move to the line of your commit, change pick into reword,
    # then change your commit message:
    git commit --amend
    # Finish the rebase with:
    git rebase --continue

Rebase 打开您的历史记录并让您选择要更改的内容。通过编辑,您可以告诉您要更改消息。 Git 将您移动到一个新分支,以便您修改消息。 git rebase --Continue 将您带回到之前的分支,并且消息已更改。

情况 4:已推送 + 旧提交:

使用与上述相同的 3 个步骤流程编辑消息(rebase -icommit --amend变基--继续)。
然后强制推送提交:

  git push origin master --force

⚠️但是!请记住,在更改后重新推送您的提交很可能会阻止其他人与存储库同步(如果他们已经提取了副本)。您应该首先与他们核实。

参考:https://gist.github.com/nepsilon/156387acf9e1e72d48fa35c4fabef0b4#not-pushed--most-recent-commit

Case 1 : Not pushed + most recent commit:

   git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

Case 2 : Already pushed + most recent commit:

  git commit --amend
  git push origin master --force

We edit the message like just above. But need to --force the push to update the remote history.

⚠️ But! Force pushing your commit after changing it will very likely prevent others to sync with the repo, if they already pulled a copy. You should first check with them.

Case 3 : Not pushed + old commit:

    git rebase -i HEAD~X
    # X is the number of commits to go back
    # Move to the line of your commit, change pick into reword,
    # then change your commit message:
    git commit --amend
    # Finish the rebase with:
    git rebase --continue

Rebase opens your history and let you pick what to change. With edit you tell you want to change the message. Git moves you to a new branch to let you --amend the message. git rebase --continue puts you back in your previous branch with the message changed.

Case 4 : Already pushed + old commit:

Edit your message with the same 3 steps process as above (rebase -i, commit --amend, rebase --continue).
Then force push the commit:

  git push origin master --force

⚠️ But! Remember re-pushing your commit after changing it will very likely prevent others to sync with the repo, if they already pulled a copy. You should first check with them.

Reference : https://gist.github.com/nepsilon/156387acf9e1e72d48fa35c4fabef0b4#not-pushed--most-recent-commit

罪歌 2025-01-04 12:02:11

应该注意的是,如果您将 push --force 与多个引用一起使用,它们都会因此被修改。请务必注意您的 git 存储库的位置配置为推送到。幸运的是,有一种方法可以通过指定要更新的单个分支来稍微保护该过程。从 git 手册页中阅读:

请注意,--force 适用于所有推送的引用,因此使用
将其与 push.default 设置为匹配或多重推送
使用remote.*.push配置的目的地可能会覆盖其他参考
比当前分支(包括严格落后的本地引用
他们的远程对应者)。要强制推送到一个分支,请使用 +
在要推送的 refspec 前面(例如 git push origin +master 强制
推送到主分支)。

It should be noted that if you use push --force with mutiple refs, they will ALL be modified as a result. Make sure to pay attention to where your git repo is configured to push to. Fortunately there is a way to safeguard the process slightly, by specifying a single branch to update. Read from the git man pages:

Note that --force applies to all the refs that are pushed, hence using
it with push.default set to matching or with multiple push
destinations configured with remote.*.push may overwrite refs other
than the current branch (including local refs that are strictly behind
their remote counterpart). To force a push to only one branch, use a +
in front of the refspec to push (e.g git push origin +master to force
a push to the master branch).

妥活 2025-01-04 12:02:11

命令1

git commit --amend -m "New and correct message"

然后,

命令2

git push origin --force

Command 1.

git commit --amend -m "New and correct message"

Then,

Command 2.

git push origin --force
凡间太子 2025-01-04 12:02:11
git commit --amend

然后在当前窗口中编辑和更改消息。之后做

git push --force-with-lease
git commit --amend

then edit and change the message in the current window. After that do

git push --force-with-lease
隔岸观火 2025-01-04 12:02:11

确保您在正确的分支上进行更改

git checkout 

#确保您在正确的分支上进行更改
只是为了确定:

git checkout branchname

然后

git commit --amend -m "new message"

然后推

git push --force

To make sure you are making changes on the right branch

git checkout 

#to make sure you are making changes on the right branch
just to be sure:

git checkout branchname

Then

git commit --amend -m "new message"

Then push

git push --force
夜吻♂芭芘 2025-01-04 12:02:11

如果您想修改较旧的提交,而不是最后一个提交,则需要使用 rebase 命令,如下所述,Github 帮助页面,位于修改旧提交消息或多个提交消息部分

If you want to modify an older commit, not the last one, you will need to use rebase command as explained in here,Github help page , on the Amending the message of older or multiple commit messages section

优雅的叶子 2025-01-04 12:02:11

可以用不同的消息替换提交,而不影响现有的提交哈希值,而不是变基和强制推送修改后的分支:

git replace --edit <commit>

然后必须显式推送和获取修改后的引用:

git push origin 'refs/replace/*'
git fetch origin 'refs/replace/*:refs/replace/*'

这需要 Git 2.1 或更高版本。

https://git-scm.com/docs/git-replace

Instead of rebasing and force pushing the modified branch, it's possible to replace a commit with a different message without affecting the existing commit hashes:

git replace --edit <commit>

The modified references will then have to be pushed and fetched explicitly with:

git push origin 'refs/replace/*'
git fetch origin 'refs/replace/*:refs/replace/*'

This requires Git 2.1 or higher.

https://git-scm.com/docs/git-replace

苍景流年 2025-01-04 12:02:11

另一种选择是创建一个额外的“勘误提交”(并推送),它引用包含错误的提交对象——新的勘误提交还提供了更正。勘误提交是一种没有实质性代码更改但有重要提交消息的提交 - 例如,在自述文件中添加一个空格字符并使用重要提交消息提交该更改,或者使用 git 选项 --allow -空。它当然比变基更容易、更安全,它不会修改真实的历史记录,并且可以保持分支树干净(如果您要更正最近的提交,那么使用 amend 也是一个不错的选择,但是勘误表对于较旧的提交来说,提交可能是一个不错的选择)。这种类型的事情很少发生,只需记录错误就足够了。将来,如果您需要在 git 日志中搜索某个功能关键字,则原始(错误)提交可能不会出现,因为原始提交中使用了错误的关键字(原始拼写错误)——但是,该关键字将会出现在勘误表提交中,它会将您指向有拼写错误的原始提交。这是一个例子:

$ git log
commit 0c28141c68adae276840f17ccd4766542c33cf1d
Author: First Last 
Date:   Wed Aug 8 15:55:52 2018 -0600

    Errata commit:
    This commit has no substantive code change.
    This commit is provided only to document a correction to a previous commit message.
    This pertains to commit object e083a7abd8deb5776cb304fa13731a4182a24be1
    Original incorrect commit message:
        Changed background color to red
    Correction (*change highlighted*):
        Changed background color to *blue*

commit 032d0ff0601bff79bdef3c6f0a02ebfa061c4ad4
Author: First Last 
Date:   Wed Aug 8 15:43:16 2018 -0600

    Some interim commit message

commit e083a7abd8deb5776cb304fa13731a4182a24be1
Author: First Last 
Date:   Wed Aug 8 13:31:32 2018 -0600

    Changed background color to red

Another option is to create an additional "errata commit" (and push) which references the commit object that contains the error -- the new errata commit also provides the correction. An errata commit is a commit with no substantive code changes but an important commit message -- for example, add one space character to your readme file and commit that change with the important commit message, or use the git option --allow-empty. It's certainly easier and safer than rebasing, it doesn't modify true history, and it keeps the branch tree clean (using amend is also a good choice if you are correcting the most recent commit, but an errata commit may be a good choice for older commits). This type of thing so rarely happens that simply documenting the mistake is good enough. In the future, if you need to search through a git log for a feature keyword, the original (erroneous) commit may not appear because the wrong keyword was used in that original commit (the original typo) -- however, the keyword will appear in the errata commit which will then point you to the original commit that had the typo. Here's an example:

$ git log
commit 0c28141c68adae276840f17ccd4766542c33cf1d
Author: First Last 
Date:   Wed Aug 8 15:55:52 2018 -0600

    Errata commit:
    This commit has no substantive code change.
    This commit is provided only to document a correction to a previous commit message.
    This pertains to commit object e083a7abd8deb5776cb304fa13731a4182a24be1
    Original incorrect commit message:
        Changed background color to red
    Correction (*change highlighted*):
        Changed background color to *blue*

commit 032d0ff0601bff79bdef3c6f0a02ebfa061c4ad4
Author: First Last 
Date:   Wed Aug 8 15:43:16 2018 -0600

    Some interim commit message

commit e083a7abd8deb5776cb304fa13731a4182a24be1
Author: First Last 
Date:   Wed Aug 8 13:31:32 2018 -0600

    Changed background color to red
顾北清歌寒 2025-01-04 12:02:11

只需使用这 2 个命令即可更改上次推送的提交消息

  1. -$ git commit --amend -m "New commit message."
  2. -$ git push --force-with-lease

Simply use this 2 commands to change the commit message of your last push

  1. -$ git commit --amend -m "New commit message."
  2. -$ git push --force-with-lease
我三岁 2025-01-04 12:02:11

FWIW 在最简单的情况下,检查的答案是正确的。我只是想分享一下最近的经历。

这有效。

git commit --amend -m"The new message here"

git push --force origin

测试人员能够第一次检出分支,并且修改后的消息。

因此,在最简单的情况下(单个开发人员和/或知道没有人获取/拉取或签出分支)就足够了。

FWIW in the simplest case, the checked answer is correct. I just wanted to share a recent experience.

This worked.

git commit --amend -m"The new message here"

git push --force origin

And the tester was able to checkout the branch for the first time and has only the amended message.

So in the simplest case (single developer and/or known that no one has fetch/pulled or checked out the branch) that is sufficient.

风追烟花雨 2025-01-04 12:02:11

工作

我们有 git amend 命令,使用它我们可以单独更新提交消息或与最后提交的一部分的附加文件一起更新,所以我们必须使用

git commit --amend -m "New commit message"

然后强制推送,这样即使提交到本地或远程它将更新两者

git push --force

Working

We have git amend command using which we can update commit message alone or along with additional files which will be part of last commit so we have to use

git commit --amend -m "New commit message"

and then push with force so that even though commited to local or remote it will update both

git push --force
奶茶白久 2025-01-04 12:02:11
  • 命令 1

    您需要使用以下命令更改提交消息

    git commit --amend -m“新且正确的消息”
    
  • 命令 2

    添加新消息后,然后执行以下命令

    git push -f origin ;
    
  • Command 1

    You need to change your commit message use the Below command

    git commit --amend -m "New and correct message"
    
  • Command 2

    After the add a new message and then below command execute

    git push -f origin <your_branch_name>
    
╭⌒浅淡时光〆 2025-01-04 12:02:11

如果您使用以下 -S 参数提交 Wearg 消息,则事件将起作用:

 git checkout branch

 git commit --amend -m "Your new message"

此时不要忘记您添加了更改并且您的遥控器不同,这就是您需要执行的原因:

 git push --force

如果您在 VSCode 中,您将看到差异, --force 参数忽略 git pull 并将更改的消息推送到同一个提交。

Event if you commit worng message with -S parameter following would work:

 git checkout branch

 git commit --amend -m "Your new message"

at this point do not forget that you added a change and your remote is different, this why you need to do:

 git push --force

If you are in VSCode you will see the difference, with --force parameter you ignore git pull and you push your changed message to the same commit.

寄离 2025-01-04 12:02:11

我对 Git 有点陌生,但我只是想补充一下我的经验。

git commit --amend -m“新且正确的消息”

这很好用,但下一个对我来说是问题。
在更改提交消息之前我已经推送了提交。
最后,当我尝试推送到远程时,它抛出了异常。
所以我应该在更新远程分支之前再次下拉。

git pull origin 分支名称

git Push 原始分支名称

希望我的一点经验对你有帮助。
谢谢。

I'm a little bit new to Git, but I just wanna add my experience.

git commit --amend -m "New and correct message"

This worked great but the next was the problem for me.
I already pushed the commit before changing the commit message.
Finally, when I tried to push to the remote, it git threw an exception.
So I should have pull down again before updating the remote branch.

git pull origin branch-name

git push origin branch-name

Hope my minor experience helps you.
Thanks.

红衣飘飘貌似仙 2025-01-04 12:02:11

这对我来说非常好,

git checkout origin/branchname

如果您已经在分支中,那么最好执行 pull 或 rebase

git pull

git -c core.quotepath=false fetch origin --progress --prune

稍后您可以简单地使用,

git commit --amend -m "Your message here"

或者如果您想打开文本编辑器,则使用

git commit --amend

我更喜欢使用文本-如果您有很多意见,请编辑。您可以使用命令设置您喜欢的文本编辑器

git config --global core.editor your_preffered_editor_here

无论如何,当您完成更改提交消息后,保存并退出

然后运行

git push --force

就完成了

This works for me pretty fine,

git checkout origin/branchname

if you're already in branch then it's better to do pull or rebase

git pull

or

git -c core.quotepath=false fetch origin --progress --prune

Later you can simply use

git commit --amend -m "Your message here"

or if you like to open text-editor then use

git commit --amend

I will prefer using text-editor if you have many comments. You can set your preferred text-editor with command

git config --global core.editor your_preffered_editor_here

Anyway, when your are done changing the commit message, save it and exit

and then run

git push --force

And you're done

美人如玉 2025-01-04 12:02:11

如果您使用的是 bitbucket 管道,则相同问题的其他信息

编辑您的消息

git commit --amend

推送到服务器,

git push --force <repository> <branch>

然后将 --force 添加到管道上的推送命令

git ftp push --force

这将删除您以前的提交并推送您当前的提交一。

第一次推送后删除--force

我在 bitbucket 管道上尝试过它并且工作正常

additional information for same problem if you are using bitbucket pipeline

edit your message

git commit --amend

push to the sever

git push --force <repository> <branch>

then add --force to your push command on the pipeline

git ftp push --force

This will delete your previous commit(s) and push your current one.

remove the --force after first push

i tried it on bitbucket pipeline and its working fine

提赋 2025-01-04 12:02:11

我第一次尝试重命名大约 6 个已经推送的旧提交消息,此后我做了进一步的提交。

所以这是最糟糕的情况“情况 4:已推送 + 旧提交”

我是 Vim(现在是 Nvim)用户,也是 Vim's Fugitive 的超级粉丝。我就是这样做的。

这是关于 在 Fugitive 中变基的一般帮助:

Rebase maps ~

ri                      Perform an interactive rebase.  Uses ancestor of
u                       commit under cursor as upstream if available.

rf                      Perform an autosquash rebase without editing the todo
                        list.  Uses ancestor of commit under cursor as
                        upstream if available.

ru                      Perform an interactive rebase against @{upstream}.

rp                      Perform an interactive rebase against @{push}.

rr                      Continue the current rebase.

rs                      Skip the current commit and continue the current
                        rebase.

ra                      Abort the current rebase.

re                      Edit the current rebase todo list.

rw                      Perform an interactive rebase with the commit under
                        the cursor set to `reword`.

rm                      Perform an interactive rebase with the commit under
                        the cursor set to `edit`.

rd                      Perform an interactive rebase with the commit under
                        the cursor set to `drop`.

r<Space>                Populate command line with ":Git rebase ".

r?                      Show this help.

  1. 获取提交列表。

    :Git log --oneline
    输入图片此处描述

  2. 我想修复第 12 行的提交消息(4d43a1b build(MPL-402): editorconfig fix for messages.json),因为它的格式不正确。

  3. 我将光标放在提交哈希 4d43a1b 上并输入 rw

    这将“执行交互式变基,并将光标下的提交设置为reword。”。请注意,与 git rebase -i HEAD~X 相比,这有多好 - 知道 X 是什么并不那么简单。
    输入图片此处描述

  4. 现在应该为您提供正确的 git rebase 命令。因此,使用 :wq

    写入并退出该缓冲区

  5. 然后按照 git/fugitive 的指导进行操作。我的一个提交出现了合并冲突,我通过正常的 逃亡合并冲突过程

希望这足以让您克服第一个“我以前从未做过变基,我到底应该做什么?”栏。如果您需要后续步骤的帮助,请给我留言。

I did my first attempt at renaming about 6 old commit messages that were already pushed and I had since done further commits.

So it's the nastiest case 'Case 4 : Already pushed + old commit'.

I'm a Vim (Nvim now) user and a mega fan of Vim's Fugitive. So this is how I did it with that.

This is the general help that you have around rebasing in Fugitive:

Rebase maps ~

ri                      Perform an interactive rebase.  Uses ancestor of
u                       commit under cursor as upstream if available.

rf                      Perform an autosquash rebase without editing the todo
                        list.  Uses ancestor of commit under cursor as
                        upstream if available.

ru                      Perform an interactive rebase against @{upstream}.

rp                      Perform an interactive rebase against @{push}.

rr                      Continue the current rebase.

rs                      Skip the current commit and continue the current
                        rebase.

ra                      Abort the current rebase.

re                      Edit the current rebase todo list.

rw                      Perform an interactive rebase with the commit under
                        the cursor set to `reword`.

rm                      Perform an interactive rebase with the commit under
                        the cursor set to `edit`.

rd                      Perform an interactive rebase with the commit under
                        the cursor set to `drop`.

r<Space>                Populate command line with ":Git rebase ".

r?                      Show this help.

  1. Get a list of commits.

    :Git log --oneline
    enter image description here

  2. I want to fix the commit message on line 12 (4d43a1b build(MPL-402): editorconfig fix for messges.json), because its not in the proper Conventional Commit format.

  3. I put my cursor over the commit hash 4d43a1b and type rw

    This will "Perform an interactive rebase with the commit under the cursor set to reword.". Note how nice this is compared to git rebase -i HEAD~X - knowing what that X is is not so simple.
    enter image description here

  4. This should now give you the correct git rebase command. So write and quit that buffer with :wq

  5. Then follow the steps through as git/fugitive guides you. I got a merge conflict for one of my commits which I fixed through my normal fugitve merge conflict process.

Hopefully that's enough to get you over the first "I've never done a rebase before, what the hell am I supposed to do?" hurdle. Leave me a comment if you want help with the later steps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文