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.
Then use the git init, git status, git add command to qiye the project All files are added to the staging area.
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".
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.
Finally, we log in to the remote warehouse (here is GitHub) to check whether the project has been uploaded successfully.
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!