The first step: Install Git software method: Baidu git click Download, and then double-click Install, always click Next. Step Two: Set the user name and mailbox method: Right-click on the desktop, choose Git Bash, and then run the command git config--global user.name "username" git config--global user.email " Email-address "Replace username with your username on Gitlab email-address Replace the registered email account with the third step: Get the Gitlab ssh method: Go to Gitlab home, Click on the bottom right corner of the second icon (is a villain) and then select the left side of the SSH keys menu click the Add SSH Key button click on the SSH help page link, there will be generated SSH key information to copy the first command, the same way to open git Bash, Executes the first command
Ssh-keygen " email-address "
The situation will occur:
The above prompts the generated SSH key to store the address, open the corresponding folder, there are the following three files
Open id_rsa.pub, copy the contents of the file, to add an SSH key in the key text box, you should automatically generate the title. SSH Key added successfully.
Fourth Step: Add Project
Click on your avatar to return to your homepage, in the upper right corner of the page there are the new project button
Click the button, enter your own project name, here in Hibernatedemo for example, you can also add a project description, and the project is private or public, private can add items to the user and permissions, which are set to private.
Once setup is complete, click the Create Project button and the project is created successfully.
Fifth step: Add project Files
Enter the root directory of the project in local explorer
In the root directory, click the right mouse button, choose Git Init here, the folder will appear in the. git folder, if not, set the folder Options to show hidden folders.
Then click the right mouse button, select the Git Gui, the following interface appears:
Click Cache changes, then click Submit, project files have been submitted to the GIT repository, but not uploaded to our gitlib server.
Select Remote--upload, the following interface appears:
In the Arbitrary location field, enter the address of our project, above the page where we created the successful project:
Copy and change the address to the arbitrary locatio column and click Upload.
After the upload is successful, our project is already on the server.
After each project change, repeat the project submission process, first cache, do not commit, upload directly, will be backed up to the Gitlib server. You can also find the previous version, you can restore the old version
Getting Started with Gitlab