forked from iicd/git-learner
		
	add 2.5 notes
This commit is contained in:
		
							
								
								
									
										16
									
								
								notes/2.5_git_checkout.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								notes/2.5_git_checkout.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  | ## 2.5 Git Checkout | ||||||
|  |  | ||||||
|  | ### 2.5.1 HEAD reset = checkout | ||||||
|  |  | ||||||
|  | 查看当前的branch | ||||||
|  | ```bash | ||||||
|  | git branch -v | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  | checkout到commit的父亲,使得head指针指向父提交,而不是branch | ||||||
|  | ```bash | ||||||
|  | git checkout <commit>^ | ||||||
|  | ``` | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user