DEV Community

Cover image for Day 10 of My Data Analytics Journey!
Ramya .C
Ramya .C

Posted on

Day 10 of My Data Analytics Journey!

Today I explored GitLab – an amazing tool for version control and collaboration.

Step 1: Clone a GitLab repository
git clone <repo-url>
It brings the entire project to my local system.

Step 2: Switch to the main or master branch
git checkout main or git checkout master
This is the main working branch in most projects.

Step 3: Make changes to files locally
I edited some files to simulate real project changes.

Step 4: Add & commit changes

git add .
git commit -m "Updated project files"
Enter fullscreen mode Exit fullscreen mode

Adding means staging files, commit saves them with a message.

Step 5: Push code to GitLab
git push origin main
This sends my committed code to the remote GitLab repo.

Step 6: Create & publish a project on GitLab
Used GitLab UI to create a new project
Linked my local folder using git remote add origin

Key Commands Practiced in Terminal:

git clone

git checkout

git add

git commit

git push

Top comments (0)