[英]How do I go to the cloned repo and check in git bash if there isn't already a remote repo linked with my local repo?
Which commands do I use to go to the cloned repo and after that check if I haven't already linked a remote repo to my local one?我使用哪些命令将 go 连接到克隆的仓库,然后检查我是否还没有将远程仓库链接到本地仓库?
$ git init
Initialized empty Git repository in C:/Users/tomas/Desktop/Continuous Integration/CIB/Labo4/.git/
$ git remote add origin https://github.com/howest-gp-cib/st-1920-2-S1G2-labo4-arno-tomas.git
$ git status
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
$ git clone https://github.com/howest-gp-cib/st-1920-2-S1G2-labo4-arno-tomas.git
Cloning into 'st-1920-2-S1G2-labo4-arno-tomas'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), 2.38 KiB | 110.00 KiB/s, done.
Sorry if I haven't posted the question correctly, it's my first one.抱歉,如果我没有正确发布问题,这是我的第一个问题。
If I understand the question, you want to know whether a newly created local git repo has an existing remote?如果我理解了这个问题,您想知道新创建的本地 git 存储库是否有现有的遥控器? That won't happen, but for an existing local copy of a repo which you previously cloned, and for example, you can't recall whether you added other remotes, try
git remote -v
-- that will list all remotes that have been defined for the repository.这不会发生,但是对于您之前克隆的存储库的现有本地副本,例如,您不记得是否添加了其他遥控器,请尝试
git remote -v
- 这将列出所有已被为存储库定义。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.