Get the App
SLTechnology News&Howtos  ›  Servers  › 

Github project upload steps

Shulou Source: shulou.com Published: 2022-06-02 10:31:18 11月12日 Update

First, download the git client http://git-scm.com/download/

Second, create git account information

1 git config-global user.name "shulonghu"

Git config-global user.email

3. Set up SSH Key for Github account

First check whether the key cd ~ / .ssh has been generated. Ls, if there are three files, the key has been generated, and id_rsa.pub is the public key.

If it is not generated, generate it through $ssh-keygen-t rsa-C "6215048wjl@163.com".

1) confirm the path. Just press enter to save the default path.

2) enter directly. Here we do not log in with a password, which is too troublesome to use.

3) Direct enter key

4 the order of common commands submitted by git to the warehouse

The instructions for git to create a warehouse are as follows

Git init / / turn this directory into a warehouse that git can manage

Git add. / / add files to the warehouse

Git commit-m "Notes" / / take the files to the warehouse

Git remote add origin git@github.com:DragonTigerShu/ File name / / Associated remote Repository

Git push-u origin master / / put all the content libraries of the local library

Log in to the github account

1 Click new repository to create this library. Add Rrpository name name add description information Description

Click to create Create repository to display the version library home page.

It is very important to obtain the address of the remote version library after 2.

3 and then open Gitbash

Change to the helloworld project directory and clone the remote version library locally.

Sometimes the transmission times out. Just try it a few more times.

After 4, ls-al looks at the project directory and deletes the name of the file created under the directory

5 git push origin mster synchronous submission of this is very important

* Note that if the submission is not submitted, an error occurs.

Solution

1 first execute under the current directory

Git push-u origin master

2 if it is still not solved, there must be a README.md file in the directory and then in the form of merge

Execute git pull-rebase origin master

3 execute a git push-u origin master again to complete the upload to github

Just check the account number and see it.

Tags: Warehouse file directory generation name version account important information enter key password key project path login home page public key content again command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information Huawei MySQL Linux