git --date=xxxx 參數 【匯總】
git --date 常用參數
詳細使用說明: http://www.rzrgm.cn/wutou/p/17493337.html
其他的格式化占位符如下:
-- date=format:relative:'5 seconds ago'
-- date=format:relative:'5 minutes ago'
-- date=format:relative:'5 hours ago'
-- date=format:relative:'5 days ago'
-- date=format:relative:'3 weeks ago'
-- date=format:relative:'5 months ago'
-- date=format:relative:'1 year, 2 months ago'
-- date=format:relative:'1 year, 9 months ago'
-- date=format:relative:'20 years ago'
-- date=format:relative:now
-- date=format:relative:'6am yesterday'
-- date=format:relative:'6pm yesterday'
-- date=format:relative:'3:00'
-- date=format:relative:'15:00'
-- date=format:relative:'noon today'
-- date=format:relative:'noon yesterday'
-- date=format:relative:'last tuesday'
-- date=format:relative:'July 5th'
-- date=format:relative:'06/05/2009'
-- date=format:relative:'06.05.2009'
-- date=format:relative:'Jun 6, 5AM'
-- date=format:relative:'5AM Jun 6'
-- date=format:relative:'6AM, June 7, 2009'
| 選項(參數) | 中文說明 | 英文說明 |
|---|---|---|
| %a | 星期的縮寫 | Abbreviated weekday name |
| %A | 星期的全名 | Full weekday name |
| %b | 月份的縮寫 | Abbreviated month name |
| %B | 月份的全稱 | Full month name |
| %c | 適用于區域設置的日期和時間表示 | Date and time representation appropriate for locale |
| %d | 月中的天作為十進制數字(01 – 31) | Day of month as decimal number (01 – 31) |
| %H | 24小時制的小時(00 – 23) | Hour in 24-hour format (00 – 23) |
| %I | 12小時格式的小時(01 – 12) | Hour in 12-hour format (01 – 12) |
| %j | 一年中的天作為十進制數字(001 – 366) | Day of year as decimal number (001 – 366) |
| %m | 以十進制數字表示的月份(01 – 12) | Month as decimal number (01 – 12) |
| %M | 分鐘以十進制數字表示(00 – 59) | Minute as decimal number (00 – 59) |
| %p | 當前語言環境的"上午/下午",12小時制的指示器 | Current locale's A.M./P.M. indicator for 12-hour clock |
| %S | 秒作為十進制數字(00 – 59) | Second as decimal number (00 – 59) |
| %U | 一年中的周為十進制數字,周日為一周的第一天(00 – 53) | Week of year as decimal number, with Sunday as first day of week (00 – 53) |
| %w | 工作日為十進制數字(0 – 6;星期日為0) | Weekday as decimal number (0 – 6; Sunday is 0) |
| %W | 一年中的星期作為十進制數字,星期一作為星期的第一天(00 – 53) | Week of year as decimal number, with Monday as first day of week (00 – 53) |
| %x | 當前語言環境的日期表示 | Date representation for current locale |
| %X | 當前語言環境的時間表示 | Time representation for current locale |
| %y | 無世紀的年份,為十進制數字(00 – 99),也就是年份沒有前兩位 | |
| %Y | 帶世紀的年份,以十進制數表示 | |
| %z | %Z:時區名稱或時區縮寫,取決于注冊表設置; 如果時區未知,則沒有字符 | |
| %% | 表示百分號 |
http://www.rzrgm.cn/wutou/p/17622253.html (git 相關優秀【網站鏈接】)
浙公網安備 33010602011771號