轉自:http://blog.csdn.net/wed110/article/details/52179386
1.repo 回退到具體某一天的提交
repo forall -c 'ID=`Git log --before="2016-06-28 23:00" --after="2010-01-01" -1 --pretty=format:"%H"`;git reset --hard $ID'
2. repo 回退當前所有的修改,和服務器上代碼拉下來一樣
repo forall -c "git clean -df" && repo forall -c "git checkout ." && repo sync -j8
3. git 回退到某一條的提交
git reset --hard commitID
4. git revert 是生成一個新的提交來撤銷某次提交,此次提交之前的commit都會被保留
git revert commitID
5.查找某條信息
find -name '*'|xargs grep " grep "MODEM_OTP_SUPPORT" --color
6.查找並且顯示大小
find ./ -name "*.so" -exec ls -l {} \;
find -name '*odex*' -o -name '*odex*' |xargs du sh {}