Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只是在我的存储库上添加并提交,还没有推送它。现在提交中有一些文件实际上需要被忽略。所以我需要撤消添加和提交,但所有文件都需要保持不变。该怎么办?
仅针对此类问题,我在~/.gitconfig文件中添加了以下别名:
~/.gitconfig
[alias] undo = reset --soft HEAD^