Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サイトに Git のバージョンを表示したい。
サイトの技術者ではないユーザーが問題を提起するときに簡単に参照できるように、Git からセマンティック バージョン番号を表示するにはどうすればよいですか?
簡単な方法:
$rev = exec('git rev-parse --short HEAD');
$rev = exec('git rev-parse HEAD');