git config --global --unset http.proxy
git config --global --unset https.proxy
不能add,也不能checkout,一直束手无策(之前好像用另一种方法解决了,但是忘记是啥了)。解决:
1:ll -a:进入Zenud文件夹下执行,查看Zenud文件夹下是否存在.git文件夹,一般情况下应该是存在,删除.git文件夹。网上说,是因为这个文件夹的存在,导致冲突所致。
rm -r .git// (我没走下方的命令,status查看已经没了Zenus)
2:git add Zenud: 重新add
3:git commit Zenud-m "***"
4:git push
原文章:
(拒绝合并不相关的历史)
git pull origin master --allow-unrelated-histories
fatal: detected dubious ownership in repository at ‘D:/code/practice’
‘D:/code/practice’ is owned by:
‘S-1-5-21-4268349429-495329369-1196431027-1002’
but the current user is:
‘S-1-5-21-558453657-3296276975-2127903142-500’
To add an exception for this directory, call:
git config --global --add safe.directory ‘D:/code/practice’
电脑出了问题,重装之后用户名不一样,百度之后发现最简单的方法是直接执行最后一行显示的命令即可
git config --global --add safe.directory 'D:/code/practice'
用git查看一段时间内自己的代码改动数量,在vscode的终端(terminal)中运行了下方命令之后报了上方的错误
git log --since =2023-03-06 --until==2023-03-10 --author="shengtong" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %sn", add, subs, loc }'
原因是该命令需要在git bash面板中运行,而非terminal中。正确运行结果如下:
本文发布于:2024-01-31 20:10:02,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170670300431061.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |