Git And Remote Repositories

Git And Remote Repositories

Commands discussed in this section:

  • git clone
  • git pull
  • git push

“Here is The Git URL”

For many people, the first time they use git occurs when somebody says: “Our source repository is in git. Here is the git URL”. You might be given a URL that looks like one of these:

  • http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
  • ssh://user@host.com/var/git/project.git
  • git://git.debian.org/collab-maint/usplash.git
  • file:///var/git/project.git

The URL describes where the repository is located and what protocol (http, ssh, git, local file, etc.) to use to get it.

To get started with a git repository, all you need to do is type git clone followed by the URL you were given.

You don’t have to understand the details of remote repositories to work with them. Typically, if you want to participate in a project using git, you can follow this standard workflow:

  • git clone URL:
    After you have done a git clone, you have a copy of the complete repository.
  • Make some changes to the local version of the repository, then git add and git commit the changes to the local repository.
  • git push to publish the changes (“commits”) to the remote repository
  • Periodically git pull to retrieve any new updates from the remote repository.

That’s all there is to it for the typical case.

git remote overview


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值