Wednesday 22 February 2017

Working with Git

Terminology

Here’s the git terminology:
  • Master - the repository’s main branch. Depending on the work flow it is the one people work on or the one where the integration happens
  • Clone - copies an existing git repository, normally from some remote location to your local environment.
  • Commit - submitting files to the repository (the local one); in other VCS it is often referred to as “checkin”
  • Fetch or Pull - is like “update” or “get latest” in other VCS. The difference between fetch and pull is that pull combines both, fetching the latest code from a remote repo as well as performs the merging.
  • Push - is used to submit the code to a remote repository
  • Remote - these are “remote” locations of your repository, normally on some central server.
  • SHA - every commit or node in the Git tree is identified by a unique SHA key. You can use them in various commands in order to manipulate a specific node.
  • Head - is a reference to the node to which our working space of the repository currently points.
  • Branch - is just like in other VCS with the difference that a branch in Git is actually nothing more special than a particular label on a given node. It is not a physical copy of the files as in other popular VCS.

Example Cloning and Fetch from remote repository


No comments:

Post a Comment