We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你正在做一个项目,然而在过去的某个时候,你把两个重大的改动提交到了一个版本A中。 直到又进行了几次提交之后,你才发现有必要将之前那两个重大改动拆分成版本A和版本B。
git rebase -i HASH
git reset HEAD~
git rm file --cache
gti commit --amend -m ‘Version A’
git commit -m ‘Version B
git rebase - -contine
The text was updated successfully, but these errors were encountered:
原文链接
Sorry, something went wrong.
No branches or pull requests
使用场景
你正在做一个项目,然而在过去的某个时候,你把两个重大的改动提交到了一个版本A中。 直到又进行了几次提交之后,你才发现有必要将之前那两个重大改动拆分成版本A和版本B。
使用步骤
git rebase -i HASH
返回到你需要拆分的版本git reset HEAD~
返回到你需要拆分的上一个版本(此时的代码保持的版本A与版本B的共同内容)git rm file --cache
gti commit --amend -m ‘Version A’
git commit -m ‘Version B
’git rebase - -contine
The text was updated successfully, but these errors were encountered: