gitee creates a local repository and connects to a remote repository

1. Install Git, create a remote library

  Right click on git bash in the file directory

2. git init

3. Enter personal information (code submitter)

git config --global user.name "xxxx" 

git config --global user.email [email protected] 

4 Add local files

5.git commit -m "initial commit"

Submit to local library

6. Connect the local library to the remote library

git remote add origin https://gitee.com/lbiao/li1024.git

7. Solve the error

git pull origin master --allow-unrelated-histories

git sometimes encounters this interface when pulling or merging branches. You can ignore it (steps 3 and 4 directly below), if you want to enter an explanation, you need:

    1. Press the keyboard letter i to enter the insert mode

    2. Modify the yellow merge information on the top line, you don't need to modify it

    3. Press "Esc" in the upper left corner of the keyboard

    4. Enter ":wq", pay attention to the colon+wq, and press Enter

8. Add -u to the remote library for the first time

git push -u origin master
 

9. View remote library


 

Guess you like

Origin blog.csdn.net/skylibiao/article/details/97375600