DEV Community

boopalan
boopalan

Posted on

git and gitlab

git

Why do we need git?

GIT is one of the Distributed version control systems.

Every company will have a lot of developers, they do many changes. Here the problem is that sharing the valid code to another developer, without git developers, focuses on many issues and the game changer comes from Linus Torvalds.

Throughout this, developers are able to move forward and backward the versions whenever needed, so they can easily fix bugs and solve them immediately , it increases productivity.

Multiple developers work on the same code base at any time.

GITLAB

  • Web based devops platform
  • Software development life cycle
  • - Analysis
  • - Plan
  • - Design
  • - Develop
  • - Test
  • - Deploy
  • CI/CD

Installing git on linux

sudo apt install git
Enter fullscreen mode Exit fullscreen mode

Clone a repo using git

Companies will have remote repositories, there is no guarantee all of them will use the same code hosting system but there will not be many differences between them.

To add the changes in the git

git add filename

Or 

git add .
Enter fullscreen mode Exit fullscreen mode

To check the changes in git

git status

To commit the changes in git

git commit -m “message”
Enter fullscreen mode Exit fullscreen mode

To push the changes in the gitlap

git push
Enter fullscreen mode Exit fullscreen mode

It will ask the credentials

To skip credentials

git rest remote-url origin https://<username>:<token>/gitlab.com/<repo>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)