-
Notifications
You must be signed in to change notification settings - Fork 77
GIT FAQ
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)
-
Clone is for fetching repositories you don't have, checkout is for switching between branches in a repository you already have.
-
git pull does a git fetch followed by a git merge. Detailed explanation
-
A clone is only done once, when you want to start a new local repository, a pull is for updating
-
In general there are three:
-
Local branch - this exists only on your machine
-
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
-
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)
-