Version Control Gitlab story

Norway

Assignment 2

I was familiar with github .. I was uploading my codes to it for a long time
So as a background I can with gitlab as I was doing it before with github ..
But the idea of using the terminal in this was as a comfort zone for me .. so i decided to dig for more informations about gitlab ..

So after a little bit search I was really shocked with the ability of Git concept ..

Git is realy a powerful tool for documentation .. Before when I wrote codes I was make a lot of different files for a different compiled codes ..

After that I can make with Git some Commits that can save the history of my files ..

And you can do branches to can develop away in a specific part of your code in the branch and test it and then merge it with the master code ..

and you can collorate with other people working with your codes and every one can commit to the files and you can get the difference between the codes ..


after all those abilities :) .. I was happy to go through all of this ..

After that I started to download gitlab as i think that the tool for using gitlab ..

after a while i understand that is the offline server from gitlab for local work ..

then i started thinking about using git .. I watched the Recitation and documetation ..

I didnt help me indeed so i decide to start my own search ..

so I found that great link ..

Before using GIT we need to understand some Definitions :

So after that I start with Git through the coming steps ..

First lets install git on my Ubuntu :

sudo apt-get install git


To check if there before any ssh codes or not :

ls -al ~/.ssh


This is the files you may find



There are two ways to communicate with your repository with HTTP or SSH I find that ssh is the famous one so I decided to use it .

As there are communication that going to happen between two devices so we need to set up the communication between them and make it authorized ..

So we need to generate a RSA code that the protocol that ssh use for Communicating

ssh-keygen -t rsa -b 4096 -C "your_email@example.com" 
        
Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]

Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]



This is Optional
the passphrase is like a key for the encryption .. and must be more than 4 letters .

so to add the code to our ssh protocol on our Ubuntu


ssh-add ~/.ssh/id_rsa


to Get a copy from the RSA code to add to my gitlab server side We need to install

sudo apt-get install xclip


to take a copy to your clipboard

xclip -sel clip < ~/.ssh/id_rsa.pub


Select Setting

Select SSH Settings

Paste RSA code

Add SSH



to clone and link the repository to your PC in open a new folder with the terminal and



Take this ssh Code and use it then ..from your gitlab website

Git clone repository ssh link



Now your are connected to your gitlab ..



After doing this you can watch the Recitation and it will be easy to understand ..


Now lets start with my Website ..

I have a background about web design .. As I worked with HTML , CSS , JS , JQ , Dreamweaver and Bootstrap ..

You can search on Tutorialspoints or W3C to learn more about all Programming languages overall .

But this was from long time and as I am a fan of Open Source so I choose to work with Brackets on Ubuntu .

Let's install Brackets on Ubuntu Using Terminal .

sudo add-apt-repository ppa:webupd8team/brackets
    sudo apt-get update 
    sudo apt-get install brackets

This is Brackets


Then I decided to start using a Template of Bootstarp which is a very good platform to start with ..

I searched and I find one called Modern Business which is very good templates to use ..


This is Modern Business Template




Those are the features of this template :


After playing with it a little bit :) and I started to Editing the templates to get



Then I started to understand to deal with Git again :)

First I started with to add all files to commit to be ready to push them so after I finish the first segment in my website ..

I started to add all files and folders ...

**Important Note : You must be in the directory of the git folder to make git can work ..

so I started to add all files

    git add assignment1.html
    git add images
    git add css


then I made a commit .. Commit critiria must have a comment with that refer what is this commit changes

git commit -m "This is my first commit" 


then I made my first push

git push


that is it :) now alive on your gitlab account
Finaly now this is my website :)