随笔分类 -  git

摘要:添加github仓库路径后更新代码,执行git pull origin main报这个错误 * branch main -> FETCH_HEAD fatal: refusing to merge unrelated histories 原因:远程仓库有改动,早于本地添加仓库路径,导致出现拒绝mer 阅读全文
posted @ 2022-12-31 19:33 yongfengnice 阅读(175) 评论(0) 推荐(0) 编辑
摘要:android开发使用tortoiseGit合并代码处理冲突的使用记录 工具Android studio,Git,tortoiseGit 作为Android开发的,android studio离不开,使用git管理项目也是离不开的,自行下载git并配置https://git-scm.com/down 阅读全文
posted @ 2022-10-13 19:29 yongfengnice 阅读(205) 评论(0) 推荐(0) 编辑
摘要:1、git rebase -i HEAD~10 //最近10条 2、在列出pick xx行,将需要修改的行前面的pick改为edit(vim按i键进入编辑模式) 3、git commit --amend //进入编辑commit 4、git rebase --continue //如果还有下一个修改 阅读全文
posted @ 2021-12-14 12:24 yongfengnice 阅读(932) 评论(0) 推荐(0) 编辑
摘要:问题: error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 fatal: the remote end hung up unexpectedly 原因:使用https协议推送,并且存在文件过大。 单个文件 阅读全文
posted @ 2021-02-05 11:37 yongfengnice 阅读(2680) 评论(0) 推荐(0) 编辑
摘要:方法1-直接修改: git remote set-url origin new-git-url //将地址修改为new-git-url,这种方式将保留git提交的记录 方法2-先删除后添加: git remote rm origin //删除旧的url,这种方式不会保留git提交的记录 git re 阅读全文
posted @ 2021-01-07 10:47 yongfengnice 阅读(144) 评论(0) 推荐(0) 编辑
摘要:让git记住账号和密码的方法: 在git bash 中执行命令:git config --global credential.helper store 输入一次账号密码就可以保存,下次不再提示。 如果输错了需要重新输入。看这里:https://www.cnblogs.com/yongfengnice 阅读全文
posted @ 2019-01-08 11:21 yongfengnice 阅读(10492) 评论(0) 推荐(2) 编辑
摘要:git 提示fatal: Authentication failed for...又不弹出用户名和密码的解决办法: git config --system --unset credential.helper //重置验证设置 阅读全文
posted @ 2019-01-03 12:13 yongfengnice 阅读(1964) 评论(0) 推荐(0) 编辑
摘要:1. git clone repoUrl //关联远程仓库 实际上,就是在项目的.git/config文件多了以下东西: [remote "origin"] url = repoUrl fetch = +refs/heads/*:refs/remotes/origin/* 2. git pull / 阅读全文
posted @ 2017-07-24 15:42 yongfengnice 阅读(159) 评论(0) 推荐(0) 编辑
摘要:1. 配置用户名 git config --global user.name "yongfengnice" 2. 配置邮箱 git config --global user.email "yongfengnice@gmail.com" 阅读全文
posted @ 2017-07-17 14:11 yongfengnice 阅读(3810) 评论(1) 推荐(1) 编辑
摘要:1.配置ssh key ssh-keygen -t rsa -C "注册GitHub的邮箱" Enter file in which to save the key (/c/Users/yongfengnice/.ssh/id_rsa): //提示输入key保存的文件名称,默认是用户名下的.ssh文 阅读全文
posted @ 2017-05-28 15:19 yongfengnice 阅读(164) 评论(0) 推荐(0) 编辑
摘要:使用命令ssh-keygen生成ssh 密钥的时候,会在Enter file in which to save the key ("当前所在路径"): “给文件起个名字”,随便起一个名字,这样问题就出来了,你起的这个名字没有和ssh内设定的名字保持一致,所以使用命令ssh -T git@github 阅读全文
posted @ 2017-04-22 12:53 yongfengnice 阅读(3285) 评论(0) 推荐(0) 编辑
摘要:0.到项目的根目录下执行: git init 初始化本地仓库。此时,生成.git目录 执行git remote add origin 仓库的url --添加远程仓库地址 比如:git remote add origin https://github.com/yongfengnice/SlideVie 阅读全文
posted @ 2017-04-22 12:28 yongfengnice 阅读(434) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示