PART5 Branch
1.git Branch BUG/P1 -Create a new branch with the latest submission BUG/P1
2.git branch-a -View all branches, feature branches and remote branches, branches under current working directory marked as active branch with *,-represents merge Commit, + represents commit in one branch
3.git show-branch bug/p1 -View specific branch content
4.git Checkout Dev -set the dev branch as the active branch (that is, toggle the current branch)
5.git checkout-b bug/p2 -Switch to a new branch bug/p2
6.git branch-d bug/p1 -Removes an inactive branch or deleted branch content that already exists in another branch
7.git merge Bug/p1 -the branch that will be removed to the current branch can be safely removed
8.git reflog -Check Some branch switch and submit information
PART6 diff View content Differences
1.diff-u seven.html eight.html -View the contents of 2 files What's the difference?
2.git diff -show index differs from local directory
3.git diff head -shows the head most recent commit differs from the local directory
4.git diff--cached -show the head most recent commit and index differences
Index: The state after submission. HEAD: According to stage staging area
Diff vs. log command: diff to see changes in content, log to see changes in branch or file commit history.
5.git diff master~2 Master file1 -View a file file1 different places in the commit process
6.git diff--stat Master~2 Master -How many files were changed during the statistics submission process
7.git diff-s "Quux" master~1 - search for content quux changes in master~1 submission point
Part7 Merging
1.git Merge Alternate -merges the alternate branch onto the current branch
2.git Log--graph -Check Branch chart
--pretty=oneline -Show only one line
--abbrev-commit-Show only the simple code of the submission code
.
Git version control management Part III: branching, merging