当我跑时:
git push origin master
......在这方面,<代码>原文代码”的含义是什么?
当我跑时:
git push origin master
......在这方面,<代码>原文代码”的含义是什么?
origin
is the default name of the remote git repository you cloned from. Have a look at .git/refs/remotes/origin/*
and .git/config
within your sources to see how git knows about it.
git有一个“再分配”的概念,即像一个存放处那样容易的镍,因此,在你想提及另一个存放处时,你不必使用全部的URL。
<代码>origin<> /code>只是一个与其他人一样的遥远之处,但你经常看到这一点,因为如果你第一次戴上了存放处,那么<代码>git <>/code>将不停地建立一个称为origin<>/code>的遥远处,以提及你从中穿戴的URL。
如果您填写了<代码>git 边远-v,该编码将显示你在当地存放处所建立的所有边远地点以及他们提到的URLs。 (你们看到,它比我前面说过更为复杂,因为边远可以指不同的URL来推动和挑拨,但你可能不需要担心:)
来源是你从
This would be help
https://www.git-tower.com/learn/git/ Format/origin
n 吉唐,“原始”是偏远存放处的短手名称,该项目最初由它自己支配。 更确切地说,它不是原先的URL储存地,而是使用,从而使得参考更为容易。
请注意,起源决不是“魔法”的名称,而只是一项标准公约。 尽管使这项公约失去意义,但你可以完全改称该公约,而不失去任何功能。
在以下例子中,“独有”指挥的URL参数成为地方布局的“原始”:
git Clone 。
origin is remote created by the git itself when you for the first clone the repo to point the URL from which you created the clone. eg: origin git@github.com:/PROJECT_U
“Origin”是你希望公布承诺的遥远存放处的名称。 通过公约,缺省边际存放处称为“原始”,但可以同时与几个边远者(有不同名称)合作。
Putting it in very simple way, let see where origin comes from. When you first clone your repo from a remote server, or cloud i.e. GitHub, you use either the HTTPS, SSH, or GitHub CLI link to do the cloning. In my example, I use the URL
git clone https://github.com/****/my-first-repo.git
to clone my project. So, the origin of my project is on GitHub, therefore the URL link below that point to my remote repo on GitHub is the origin
https://github.com/****/my-first-repo.git
Using bash CLI if I type git remote -v
, I get the same URL as below
$ git remote -v
origin https://github.com/****/my-first-repo.git (fetch)
origin https://github.com/****/my-first-repo.git (push)
这一产出证实,如上所述,来源是URL。
现在,如果你想要把你的主子(现在称作主人)推向原产地,而不要使用。
git push https://github.com/****/my-first-repo.git master
简明扼要地使用
git push origin master
Hope this help someone understand the concept.
简单术语:
git push origin master
git
: attention computer, the following commands are for the git library, I hope I have it installed.push
: I am going to take my code, and shove it to this Github repo.origin
: The default codename for the repository that keeps my code on my github page. (You know when you did git init, or git clone? It sets up a git storage unit basically, and that storage unit on github, and it has a default identifier as the origin . When you push, all your code goes into this storage thing called the origin.master
: on my repo called origin, grab the main branch, which is called master.To recap: Hi machine, use github tools to take the code i m working on, and put it online. Put it in the project this repo is part of, that was created on github (called origin), and store it in whatever branch I say, in this case master .
Im having some confusion with my git usage. I cloned a repo from one comp to the other, and the new clone is the state of the original that was active some time ago. So its cloning a past version. ...
I was wondering if the strategy I m using for tagging and hotfixing tags (which then I use for deploying rails applications) with git is appropriate. For tagging I just tag a commit of the master ...
I have a svn repo with various apps as subdirectory of a single svn repo. That worked because I could have checked out a partial, repo. As I cant do that with git obviously I need multiple repos. I ...
I understand how to merge branches together in git, and I love how easy it makes it. I have a branch that looks like this: project/ |--subproj1/ | |---(files) | |--subproj2/ |---(files) A ...
We still use CVS, I use git and hg for my personal use though I m still a novice at both, but I realize they re much more modern and better, faster, distributed, etc. It s just everyone is so ...
I get this on every git svn command I try. I am using git version 1.6.4.2 on OS 10.6 The initial git svn fetch works, and i can do further fetches after that, but they do not enter the log or update ...
Given I have a master branch and a other branch. In the other branch are files I don t want to commit (e.g. log files) so I ignored them in .gitignore. When I switch to the master branch, these ...
Using Git at home has spoiled me - I now find using TFS at work to be a bit of a drag and want to explore the possibility of using Git locally and syncing somehow with TFS. I figure there are a few ...