Home  >  Article  >  Development Tools  >  How to upload projects to remote repository with Git

How to upload projects to remote repository with Git

藏色散人
藏色散人Original
2018-11-17 15:49:0616120browse

This article mainly introduces how Git uploads projects to remote warehouses.

In the previous article, I have introduced you how to create a remote Git repository. So after creating the remote warehouse, how do we upload our local projects to the remote warehouse?

Now we will introduce to you in detail how Git uploads projects to the remote repository.

First we select the project directory to be uploaded and right-click to open the Git command line.

How to upload projects to remote repository with Git

Then use the git init, git status, git add command to qiye the project All files are added to the staging area.

How to upload projects to remote repository with Git

Then submit the project to the Git warehouse through the git commit -m "Upload Enterprise Site Source Code" command, and note that the uploaded project is "Upload Enterprise Site source code".

How to upload projects to remote repository with Git

Then push our project online through the following two commands:

git remote add origin https://github.com/lge244(用户名)/ceshi.git(仓库名)
git push -u origin master

, that is, upload it to the remote warehouse.

How to upload projects to remote repository with Git

Finally, we log in to the remote warehouse (here is GitHub) to check whether the project has been uploaded successfully.

How to upload projects to remote repository with Git

As shown in the picture, we successfully uploaded the local project to the remote warehouse.

Recommended related articles:
1.How to create a remote Git repository
2.How to check the remote warehouse address in Git
3.git usage tutorial

This article is about Git how to upload projects to remote warehouse. It is also very simple and easy to understand. I hope Help those in need!

The above is the detailed content of How to upload projects to remote repository with Git. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn