随笔分类 -  GIT

摘要:报错信息: Unable to negotiate with 111.111.113.86 port 123: no matching host key type found. Their offer: ssh-rsa 分析: 原因是Mac os Ventura 13.0 升级了ssh到9.0,ss 阅读全文
posted @ 2024-07-08 15:46 瑾琛 阅读(213) 评论(0) 推荐(0) 编辑
摘要:一、初级用法 git revert 撤销某次操作,此次操作之前和之后的commit和history都会保留,并且把这次撤销,作为一次最新的提交。 git revert HEAD 撤销前一次 commit git revert HEAD^ 撤销前前一次 commit git revert commit 阅读全文
posted @ 2022-11-18 13:08 瑾琛 阅读(1825) 评论(0) 推荐(0) 编辑
摘要:撤销暂存区(index)区的track 当我们新增加文件时,使用git status会打印出: Untracked files: (use "git add <file>..." to include in what will be committed) hello.txt nothing adde 阅读全文
posted @ 2022-08-07 11:59 瑾琛 阅读(4191) 评论(0) 推荐(1) 编辑
摘要:使用git pull命令出现以下的警告: warning: Pulling without specifying how to reconcile divergent branches is discouraged. You can squelch this message by running o 阅读全文
posted @ 2022-04-26 21:14 瑾琛 阅读(1074) 评论(0) 推荐(0) 编辑
摘要:如果在修改时发现修改错误,而要放弃本地修改时, 一, 未使用 git add 缓存代码时。 可以使用 git checkout -- filepathname (比如: git checkout -- readme.md ,不要忘记中间的 “--” ,不写就成了检出分支了!!)。放弃所有的文件修改可 阅读全文
posted @ 2022-03-15 15:08 瑾琛 阅读(12772) 评论(0) 推荐(1) 编辑
摘要:Git中无法忽略.idea等文件的问题解决 问题描述 明明在.gitignore中加入./idea文件夹,但是./idea文件夹下面的一些文件竟然还能被Commit: 每次提交的时候很不方便,并且对于一个有强迫症的程序员来说,这简直太难受了。 问题原因 远程分支上存在这个文件导致即使本地将其添加到i 阅读全文
posted @ 2021-07-16 15:29 瑾琛 阅读(1534) 评论(0) 推荐(0) 编辑
摘要:Git常用命令汇总以及其它相关操作 一、常用的git命令 --文件目录操作命令 mkdir * 创建一个空目录 *指目录名 pwd 显示当前目录的路径。 cat * 查看*文件内容 git rm * 删除**文件 --git初始化操作 git init 把当前的目录变成git仓库,生成隐藏.git文 阅读全文
posted @ 2021-02-26 17:17 瑾琛 阅读(310) 评论(0) 推荐(0) 编辑

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