I am making a git repository viewer for web, for which I need to get the name of the repository author.
By author I mean the person who created the repository.
I have searched and found this command:
git show --format="%aN <%aE>"
Which gives me as a result:
Juan Pinz<C3><B3>n <[email protected]>
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..291468e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# GitCli^M
+Simple git viewer
\ No newline at end of file
Is there a way to get only the author name of the repository?
I've gone through the official documentation and achieved this using:
Where
--format
it allows me to define the format and the information of the repository that I want to show, in this case I use%an
that means author name, and with--no-patch
I eliminate the diff outputResulting in:
Source: https://git-scm.com/docs/git-show