I have a git repository, and its log history is shown below.
../mypapers/Doc_thesis$ git log
commit 5bbb3681e1630a423f143a2e97350f463669c214
Author: ShijieXu <shijiexu@yahoo.com>
Date: Wed Nov 16 14:10:16 2016 -0400
Revist GraphJIT
commit e8ccd771208c5d328936422d60dcae2d3850e3a1
Author: ShijieXu <shijiexu@yahoo.com>
Date: Tue Nov 8 15:04:22 2016 -0400
version
commit c8f2313c324cd0a07e67eb07f060d319bb4faa69
Author: ShijieXu <shijiexu@yahoo.com>
Date: Wed Apr 13 11:03:53 2016 -0300
another chapter
My questions are:
- How to check a file's current version? For example, I normally switch file version using
git checkout c8f2313c324cd0a07e67eb07f060d319bb4faa69
, so after several revision changes, is there any way to check out which revision the current file is? How to handle some deleted files when changing the commit number. For example, The commit
e8ccd771208c5d328936422d60dcae2d3850e3a1
contains deleting a number of files. After checking out to this commit and then back to the5bbb3681e1630a423f143a2e97350f463669c214
,git status
will show up some new files, which have all been removed.git status On branch final_thesis Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: #introduction.tex# new file: UNBThesis2-1101.tex new file: UNBThesis2_0430.pdf new file: UNBThesis2_bak.tex
Thanks