GitLab is a place where we can manage our git repositories. It can be considered as an alternate of GitHub and Bitbucket. Currently, Gitlab is offering four versions namely Core, Starter, Premium, and Ultimate.
- Core: For small and personal projects. Free of cost.
- Starter: For small and personal projects who need professional support. It is paid.
- Premium: For teams who need high availability, high performance, and/or 24/7 support.
- Ultimate: For large enterprises who want to align strategy and execution with security and compliance.
In this article, we will use Core version and learn how to setup GitLab Repository on Windows System in order to manage your codes and projects. So let’s start:
1. Create Account on GitLab.
Username or Email: firstname.lastname@example.org Password: **********
2. Create New Project, named as “Test”.
3. Download Git for Windows and install it.
4. Open Cmd and run following command to check the successful installation of Git.
5. Set username and email
git config --global user.name ABC
git config --global user.email “email@example.com”
Note: Username and email should be same as your Gitlab Account.
6. Check for Success:
git config --global --list
7. Go to Directory from where you want to upload project. Right Click there and open “Git Bash Here”.
8. Initialize Git here.
9. Add changes from all tracked and untracked files.
git add -A
10. To add a new remote, use Project URL from GitLab:
git remote add origin https://gitlab.com/abc/Test.git
11. Commit changes with message:
git commit -m "Your_Message"
12. Now push project on GitLab
git push origin master
Pull GitLab Repository
13. Go to the master branch to pull the latest changes from there
git checkout master
14. Download the latest changes in the project
git pull REMOTE NAME-OF-BRANCH -u
(REMOTE: origin) (NAME-OF-BRANCH: could be “master” or an existing branch)
Create New Branch
15. Create a branch. Spaces won’t be recognized, so you will need to use a hyphen or underscore.
git checkout -b NAME-OF-BRANCH
16. Work on a branch that has already been created
git checkout NAME-OF-BRANCH
17. View the changes you’ve made
18. Add changes to commit. You’ll see your changes in red when you type “git status”.
git add CHANGES IN RED
git commit -m "DESCRIBE THE INTENTION OF THE COMMIT"
19. Send changes to gitlab.com
git push REMOTE NAME-OF-BRANCH
- Bitbucket vs GitHub vs GitLab
- Git- Setting up a Repository
- Creating Repository in GitHub
- How to setup firewall in Linux?
- AWS EC2 Instance Setup with Apache Server
- How to setup cron jobs in Ubuntu
- How to setup Proxychains in Linux without any Errors?
- How to Setup Burp Suite for Bug Bounty or Web Application Penetration Testing?
- How to use Emojis in Windows 10?
- Zip files in Windows
- IDE for Python programming on Windows
- How to run Linux Commands on Windows 10?
- Windows 10 –Feel the Difference
- Useful CMD commands for daily use in Windows OS
- Microsoft Windows (10) Vs macOS (Mojave)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.