Git: upload local files to remote warehouse

The idea is to clone the entire file on git, then manually pull your own files into the specified folder, and then upload them.


Steps

1. Create a local git repository folder "text"

2. Enter the newly created git warehouse folder and
  execute:
  git init

3. Copy the address of the remote git warehouse https://github.com/***/***.git
  pull the remote git warehouse file to the local git warehouse file for
  execution:
  git clone https://github.com/***/***.git

4. Enter the pulled git warehouse folder to
  execute:
  git checkout <分支名>
  branch name :
   master (main branch)
   develop (secondary branch)
   ********* (other branches)

5. Drag the files to be uploaded locally to the git warehouse folder for
  execution:
  git add .
  Note: there is a space and a dot after add

6. Add submission comment
  execution:
  git commit -m"提交的注释"

7. Finally upload the code to the remote warehouse for
  execution:
  git push

Guess you like

Origin blog.csdn.net/MQ0522/article/details/110117132
Recommended