Git is a distributed revision control and source code management system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Git is a free software distributed under the terms of the GNU General Public License version 2.
We follow Centralized Git Workflow for our Collaboration Process. Learn more about it
is one of the best web platforms for hosting project source codes. Although GitLab is similar to GitHub in terms of functionality, it seems to be a better choice for teamwork than its famous counterpart and GitLab features may be different somewhat.
GitLab exists in two forms. The first one is SAAS - website with open registration, and the second one is an individual solution GitLab Community Edition. They both can be perfectly customized to any service.
GitLab benefits: reasons to use GitLab
Free service. Users can find an unlimited number of private repositories in GitLab. This service is completely free. Nevertheless, there is a notification that users will have to pay for storing files that exceed 10 Gb in their size.
Open source code repository. GitLab software is available under the license with an open source code.
Free hosting. There is a Community Edition - free source code repository for Debian, Ubuntu and CentOS computers. Enterprise Edition is a paid solution that adds proprietary features over Community Edition, improving integration with other online tools, server options management, workflow management as well as authentication and integration with authorization.
Bug tracking mechanism. GitLab has an effective integrated bug tracking mechanism. Users can create tasks, comment and close them.
Files editing in the web interface. Editing of files is possible directly in the web interface and you can do it without loading of the repository. So if you need to make small changes in an open source code websites, this way is that what you need.
Its drawbacks
The interface is rather slow - switching from one page to another takes some time.
Technical problems with repositories are quite frequent.
Copy the ssh key and give to devops team so that they will add you key to the gitlab
For Linux/Mac
Type the below commands:-
ssh-keygen
This will ask you a couple of question which everything can be passed by pressing enter
cat /root/.ssh/id_rsa.pub (linux)
cat /home/user/.ssh/id_rsa.pub (mac)
#Pushing Code to Remote Repository Via Command Line
For every project, Repo will be created by our DevOps team which will consist of the basic .gitignore file for the Wordpress sites.
**1)**Clone the repo and the directory would be the web servers and move everything under the cloned folder to the local webserver path including .git(folder), .gitignore(file).
3) Start developing and changing the codes. After that, do the below commands to push to the remote repo
git checkout development
Checkouts to the branch development which you will need to work. By default it will be master
git add .
Adds all changed files for committing to local
or
git add “filename”
Adds specific file for committing
git commit -m "Commit message"
Saves all file for committing with a headnote for easy identification at local level
git pull
Pulls all changes from the remote repository if any other developers are working on the same repo(avoiding merge conflicts)
git push
Pushes all changes to the remote repository
You can try these commands as well using the below git url which is creates for a test purpose. By default you are added to into teamengineering group and access is granted what you have to do is to clone the repo and start working.