First, there is the code cloud account
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
First, create a warehouse in the code cloud
Fill in according to your needs
The GIT address will be created with the warehouse
Create a folder locally for git operation
Click git bash here
Create secret key
ssh-keygen -t rsa -C "[email protected]"
Just press enter all the time (email can be written freely)
View secret key
Write the secret key to the code cloud for management
Start creating name email and initialize Git
git config --global user.name "test"
git config --global user.email "[email protected]"
The. Git folder appears
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
Upload to cache
git add -A
Annotation interpretation in cache
Git commit - M "git test"
Upload to warehouse
git push origin master
View the test file in the code cloud
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!