Git + code cloud usage process (Windows)

Time:2021-8-26

First, there is the code cloud account

https://gitee.com/

Git + code cloud usage process (Windows)

Download Git
Link:https://pan.baidu.com/s/1vZzK…
Extraction code: pxza

Tip: I’ve tried the latest version. It’s not as good as expected. I still use the stable version.

After downloading, the right mouse button will have GIT
Git + code cloud usage process (Windows)

First, create a warehouse in the code cloud
Git + code cloud usage process (Windows)

Fill in according to your needs
Git + code cloud usage process (Windows)

The GIT address will be created with the warehouse
Git + code cloud usage process (Windows)

Create a folder locally for git operation
Click git bash here
Git + code cloud usage process (Windows)

Same path
Git + code cloud usage process (Windows)
Create secret key
ssh-keygen -t rsa -C "[email protected]"
Just press enter all the time (email can be written freely)

Git + code cloud usage process (Windows)

View secret key
Git + code cloud usage process (Windows)

Write the secret key to the code cloud for management
Git + code cloud usage process (Windows)

Git + code cloud usage process (Windows)

Git + code cloud usage process (Windows)

Start creating name email and initialize Git
git config --global user.name "test"

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

git init

The. Git folder appears
Git + code cloud usage process (Windows)

Connect to test warehouse
git remote add origin [email protected]:miaomiaolove1/test.git

Now there is nothing in the local and warehouse. We can create files locally and upload them to the warehouse. Test it.

Create a new test.txt file locally
Git + code cloud usage process (Windows)

Upload to cache
git add -A

Annotation interpretation in cache
Git commit - M "git test"

Upload to warehouse
git push origin master

Git + code cloud usage process (Windows)
Git + code cloud usage process (Windows)

View the test file in the code cloud
Git + code cloud usage process (Windows)

Git + code cloud usage process (Windows)

The upload is complete. Pulling the warehouse is also a simple command

git pull origin master

When uploading, you can add conditions. Git add – a means that all files are uploaded to the cache (sometimes you only want to upload a few files, so add conditions according to your own needs)

Git add + filename. File type
Git add + filename. File type ,将某个文件加到缓存区
Git add + filename. File type ... 文件名.文件类型 ,将n个文件添加到缓存区
Git add XX folder / *. HTML, add all HTML files under XX folder to the cache.
Git add * HHH to add all modifications to files ending in HHH to the staging area
Git add Hello * to add the modifications of all files starting with hello to the staging area
Git add - u, submit modified and deleted files, excluding new files
Git add., submit new and modified files, excluding deleted files

Pulling someone else’s code just needs to get the GIT address!