git remote是什么意思? [英] What does git remote mean?

查看:1075
本文介绍了git remote是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

远程是什么意思?当克隆位于中心位置的存储库时,我们是不是创建它的远程版本?



当我执行命令时

  $ git remote 

来源 即可。这意味着什么?



当我执行时

  $ git分支-r 

我得到 origin / master 。这是什么?

解决方案

我找到了一个很棒的答案 git 是一个分布式版本控制系统。大多数操作都在本地完成。为了与外界沟通,git使用了所谓的遥控器。这些存储库不是您本地磁盘上的存储库,您可以将更改推入(以便其他人可以看到它们)或从中拉出(以便您可以获取其他更改)。命令 git remote add origin git@github.com:peter / first_app.git 创建一个名为 origin 的新 remote 位于 git@github.com:peter / first_app.git 。一旦你这样做了,在你的push命令中,你可以推送到 origin ,而不是输入整个URL。


我会推荐阅读整个答案。


What does remote mean? When cloning a repository located at a central location, aren't we creating its remote version?

When I execute the command

$ git remote

I get origin. What does this mean?

When I execute

$ git branch -r

I get origin/master. Now what is this?

解决方案

I found a fantastic answer here:

As you probably know, git is a distributed version control system. Most operations are done locally. To communicate with the outside world, git uses what are called remotes. These are repositories other than the one on your local disk which you can push your changes into (so that other people can see them) or pull from (so that you can get others changes). The command git remote add origin git@github.com:peter/first_app.git creates a new remote called origin located at git@github.com:peter/first_app.git. Once you do this, in your push commands, you can push to origin instead of typing out the whole URL.

I would recommend reading the whole answer.

这篇关于git remote是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆