9. Common git directives
- git help:git instruction help manual
- To view other directives: git help other instructions
- Git config:git configuration information (the. git/config file is modified)
- Configure user name: Git config "user.name" username (for tracking Change Records)
- Configure mailbox: Git config "user.email" mailbox (for communication between multi-person development)
- View configuration information: Git config–l
- Edit configuration information: Git config–e (edited with Vim: Wq is exiting the VIM editor)
- Set the alias of the directive: Git config alias. Alias original instruction Name
- To set an alias with a parameter directive: Git config alias. Alias "original directive name parameter"
- Apply this setting to the entire system: Git Config––gloabal
- Git init: Initializes an empty local repository and generates a. git directory for maintaining version information
- Initialize repository at current path: Git init
- Initializing warehouses in other paths: Git init warehouse path
- Git add: Save the workspace file to the suspend zone
- Save a file to a pending area: Git Add file name
- Save all files of the current path to the Suspend zone: Git Add. (Note that the last is a point.) )
- Git commit: Submits the file of the deferred zone to the current branch
- Commit a file to a branch: git commit-m "comment" file name
- Save all files from the current path to the branch: Git commit-m "Comments"
- Git Reset: Version fallback (recommended with ––hard parameter, Git supports unlimited regrets)
- Fallback to previous version: Git Reset––hard head^
- Fallback to the previous version: Git Reset––hard head^^
- Fallback to top N versions: Gitreset––hard head~n (n is an integer)
- Fallback to any version: Git reset––hard version number (version number with 7-bit)
- git reflog: View instruction usage record (ability to view all version numbers)
git rm: Delete files (commit after deleting, to sync to Repository
- git clone download remote repository to local
- Download remote repository to current path: URL of the git clone repository
- Download remote repository to a specific path: The URL of the Git clone repository stores the path to the repository
- Git pull: Download the latest information from the remote repository to the local repository
- git push: Pushes local repository information to the remote repository
Common git directives