Git Vs Gitlab

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Gitlab

Teams of developers and open-source software maintainers typically manage their projects through
Git, a distributed version control system that supports collaboration.

Git Vs Gitlab
Git is a tool which can be used to control different operations by the team members on the folders
and files. It can be used for all actions and commands to be performed to track changes and
supporting non leniar development, allowing multiple members to modify, add,delete,create files
and folders.
It is a software to be installed by downloading from https://git-scm.com/.

Gitlab is a platform or repository to maintain and store the project folders and files. The team
members can connect to this server and access the files and forlders as per thier permissions given.

Installation of Git

step1-open the link https://git-scm.com/ and download the latest version of git.

Windows OS

If you are using windows os then click on the download button to get the
latest git version as below.

The

websit automatically detects the os. Download the exe fiile and install by clicking next .

To find whether git has installed or not use the command


>git –version

Linux OS
if you are using linux/Ubuntu following are the steps for installation

$ sudo apt install git

$ git –version

Output
git version 2.40.1

if you already have git on your system then update it

$ sudo apt update

Setting up Git

After you are satisfied with your Git version, you should configure Git so that the generated commit
messages you make will contain your correct information and support you as you build your
software project.
Configuration can be achieved by using the git config command. Specifically, we need to provide our
name and email address because Git embeds this information into each commit we do. We can go
ahead and add this information by typing:

git config --global user.name "Your Name"

git config --global user.email "youremail@domain.com"

git config –list

How to Upload Project to the Git

Login

1) Sign up and create Gitlab acccount using the link https://gitlab.com/users/sign_in . You can
either create by entering sumtom credential details or through google authentication.
2)

After logging in you will create repository by clicking on New Project/create blank project on your
gitlab account as below.

3)
Click
on
the

repository wisetest. You will be redirected to the following


4) In the above screenshot copy the URL/link of the repository under Clone with HTTPS for future
use. ( for ex-https://gitlab.com/20257705514/ )

5) Now open command prompt using open in terminal by opening project folder as below.

6) Run the following command to configure


git config --global user.name "Your Name"

git config --global user.email "youremail@domain.com"

7) $ git init

This creates a hidden .git directory in your project folder,, which the git software recognizes and
uses to store all the metadata and version history for the project.

8) $ git clone https://gitlab.com/20257705514/


This will clone with the project folder “pythonProject” created on gitlab and create a folder inside
your local system.

---Project
|----pythonProject

9) Now you can out your files and docs into pythonProject folder so that they can be uploaded to
gitlab account.
---Project
|----pythonProject
|-----pythonassignment.py
10) Open another terminal as in step 5 after opening pythonProject folder and run the following
commands in order as below.

11) $ git init – to initialize and recognize the folder as git repository.

12)$ git config –global user.email “gitlab login email ”


13) $ git status – this will show any new files to be uploaded in red color
14) $ git add .
15) $ git commit -m “message”
16) $ git push origin main

for all the commands given above, check the output in the screen shot below

when you git push the files it will prompt you to enter the username and password of your gitlab
account.

17) Now you can find your file uploaded on the gitlab account. You are required to make your
repository visible to wise account. For accomplishing this task you need to add wise as member to
your project/repository in gitlab. Go to project information ---> members as below.

18) Click on invite members in blue button. On the next screen as below.
Enter wise3 in the filrst textbox on the screen as below.

Select first option as displayed “Talent sprint”. Select role as “Maintainer ” from dropdown.

Click on invite. Now the repository pythonProject will be visible aswell to the wise account on
gitlab.

You might also like