git common operations summary

1. How to view the current branch is created from which branch?

 git reflog --date = local current branch name

2. Review the current branch

git branch

3. Switch to a branch

git checkout branch name

4. View the contents of a commit

git show 83891ae4b67a6df374a7aae72f9a59b3bbfd7c30 --stat

Plus --stat parameter displays the file name changes

--Stat parameter displays without specific content changes

 

5. Create a local branch and switching to the newly created branch

git checkout -b new branch name

Guess you like

Origin www.cnblogs.com/similar/p/11428126.html