简体   繁体   中英

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?

$ 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? 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM