Wednesday, 8 April 2015

git study

git rev-list HEAD --count
display the number of commits 


put version into git repo




 git log --oneline   get a list of commited result.



git log --oneline --graph --decorate --all
see the whole tree of the current code.
see  [http://stackoverflow.com/questions/5361019/viewing-full-version-tree-in-git]


echo "#define GIT_REF \"`git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 31-40`\"" >
put one line in sutra to demonstrate the version number
[http://stackoverflow.com/questions/2696975/how-do-i-add-revision-and-build-date-to-source]


git checkout 5b01926d4bdc850de431ae3cc1d6098168288826
go to another version. do not worry about the possible update you make, because if you have modification, you checkout will be aborted.


git clean -f examples/  delete all the redundant files

No comments:

Post a Comment