git - 我必须直接设置 remote.origin.url
问题描述
我在 Ubuntu 上工作。每次我尝试克隆 repo 时,我都必须remote.origin.url
直接设置。
在 Windows 上,我只需要 git clone "repository-name" 并且我不必remote.origin.url
每次都设置来克隆正确的 repo。
我应该怎么做才能像在 Windows 上一样在我的 Ubuntu 上克隆 repo?
那一刻,我的git config remote.origin.url
样子是这样的:
remote.origin.url=https://github.com/username/repo1.git
当我尝试git clone https://github.com/username/repo2.git
克隆 repo1,而不是 repo2 时。
解决方案
推荐阅读
- c# - 如何对测试(视图模型)类中的方法调用进行单元测试?
- .net-core - Build() 和 Run() 函数在 ASP.Net Core Web 应用程序中扮演什么角色?
- contact-form - PHP 联系表单的高级反垃圾邮件措施
- php - 将数据从登录页面提交到 MySQL 数据库的代码
- python - 添加经线、平行线和比例后,底图返回空白
- c++ - MSVC,x64,是否可以在函数内发出任意字节?
- tensorflow - TensorRT/TFlite 示例实现
- c# - 当没有 try-catch 时,什么会检测并引发常见异常,例如 DivideByZero、StackEmpty 等?
- python - 如何制作将在 Python 中创建进程的 for 循环?
- javascript - 在 Vue 中为图表选项操作数据