随笔分类 - git
摘要:代码如下: cd existing_repo git remote add origin http://localhost:9015/dev-root/srzx-middleground-web.git git branch -M main git push -uf origin main
阅读全文
摘要:取消对所有文件的追踪 git rm -r --cached //不删除本地文件 git rm -r --f //删除本地文件 对某个文件取消追踪 git rm --cached idea.txt //删除idea.txt跟踪,并保留本地 git rm --f idea.txt //删除idea.tx
阅读全文
摘要:解决方案一:将https替换成git 第一次克隆的错误信息: Administrator@WIN-QIJ6CH8JVRR MINGW64 /f/BookProject $ git clone https://github.com/fenixsoft/microservice_arch_springc
阅读全文
摘要:查看日志、找到提交的对应代码id 一、git log 黄颜色的就是 二、git reset --soft 版本id git reset --soft 3513aaee5059a838fc316e82752d5165a45b4fa7 注意:这里使用的 soft这个参数,表示之前我们第二次提交的代码会保
阅读全文
摘要:首先说下背景:现在我是从公司主仓库fork到我自己的仓库中,开发完后要先将主仓库代码合并到我自己的仓库中,然后解决冲突后再提pr。主仓库:company:master我的仓库:yoyocheknow:master 合并步骤:1:将主仓库的地址添加到自己本地的远程仓库中 //git remote ad
阅读全文
摘要:错误信息 npm ERR! path git npm ERR! code ENOENT npm ERR! errno ENOENT npm ERR! syscall spawn git npm ERR! enoent Error while executing: npm ERR! enoent un
阅读全文
摘要:1、基本操作 配置用户名 git config --global user.name "liuzhihao" 配置邮箱 git config --global user.email "cn_liuzhihao@163.com" 生成公钥和私钥ssh-keygen -t rsa -C "cn_liuz
阅读全文