随笔分类 - git
摘要:最近搭接了一套Linux环境,当使用命令git pull拉取git代码时,报了如下提示: 解决方案: 保证不再出现配置合并策略的警告文案,那么你只需要执行 git config pull.ff false 或者 git config --global pull.ff only 即可
阅读全文
摘要:remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.(大家也可以看一下,是github要求使用双因子验
阅读全文
摘要:一、通过命令行(方法一) 设置代理: git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy http://127.0.0.1:1080 取消代理: git config --globa
阅读全文
摘要:编辑Git 配置文件: vim ~/.gitconfig 修改配置文件,添加下面内容: [credential] helper = store 再触发填写一次用户名密码,就保存了。 如果系统找不到.gitconfig文件: git config --global --edit
阅读全文
摘要:为了避免git自动合并代码并且提交无意义记录 Merge branch 'master' of https://git.xx.cc/aa/projectName 请使用来拉取远端代码: git pull --rebase 也可以一劳永逸: git config --global pull.rebas
阅读全文
摘要:默认使用vimdiff git config --global diff.tool vimdiff 取消二次提示每次使用git difftool时会有二次提示,如下设置可以取消 git config --global difftool.prompt false 支持退出整个对比 git config
阅读全文
摘要:查看提交历史并带每次提交的文件名列表 git log --statgit log --grep="keyword" //按照关键字查找历史记录 提交历史回滚代码到指定的版本,撤销commit(未push) git reset --soft log版本号 回滚代码到指定的版本,撤销add与commit
阅读全文
摘要:首先去gitee下登录账号,进入设置页面(右上角头像鼠标悬停下拉菜单中的设置) 点击SSH公钥,然后去服务器上生成一个公私钥,(直接基于root账号生成即可,之后需要改变) ssh-keygen -t rsa -C "xx@xx.com" 其中xx.xx.com是你的gitee账号的登录邮箱,然后点
阅读全文