Add an option to update the local repo

Add the option "-u" to update the local repo (git fetch) before gatting
information.

Also add an alternative way to get the commit ID.

Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>