在File
课堂上有两个字符串,separator
和pathSeparator
.
有什么不同?我什么时候应该使用另一个?
所以我正在与其他人一起开展一个项目,并且有多个github forks正在进行中.有人刚刚修复了一个问题并且我与他的分叉合并,但后来我意识到我可以找到更好的解决方案.我想恢复我刚刚提交的提交.我试过这样做,git revert HEAD
但它给了我这个错误:
fatal: Commit <SHA1> is a merge but no -m option was given.
那是什么意思?当我合并并提交时,我确实使用-m选项说"Merged with <username>".
我在这做错了什么?
好的,所以当我尝试恢复提交(使用Git)时,我有时会收到错误.我所做的就是
git revert <commit hash>
它给了我这样的信息:
error: could not revert <commit hash> <commit message>
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
Run Code Online (Sandbox Code Playgroud)
这是否意味着我应该使用git mergetool
并解决任何冲突?一旦我这样做,我可以添加/ rm然后提交,并恢复完成?