Skip to content

GIT FAQ

Paul Schwartz edited this page Jan 2, 2014 · 3 revisions

This FAQ is for issues that openElis developers have come across. The actual git FAQ is [here] (https://git.wiki.kernel.org/index.php/GitFaq) The advantage of this FAQ is that it is smaller and tailored for our workflow. If you have an ah-ha moment or have helped several others with the same issue then this is the place for it

  • [What is the difference between git clone and git checkout?] (#clone)
  • [What is the difference between a git pull and a git fetch?] (#fetch)
  • [What is the difference between a git clone and a git pull?] (#pull)
  • [What are the different types of branches?] (#branch)
  • [What are the different kinds of branches] (#branchKind)
  • [How do I sync my forked repository with the main repository?] (#sync)

  1. What is the difference between git clone and git checkout?

    Clone is for fetching repositories you don't have, checkout is for switching between branches in a repository you already have.

  2. What is the difference between a git pull and a git fetch?

    git pull does a git fetch followed by a git merge. Detailed explanation

  3. What is the difference between a git clone and a git pull?

    A clone is only done once, when you want to start a new local repository, a pull is for updating

  4. What are the different types of branches?

    In general there are three:

    1. Local branch - this exists only on your machine

    2. Tracking branch - A branch on your machine which matches a branch on the remote machine. You are able to edit this branch and push the changes to the remote machine

    3. Remote tracking branch - A copy of the branch on your machine which represents the current state of the branch on the remote machine. This should not be edited. (N.B. Not clear if “current state” is the state the last time a pull was done or if it can be more recent than that)

  5. What are the different kinds of branches

    The model we are using

  6. How do I sync my forked repository with the main repository?

    Detailed explaination