Search code examples
gitmessagegit-clone

Is there a way to pull just the commit messages from a remote repository?


I've got a script that basically analyzes the commit messages in a given remote repository.

My current implementation clones the remote repository, then iterates through each branch, running the "git whatchanged" command.

If all I need are the commit messages, is there any way I could go about doing so without having to clone the repository? I think this would speed the script up considerably.


Solution

  • I don't believe that git provides a mechanism for remotely iterating over a repository. If you keep a cached working directory locally, so that instead of re-cloning the entire you're simply applying updates, then you shouldn't have speed problems.

    If your remote repository happens to be on github, then they have a remote HTTP API for interacting with a repository that may make what you describe possible.