$ git show <commit>但這樣沒辦法清楚列出到底是有哪些檔案有異動
只顯示異動的檔案,不顯示程式碼的話,請加上 --name-only 的參數
$ git show --name-only <commit>要更進一步的只顯示檔案,連 commit 的相關資料也不要顯示的話
$ git show --pretty="format:" --name-only <commit>以上,簡單的列出檔名
$ git show <commit>$ git show --name-only <commit>$ git show --pretty="format:" --name-only <commit><link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'/> <!-- add brushes here --> <script type='text/javascript'> SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.all(); </script>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushDiff.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'/>
<pre class="brush:js">
alert('hello syntax');
</pre>
用 <pre> tag時,要注意一些 html 的特殊字元要轉成 html 專用的編碼(ex. < 換成 <)<script type="syntaxhighlighter" class="brush:js"><![CDATA[
/**
* SyntaxHighlighter
*/
function foo()
{
if (counter <= 10)
return;
// it works!
}
]]></script>
vi ~/.local/share/applications/eclipse.desktop
[Desktop Entry] Encoding=UTF-8 Name=Eclipse Name[zh_TW]=Eclipse Comment=Eclipse IDE Exec=/home/user/eclipse/eclipse Icon=/home/user/eclipse/icon.xpm Terminal=false StartupNotify=true Type=Application Categories=Application;Development;
string number_format ( float $number [, int $decimals = 0 ] ) string number_format ( float $number , int $decimals = 0 , string $dec_point = '.' , string $thousands_sep = ',' )
name CHAR(5)
---------------------------------------
value actual_storage Space
---------------------------------------
'ex' 'ex ' 5 bytes
'exper' 'exper' 5 bytes
'expert' 'exper' 5 bytes
---------------------------------------
name VARCHAR(5)
---------------------------------------
value actual_storage Space
---------------------------------------
'ex' 'ex' 3 bytes
'expe' 'expe' 5 bytes
'expert' 'exper' 6 bytes
---------------------------------------