View branch
git branch
or
git branch -v
A) create a branch
git branch mystudygit1.0
B) switch branches
git checkout mystudygit1.0
C) delete branch
git branch -d mystudygit1.0 //If the branch is not merged into the main branch, an error will be reported
or
git branch -D mystudygit1.0 //Force delete
D) branch merge
For example, if you want to merge the developing branch (develop) into the stable branch (master),
The master branch to switch to first: git checkout master.
Then perform the merge operation: git merge develop.
If there is a conflict, you will be prompted to call git status to view the conflicting files.
Resolve the conflict, then call git add or git rm to stage the resolved file.
After all conflicts are resolved, git commit commits the changes.
For example: merge commit acc2f69 into current branch
git merge acc2f69
E) Merge
How does git clone a branch in a remote github ?
git clone -b release_branch https://github.com/jetty/