说你
git remote add origin git@git.assembla.com:myRepo.git
然后..你知道..你忘记了到底origin
映射到什么:(
你怎么知道?
说你
git remote add origin git@git.assembla.com:myRepo.git
然后..你知道..你忘记了到底origin
映射到什么:(
你怎么知道?
git remote -v
将列出它们。通过检查可以看到此信息的来源.git/config
:
cat .git/config
存储库基础目录中的config
文件包含纯文本格式的所有配置。.git
你会看到这样的东西:
[remote "origin"]
url = git@git.assembla.com:myRepo.git
fetch = +refs/heads/*:refs/remotes/origin/*
该url
行(在 git config 用语中,的值remote.origin.url
)包含远程 URL。
另一种查找方法是执行git config remote.origin.url
:
$ git config remote.origin.url
git@git.assembla.com:myRepo.git
$
git remote -v
will give a list of all remote along with their corresponding URLs. You can find out even more information about the remote by doing
git remote show origin
Read more in the man page for git-remote
.
You can run the following command:
git remote -v
to get a list of all remotes with their URL.
From the man-page:
OPTIONS
-v, --verbose
Be a little more verbose and show remote url after name. NOTE: This must be placed between remote and subcommand.COMMANDS
With no arguments, shows a list of existing remotes. Several subcommands are available to perform operations on the remotes.