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
git reset HEAD file,会保留文件的修改,一般用于分开提交修改.git add file反操作.
未暂存(git add): git checkout --file 已暂存, 未提交: git reset --hard file 已提交: git reset commitId 清除所有未保存的变更,含未跟踪文件: git clean -fd 移除所有已暂存修改,但不移除工作目录中的新文件(未跟踪): git reset --hard commitId 修改提交记录: git rebase 移除之前的工作,但保留提交记录: git revert commitId
The text was updated successfully, but these errors were encountered:
No branches or pull requests
从暂存区移除文件.
git reset HEAD file,会保留文件的修改,一般用于分开提交修改.git add file反操作.
放弃文件的修改
未暂存(git add): git checkout --file
已暂存, 未提交: git reset --hard file
已提交: git reset commitId
清除所有未保存的变更,含未跟踪文件: git clean -fd
移除所有已暂存修改,但不移除工作目录中的新文件(未跟踪): git reset --hard commitId
修改提交记录: git rebase
移除之前的工作,但保留提交记录: git revert commitId
The text was updated successfully, but these errors were encountered: