Upload Local project to Gitlab using git command

Source: Internet
Author: User
Tags using git

Recently need to upgrade the framework of an old project, in order not to affect the previous code, the old code is copied and modified to complete, now you need to upload the code to the company's Gitlab, the following steps:

1. First need to install the local need to install Git

2. Create a project on Gitlab, as shown below, click on the plus sign on the top right corner to create a project page, fill in the project name, select Project Access, private for authorized members to access.

3. Open the folder where the project source code is located, delete the Project IDE configuration information (this is to ensure that the IDE configuration information is not uploaded to Gitlab, you can also use the command line at the time of uploading the configuration file filter, the personal feel that visual removal easier).

4. Right mouse button to open git bash here:
<1> enter git config--global user.name "Your user name"
<2> enter git config--global user.email "your Mailbox"
<3> input git init
<4> Enter git remote add origin you just created the project connection
<5> Enter git Add.
<6> Enter Git commit
<7> input git config http.postbuffer 524288000 (special reminder: This line is to set the cache locally, some project files are large, you cannot upload using HTTP, you can set this command)
<8> input Git push-u origin master pushes the code to the Gitlab side

5. It's done! Refresh the page to see the right navigation bar more than the files options, click to see the project code online.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.