Exporting the change log from a commit on GitHub

I’ve got a collaborator that’s not GH-friendly and not likely to become so in the near future.

I’d like to show him line-by-line the changes I’ve made to a paper, and the commit comparison is the perfect way to do so.

  • How to fix “warning: ignoring ref with broken name” in git?
  • Include submodule commit messages with “git log”
  • The difference between a/ and a/* and a/** in .gitignore?
  • Using su/sudo when accessing remote Git repositories over SSH
  • Feature backporting in Git / Subversion
  • Should I generate new SSH key pair for every workstation or reuse a single one?
  • But they’ve no account and the repository is (and will remain) private.

    Is there any way to export the track changes log from GitHub to another format which could be sent to my collaborator more readily?

  • Does git clone work through NTLM proxies?
  • How do I force a subtree push to overwrite remote changes?
  • Shell: don't fail if git clone if folder already exists
  • Why is git not able to merge?
  • Why doesn't tortoisemerge work as my mergetool?
  • Restore Deleted Files from SourceTree or Git
  • 4 Solutions collect form web for “Exporting the change log from a commit on GitHub”

    So for the colored output you need some additional tool like aha – it’s ansi to html adapter. The final version might look like this.
    git log -p -n 2 --color=always | aha --black > output.html

    If you like the GitHub diff, you can view it on GitHub from your browser, use your browser’s “save page” to get an HTML file to send to your collaborator.

    To get an all-in-one diff from GitHub, append /compare to the URL of your repository (more details GitHub’s documentation). Then pick the view you like, and save it to HTML.

    You can add .patch to any valid /{org}/{repo}/compare/{revision range} link to get a log-like output with commit metadata and diffs, e.g. https://github.com/dahlbyk/posh-git/compare/5ed5c05…c39da78.patch. You can also add .patch to any single commit, e.g. https://github.com/dahlbyk/posh-git/commit/c39da78.patch.

    git diff --color > file.txt

    Open file in Sublime

    Git Baby is a git and github fan, let's start git clone.