Sunday, May 29, 2016

Version Control Made Easy... Or Hard, Not Sure Which.

For those not familiar with version control, version control is something that it's used to keep track of a project and the changes that are made. This way previous versions can be gotten to if errors are introduced, to easy multiple people working on the same files, or for other reasons. In the situation that I am discussing this the files are primarily code files, but they don't have to be.

Most of my experience so far is with Microsoft's version control systems SourceSafe and Team Foundation Server (TFS). However, Git is slightly cheaper (free), with web based hosts that are also cheap (free) like GitHub. I am used to how TFS works, I am learning how Git works. The differences in Git leads to a slightly different vocabulary. And those that don't know version control won't know the terms anyway.

For convenience sake I will put several definitions here for those with questions.

A repository is a project and all associated files and all their versions.

A branch is an independent group of files, often a copy of all project files, but not necessarily. The master branch is the main branch of the repository and usually considered "the code" or "the source". Most other branches will be copies of the master branch allowing the code to be edited without effecting the master branch.

To clone a repository means to copy the entire repository to your local machine. This allows the code to be worked on with out needing to maintain a network connection.

To commit code means to persist the changes in the local repository, making them the "official" latest version.

To do a push is to sync a local repository with the main repository. This step is necessary due to the detached nature of the local repository in Git.

A pull request is a request to include changes that have been made in one branch in another.

A merge is the process of comparing changes made in two locations to determine which changes need to be included and which can or need to be dropped. It is possible for multiple people to make changes to the same file and those changes to conflict.

If you have any question please feel free to ask. I realize that this may not cover everything that some might want to know.

No comments:

Post a Comment