First, the Chinese file name can not be displayed correctly, but the real octal character encoding, how to solve?
Ii.. What is a. git directory?
Iv. Order
Config command
Display the workspace root directory: Git rev-parse--show-toplevel
Edit the Cofig file for your workspace: Git config–e
Edit the global config file: git config–e–global
Edit a value for config file: git config x.y.z others
Delete the value of the global config file: git config--unset–global user.name
Log command:
git log (show simple log)
git log--pretty=fuller (show full log)
git commit--amend--allow-empty--reset-author (Modify the last commit log and author information)
git log--stat (you can see the file change statistics for each commit in the log)
git log--pretty=oneline (view simple log information)
git log--graph--oneline (view shorter logs)
git log--pretty=raw--graph a2ee32 (log tracking)
Difference command
git diff (Compare Workspace vs. staging area differences)
git diff head (workspace and head comparison)
Git diff--cached (staging area and head comparison)
Status command
Git status–s (see short message)
Git status–s–b (view saved work progress data)
Undo Command
git checkout--xp.txt (undo workspace specified file content modification, new file cannot be undone)
Git checkout. (Undo the content modification of all files in the workspace),
git Reset--hard head^ (undo changes to this commit,-hard use caution, will damage the workspace changes)
git reflog Show Master | Head–5 (if hard undo regrets, you can view the revoked log through this command, if you need to open config: git config core.logallrefupdates)
git reset--hard [email protected]{2} (restore Hardreset undo)
git reset (Restore from staging area to workspace)
git reset Head (IBID.)
git reset head^ (Restore previous pointer to workspace)
Directory tree Browse for workspace, staging area, repository
Git ls-tree–l head (view current commit in repository) pointing to the directory tree
Git ls-files–s (view staging area) pointing to the directory tree
Submit command:
Git commit–m "Updage" (Commit staging area all modifications to repository)
Git commit–a (submit to Repository, including workspace content, this command is NOT recommended!!!) )
Save Work progress
Git stash (Save work area and staging area work progress)
git stash list (view shelved work progress)
Git stash pop (restores the latest saved work progress)
git stash drop (delete one work progress)
Git stash Clear (Clear all work progress)
Branch
Git branch (view branch)
git branch–v (View branch with pointer address)
git checkout [master] (toggle Branch)
git checkout–b [xxx] (new branch)
(TAG) tag
Git tag–m "v1" v1 (add tag)
ls. git/refs/tags (See all tags)
deleting files
RM *.txt (delete file, but only in workspace)
git rm *.txt (delete files and commit changes to staging area)
Moving files
git mv log. txt log.txt (renaming the log. txt to Log.txt)
Ignore file
Touch. Gitignore (Add ignore file, shared)