Git local push remote step and middle met pit

Source: Internet
Author: User

First step: Find the location where you want to upload the project

Then right-click on Git bash

Enter GIT init initialization

The. git file appears in the warehouse

There's a pit here. Git default hide no changes show all files. git files do not move!!!

Enter git Add. (Add a point can be uploaded all at once)//can not only with a single file, but also with the wildcard, you can follow the directory. At a point, all the untraceable files in the current directory are all Add.

You can enter GIT status//To see if the file is added to staging area

Enter git commit-m "upload file"//Add comment submit to Warehouse

Enter git remote add Origin Https://github.com/Kevinl7/xxxxx.git Association to the remote repository

Enter Git push-u origin master//upload to remote repository fill in the account name and enter the password

OK, you can go to GitHub to see your uploaded files.

There are pits here!!!

If the warehouse has nothing to see if its own warehouse is empty.

Git is not able to manage empty folders, there must be files in the folder to add!!!!!

Create a file in your own warehouse ...

Notice the creation of the pit came again ...

After you create a file you need to pull to the local in the execution of push or fail!!!

Enter git pull--rebase Origin master

In the execution Push-u Origin master

This is OK!!!

Git local push remote step and middle met pit

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.