MindMap Gallery Github uses error-prone point analysis
Analysis of common questions for git beginners. GitHub is a hosting platform for open source and private software projects. It only supports Git as the only version library format for hosting.
Edited at 2024-03-08 14:48:24This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
github
Local file upload to github
1. local
1. initialization
git init
2. Add to staging area
git add .
3. Submit to local warehouse
git commit -m "sessage"
4. View local branch
git branch
2. Cloud
Create a warehouse on github or gitee
Empty warehouse
non-empty warehouse
public/private
license
These two are also equivalent to one submission
3. Set the address of the remote warehouse locally
git remote add alias address
Aliases usually use origin, and I also use origin here.
The address must use an SSH address.
Reason: The public key and secret key set for password-free login are SSH, and both sides must be consistent.
For example: git remote add origin xxxxx
Modify remote warehouse address
git remote set-url alias new address
View remote branch
git remote -v
4. Modify local branch
Why?
Because the local default branch name is master, and the remote default branch is main
operate
git branch -m main (change the local default master branch of the current project to main)
Or git config --global init.defaultBranch main (the default branch of all local projects is changed to main)
5. Pull remote branch
git pull origin main
An error is reported because if the readme file and license are set on the remote branch, it is equivalent to a commit; both the local commit and the remote commit are the latest
git pull --rebase origin main
Merge branches, merge remote to local
refer to
https://www.runoob.com/git/git-basic-operations.html