In this article, I am going to show, how you can push your all code into a code repository.
Create a project in GitLab
- Goto https://gitlab.com/ Create your account follow this steps,
- In your dashboard, click the green New project button or use the plus icon in the navigation bar. This opens the New project page
- On the New project page, we choose Create a blank project.
Blank projects:
- To create a new blank project on the New project page:
- On the Blank project tab, provide the following information:
- The name of your project in the Project name field. You can’t use special characters, but you can use spaces, hyphens, underscores or even emoji. When adding the name, the Project slug will auto populate. The slug is what the GitLab instance will use as the URL path to the project. If you want a different slug, input the project name first, then change the slug after.
- The path to your project in the Project slug field. This is the URL path for your project that the GitLab instance will use. If the Project name is blank, it will auto populate when you fill in the Project slug.
- The Project description (optional) field enables you to enter a description for your project’s dashboard, which will help others understand what your project is about. Though it’s not required, it’s a good idea to fill this in.
- Changing the Visibility Level modifies the project’s viewing and access rights for users.
- Selecting the Initialize repository with a README option creates a README file so that the Git repository is initialized, has a default branch, and can be cloned.
- Click Create project.
Step 1: Download git from https://git-scm.com/ and install git
Step 2: Check git is installed on your system
git --version
Step 3: Run following git commands
git config --global user.name “xxxxx”
git config --global user.name
git config --global user.email “xxxxx”
git config --global user.email
git config --global --list
Step 4: Create a demo project/folder & add to git
Step 5: Goto cmd OR terminal OR git bash
CD to the location of the folder and run following commands
git init
git status
git add .
git commit -m “msg” (commit your changes)
git push -u “url” master (push your change into GitLab)
Step 6: Check project (files) added on GitLab
No comments:
Post a Comment