Git (use of branches on osChina), gitoschina
There are two ways to create an osChina Branch:
1. directly create on osChina
Pull is required. Otherwise, check that the git status does not include the change branch;
Git pull <git address/git abbreviation> <branch name>
2. Use the git command to create a branch
Git branch <branch name>
Push is required. Otherwise, the branch of osChina does not contain the changed branch;
Git push <git address/git abbreviation> <branch name>
View All branches under git
Git log -- oneline -- decorate
-- Online is not a must, but the data display will be much simpler after it is added.
"3be65" indicates a check value; "HEAD" indicates a special pointer pointing to the current branch;
Switch Branch
Git checkout <branch name>
After the branch is switched, the local project file is directly affected.
When pushing changes to a branch, you must remember commit-> pull-> push.
Git branch Overview