2023年9月4日
摘要: 错误内容如下: error: The following untracked working tree files would be overwritten by merge: xxx/xxx/xxx/xxx/xxx/xxx/xxx.java Please move or remove them b 阅读全文
posted @ 2023-09-04 21:25 孤独斗士 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 在使用Git的过程中,我们喜欢有的文件比如日志,临时文件,编译的中间文件等不要提交到代码仓库,这时就要设置相应的忽略规则,来忽略这些文件的提交。 Git 忽略文件提交的方法 有三种方法可以实现忽略Git中不想提交的文件。 1、在Git项目中定义 .gitignore 文件 这种方式通过在项目的某个文 阅读全文
posted @ 2023-09-04 21:15 孤独斗士 阅读(2173) 评论(0) 推荐(0) 编辑
摘要: git remote 命令 git remote -v 作用是显示所有远程仓库 git remote show xx (xx为远程地址的别名) 显示某个远程仓库的信息 git remote add [name] [url] 作用是添加远程版本库 git remote rm name git remo 阅读全文
posted @ 2023-09-04 11:10 孤独斗士 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 直接点下面的合并非相关历史,然后就能拉取了。 从网上查的资料: 如果git merge合并的时候出现refusing to merge unrelated histories的错误,原因是两个仓库不同而导致的。可以通过上面来拉取或者通过下面来实现: $git pull origin master – 阅读全文
posted @ 2023-09-04 11:00 孤独斗士 阅读(17) 评论(0) 推荐(0) 编辑