Git And Remote Repositories | Git Show | Git Clone

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

Recent Articles

What is the deal with the Git Index? What is the Git Index?

The git "index" is where you place files you want committed to the git repository. Learn more about the git index and git commit by selecting this link.

Visualising Branches And Their Commits | Git Show-branch

We explain and discuss the use of the git show-branch, gitg, gitk and qgit in this Tutorial. Complete with examples.

“Tracking Branches” And “Remote-Tracking Branches”

Both Tracking Branches and Remote Tracking Branches are created on the git client when a git clone command is used.

Temporarily Stashing Your Work

Git Stash is used when you want to record the current state of the working directory and index, without committing, to come back to complete later.

Shared Repositories Should Be Bare Repositories

Bare Repositories - When creating a central repository that will be shared by other users, the repositories should be created with the --bare option.

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox