# Git Cofiguration on local system to use Gitlab ###### tags: `Devops` `gitlab` Git is a SCM (source code management). Gitlab is a web based repository that offer free open and private repositories, issue-following and wikis. It is a complete DevOps platform that allow teams to collaborate and build better software. ## Why to use gitlab: Gitlab enables collaboration among a team of developer with the gitlab Flow. Built in CI/CD funcationality. It can integrate with other tools. ## Download git from https://www.git-scm.com and install and open the git Bash(git terminal) ## Basic Git Command ```javascript= # git --version ``` ## Add the username and email ```javascript= # git config --global user.name "sohailanjum97" # git config --global user.email "sohail.eic06g@nctu.edu.tw" ``` ## check the Added the username ```javascript= # git config --global user.name # git config --global user.email ``` ![](https://i.imgur.com/7jYQI7U.png) ## To Check username, email and password: ```javascript= # git config --global --list ``` ![](https://i.imgur.com/Vwaa10y.png) ## Create a demo project/folder & add to git. ## Goto cmd or GitBash cd to the location of the folder and run follow. ![](https://i.imgur.com/sQwWOfu.png) ## Now init the git ```javascript= # git init ``` ![](https://i.imgur.com/SN0VjUU.png) ## When we initalize the git, the folder will created (The hidden items should be visible) ![](https://i.imgur.com/6QXAwLW.png) ## Show all the files and folders: (Create the file ReadMe.txt in the folder) ```javascript= # git status # gir commit -m "commit message" ``` ![](https://i.imgur.com/pmQOo6O.png) commit the file. ![](https://i.imgur.com/j1PmdbT.png) ReadMe.txt Green color means the file is ready to commit. ## Push the file to gitlab. ```javascript= # git add . # git push -u "https://gitlab.com/sohailanjum97/cicd-pipeline" master ``` ![](https://i.imgur.com/qLNkNk3.png) ![](https://i.imgur.com/BJdAO5d.png) ## Some Helpful Commands ```javascript= # git config --global --replace-all user.name "Your New Name" # git config --global --replace-all user.email "Your new email" # git config --global --unset user.name # git config --global --unset user.email # git config --global --edit ```