
git
watl0
1140454645@qq.com
展开
-
rror: unpack failed: error Missing tree
解决:解决方法来自 stackoverflow.使用如下命令即可推送成功:git push --no-thin review HEAD:refs/for/master关键点是 --no-thin 选项. stackoverflow 上的那位答主这么解释的:默认情况下 git push 会在向服务器推送时进行优化,以将所发送的包降低到最小. 做法是发送时忽略本地仓库和远端仓库中共有的...转载 2020-02-26 19:10:17 · 888 阅读 · 0 评论 -
Git出现 fatal: Pathspec 'xxx' is in submodule 'xxx' 异常 解决方案
fatal: Pathspec 'au.py' is in submodule 'rowebh5' git rm -rf --cached rowebh5/ git add rowebh5/原创 2019-12-04 18:02:28 · 1823 阅读 · 0 评论 -
git技巧
在终端使用git commit 命令 中断了,再去pull出现错误提示:Another git process semms to be running in this repository, e.g. an editor opened by ‘git commit’. Please make sure all processes are terminated then try again. I原创 2017-06-09 10:12:25 · 423 阅读 · 0 评论 -
git还原某个特定的文件到之前的版本
场景: 对于某个Git控制下的文件进行了修改,但是改的不满意,想退回到改之前的版本。假定该文件为 src/main/main.c解决方法:第一步: 在命令行中输入 git log src/main/main.c 得到该文件的commit 历史。 会得到类似下面的界面第二步: 复制需要回退版本的hash,在此假设我们回退到 d98a0f565804ba639b转载 2017-12-28 11:30:32 · 1714 阅读 · 0 评论 -
Git 一些错误的解决方法
1. Pull is not possible because you have unmerged files.症状:pull的时候$ git pullPull is not possible because you have unmerged files.Please, fix them up in the work tree, and then use 'git a转载 2017-12-29 10:47:10 · 1833 阅读 · 0 评论 -
git技巧之checkout fail
使用 sourcetree时还原到某个版本做了一些修改 再切换到别的版本 想要当起本地修改可以使用 git clean -d -fx ""1. x :表示删除忽略文件已经对git来说不识别的文件 2. d: 删除未被添加到git的路径中的文件 3. f: 强制执行 clean之前失败 clean 之后成功原创 2018-01-27 19:13:24 · 2647 阅读 · 0 评论