The easiest way to upload projects to github warehouse using git

The easiest way to upload projects to github warehouse using git

Introduction

Whenever I complete a project after my own hard work, I always have a sense of accomplishment in my heart, just like sharing with others or writing down my own experience, then open source github is definitely a good opportunity to exchange and learn. Below I will introduce how to use git to publish the project to github.

Preliminary preparation

First of all, you need a github account. For unregistered friends, please go to the shortcut channel↓
click to register.
After we have an account, we need to install the git tool. The same shortcut channel download address is as follows↓
click to download the git tool. After the
above operations are completed, we can enter Github On the homepage, click New repository to create a new repository for storing your code files. Just imagine it as a repository for storing things.
Insert picture description here

Fill in the corresponding information and click create to create a code warehouse

Repository name: Repository name
Description (optional): Repository description introduction
Public, Private: Repository permissions (publicly shared, private or designated partners)
Initialize this repository with a README: add a README.md
gitignore: no need for version management Warehouse type, corresponding to the generated file. gitignore
license: certificate type, corresponding to the generated file LICENSE

Insert picture description here
Insert picture description here
Copy the https://github.com/hzequn/text.git address for backup and
Insert picture description here
then go to the local operation. First, right-click your project. If you installed git successfully before, right-click two new options, namely Git Gui Here, Git Bash Here, here we choose Git Bash Here, enter the following interface, music is my project name

Insert picture description here

Next enter the following code (key step) to clone the warehouse on github to the local
use command

   $ git clone [email protected]:hzequn/vuemusic.git

After this step, there will be an extra folder under your local project folder. The folder name is the project name on your github. As shown in the figure, I have added a vuemusic folder. We put the folder under the local project folder All files (depending on files need not be uploaded to github), the rest are copied to the new folder and
Insert picture description here
then continue to enter the command cd vuemusic, enter the vuemusic folder
Insert picture description here
and enter the following codes in turn to complete other remaining operations

git add. (Note: Don’t forget the following. This operation is to add all the files under the vuemusic folder)
git commit -m "Submit Information" (Note: Replace the "Submit Information" with what you need, such as "first commit”)
git push -u origin master (Note: The purpose of this operation is to push the local warehouse to github, this step requires you to enter your account and password)

Insert picture description here
Insert picture description hereInsert picture description here
Now you can go to the music warehouse of github to view your code files

Insert picture description here

communicate with

If you have any questions, please contact me, we will exchange and learn together

WeChat: huang009516

Guess you like

Origin blog.csdn.net/Smell_rookie/article/details/91345717