git command line drill

Shows hidden files displayed document 
Defaults Write com.apple.finder AppleShowAllFiles - BOOL to true 
the GIT exercise 
. ⼀ a person exercises Face (⾏ command line drill) 1 . Gets into the working ⺫ into the destination time ⼯ directory, a code repository initialization ⼀ 
the init git 2 . git repository to the configuration ⼀ Using a user and mailbox 
git config the user.name "Why" 
git config user.email "Why @ 163 .com"
 . 3 . main.m initialization code Touch 
git the Add main.m . 4 . Check the file status of files (git status) 
untracked files (in red color file file): file file newly added or newly modified files files ⼯ workspace, not added to the suspension area. 
changes to bE committed (to green color): code ⼯ workspace has been added to the suspension zone, may be submitted to the code repository in the 
5 to modify the file. 
Open main.m 
6 to add all of the files ⼯ workspace files to postpone area git add..
 7 . to git from the command aliases
config alias.st git "Status"
config alias.ci git "the commit - m"
 8 version history log git. 
git git reflog version: a6a87425f2939e874b57591c53d597a73f0a52c7 git version number is generated by ⽣ sha1 encryption algorithms ⼀ a 40-bit hash value: 
9 version rollback. 
git the HEAD reset -hard 
Git reset -hard the HEAD ^ 
Git reset -hard the HEAD ^^ 
Git reset -hard the HEAD ~ 100 Git version number before reset -hard 7
 10 .-global for use with (global configuration use username and password, or other locations can not be arranged side) 
         
IT config - Global the user.name "Why" 
Git config - Global user.email "Why @ 163 .com"

 

Guess you like

Origin www.cnblogs.com/dashengios/p/10971985.html