I know I can use
git log
to query logs at local.
But I want to execute a linux command at git server'repository to query logs.
Is there such a similar command I can use at git server?
I know I can use
git log
to query logs at local.
But I want to execute a linux command at git server'repository to query logs.
Is there such a similar command I can use at git server?
If you are allowed to log in to the server by ssh, you can use ssh
to run git log
.
Suppose the repository in the server is at /path/to/foo.git
.
ssh ${user}@${server_ip} git --git-dir=/path/to/foo.git log ${branch}
You need to first update the remote-tracking branches and then check the log:
git fetch && git log origin/<branch> --name-status --pretty=...
Read more about git-fetch
and git-log
to understand how they work.