Commit 15277ce9 authored by Nanditha Nair's avatar Nanditha Nair

Update week02.md

parent a66c6135
Pipeline #154119 passed with stages
in 34 seconds
# 2. Project management
##Git
##Version Control System
###Git
<p>Git is a Distributed Version Control System to locally track changes in your files/folders and Push and Pull changes from remote repositories like GitLab, GitHub, BitBucket etc and collaborate in teams. It is free and open source.
Let us say I have a file that I want to work on, I want to maintain all the changes
and I want to check all the changes I made to this file, I can use some version control system that will check all the changes in the file and it will maintain all the version history. So I can go back and see any version and look at all the changes that were made to the file. So it is a version control system when we are working on any source code or when we want any file or folders and we want this file controlled by
......@@ -7,35 +8,39 @@ Git was created by Linus Torvalds in 2005 for development of the Linux Kernal.</
<p align="center"><img alt="Version Control System" src="../../images/week02/vc.png" /></p>
<p align="center"><img alt="Version Control System Team" src="../../images/week02/vcsteam.png" /></p>
##Centralised Version Control Systems
###Centralised Version Control Systems
<p>A central repository placed on a server, there are different people working on the repository. They work on this repository online and make their changes so they can collaborate. But the problem is that the central repository is a single repository which is placed on a server, so if anything goes wrong there it will be difficult to maintain the backup Also people who are connected to the server have to be online to work on their systems.</p>
<p align="center"><img alt="Centralised Version Control System" src="../../images/week02/centralised.png" /></p>
##Distributed Version Control Systems
###Distributed Version Control Systems
<p>There is a repository just like in the CVCS, but every person can pull and create his own local repository. Work Station 1 has his own copy. So one of the major advantages of this system is that if anything goes wrong on the server we can back up the repository from any one of the local systems because these are the complete copies of the repository. Every person does not need to be online every time. One can pull the repository and keep on working on it in an offline mode and you will need an internet connection only when you want to push the changes or pull data from the repository.</p>
<p align="center"><img alt="Distributed Version Control System" src="../../images/week02/distributed.png" /></p>
## Set up Git
<p align="center"><img alt="Git" src="../../images/week02/git.png" /></p>
##GIT Lab
###GIT Lab
<p>Git Lab is a web based repository manager, or it is simply a website to upload your repositories online.
<br>It provides a backup on cloud
<br>It provides visual interface to your repositories
<br>It makes collaboration easier</P>
##Is Git =Git Lab
###Is Git =Git Lab
<p>No, Git is a VCS whereas GitLab is just a website where you can put your repositories.
<br>Git Lab can be used with any other Version control System, like Mercurial.
<br>In the same way you can use Git with any online Version Management System like GitHub or BitBucket. There is no relation between Git and GitLab; they are two different things.</p>
##A simple Workflow
###A simple Workflow
<p align="center"><img alt="Workflow" src="../../images/week02/workflow.png" /></p>
<p>A remote repository is placed on a server. We can do a clone/pull to take all the repositories present here into our local system. So here we can get all the repositories. Let us say, we have all these 4 repositories or different branches of the repositories. Now we can take or check out any branch. It will create a working copy for us and now we can do all our work on our working copy, we can be offline for this and we can do all the changes here. Once we are done with our changes, we can do a “add” command. “Add” command will put all our changes on a staging area, it will still not commit the changes but just put on a staging area. Then we have to execute a “commit” command which will make all our changes and commit it to the local repository. Even at this point, the changes are still not made on the remote repository. We have to again do a “push” command which will push our changes to the remote repository.</p>
## Set Up GitLab and SSH
## Steps I did to learn Git and create a website
My Computer has Windows 10 installed. It is a lenovo thinkpad that I'm using. As I attended the first session by Prof.Neil remotely and followed the tutorials I wasn't aware of the instructions given at my lab by my local instructors.
I was supposed to install Ubuntu.
### Set up Git
I followed [this](http://fabacademy.org/2019/docs/FabAcademy-Tutorials/week01_principles_practices_project_management/git_simple.html) Fabacademy tutorial.
I also called my Friend Salman Faris who was a fab academy instructor whenever I was stuck and followed his instructions to the T.
I downloaded Git (version 2.20.1-64-bit). When the installation ended I double-clicked the .exe. (I pressed “Next” in all of the Windows and didn't change any setting)
As per Salman's instructions I opened the Command Prompt.(Click Run and type cmd)
<p align="center"><img alt="Git" src="../../images/week02/git.png" /></p>
##Git Commands that I used
<br><b>Cloning an existing repository</b>
<br><b>git clone</b>
To obtain a copy of the project in the central repository.
......@@ -43,6 +48,11 @@ git clone is used to create a copy or clone of remote repositories
<p align="center"><img alt="git clone" src="../../images/week02/clone.JPG" /></p>
> "git clone command in action"
## Set Up GitLab and SSH
##Git Commands that I used
<br><b>Saving changes to repository</b>
<br><b>git add</b>
git add . will take any changed and untracked files in the repository and add them to the repository and update the repository’s working tree. This will add a change in the working directory to the staging area.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment