Home > Development Tools > git > body text

How to upload projects to remote repository with Git

藏色散人
Release: 2019-11-23 14:52:12
Original
16060 people have browsed it

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
Copy after login

, 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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!