Difference between revisions of "Version Control"

From Chemical Engineering @ UP wiki
Jump to: navigation, search
(Git)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=== Description ===  
 
=== Description ===  
  
Version control is used to manage multiple versions of a number files during a project.  A version control system provides two primary data management capabilities.  It allows users to lock files so they can only be edited by one person at a time, or track changes to files made by various persons at the same time.
+
Version control is used to manage multiple versions of a number files during a project and exchange changes between collaborators.
  
=== Motivation ===
+
=== Git ===
 +
Git has become the de facto version control tool.
  
If you are the only author of a file then there is very little reason to implement version control. If, however, you are collaborating with other individuals it becomes important to keep track of each persons contribution. More importantly if two people are working on the same file we must ensure that the work done by one person is not overwritten by that of the other when both parties save their modifications.  
+
This [https://www.youtube.com/playlist?list=PL6gx4Cwl9DGAKWClAD_iKpNC0bGHxGhcx video series] is an excellent place to start learning about installing and using Git.  
  
In such cases version control may be used to manage this. Version control may take either of the following strategies to do this
+
=== Github ===
* The first method allows one person to lock the file while they edit it, preventing anyone else from editing it.
+
* The second method allows everyone to edit a copy of the file individually and then later combine all these efforts in an intelligent manner.
+
  
Wikipedia offers the following [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software comparison] between the various systems. On Campus we use mostly use Git, a good argument fo it is to be found at [http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide/2678236#2678236 Stackoverflow]
+
We store all our repositories on [https://github.com/ GitHub], please create an account.
 
+
=== Git/Github ===
+
 
+
We store all our repositories on [https://github.com/ GitHub], please create an account. After creating an account you will want to create a repository, this is a little less straight forward and depends on which operating system you are using
+
  
 
==== Proxy configuration ====
 
==== Proxy configuration ====
In order for Git to be able to access the Github servers you need to do two things:
+
In order to be able to use GitHub through the [[Campus Proxy Servers]], you may need to set up the proxy from the commandline:
  
 
1. Issue the following command:
 
1. Issue the following command:
Line 24: Line 19:
 
2. Use the https links for your project rather than the ssh link.  You may be prompted for a password - this is your github password.  If you don't like typing it every time, just use a similar format as above for your repository access.
 
2. Use the https links for your project rather than the ssh link.  You may be prompted for a password - this is your github password.  If you don't like typing it every time, just use a similar format as above for your repository access.
  
==== Windows ====
+
[[File:github_https.png]]
 
+
Git on windows is mainly managed by the Git interface, though this is a little cumbersome if you're not used to the command prompt and it is recommended that you try out [http://code.google.com/p/tortoisegit/ tortoise git] as a GUI generation friendly alternative. The best instrucitons for such an installation are provided [http://dbanck.de/2009/10/08/github-windows-and-tortoisegit-part-1-installing-pulling/ here] and [http://help.github.com/set-up-git-redirect on the GitHub site] itself.
+

Latest revision as of 08:05, 5 April 2019

Description

Version control is used to manage multiple versions of a number files during a project and exchange changes between collaborators.

Git

Git has become the de facto version control tool.

This video series is an excellent place to start learning about installing and using Git.

Github

We store all our repositories on GitHub, please create an account.

Proxy configuration

In order to be able to use GitHub through the Campus Proxy Servers, you may need to set up the proxy from the commandline:

1. Issue the following command:

 git config --global http.proxy "http://firewallusername:firewallpassword@cache.up.ac.za:8080"

2. Use the https links for your project rather than the ssh link. You may be prompted for a password - this is your github password. If you don't like typing it every time, just use a similar format as above for your repository access.

Github https.png