Git log output log file

I am doing an assignment in a university course and I am using git as version control for this assignment. The game I have been working on is complete, however, along with the hand in I would like to submit the git log, effectively showing my progress during the time I have been working on it.

I have tried this:

  • Merge conflict Git
  • checking out a Git repository and switch to a specific branch using Maven SCM
  • Is it possible to force git submodules to be updated?
  • How to set diff options (--compaction-heuristic) in gitk
  • Export specific Git commits as patches
  • Git fetch hangs on git-upload-pack
  • git log --stat > log.log

    But it more or less just gives me very unreadable stuff. Can anyone help me with a command so that I can get a nice formatting on this?

  • In Git, how do I separate a branch from its upstream branch?
  • Git: How to reattach a branch to its trunk?
  • git diff gives no output
  • How can I config two different git repo with different credentials in one system?
  • How to use Git with “multiple (thousands) projects” in one-repo?
  • See if someone has any code left in the git repository
  • 3 Solutions collect form web for “Git log output log file”

    I would recommend using a different format than the default. My usual choice is summary with the graph, but one line summary alone usually does the trick.

    Option 1: One line summary w/ Graph

    git log --pretty=format:'%h : %s' --graph > log.log

    Results in:

    * 2d3acf9 : ignore errors from SIGCHLD on trap
    *   5e3ee11 : Merge branch 'master' of git://
    | * 420eac9 : Added a method for getting the current branch.
    * | 30e367c : timeout code and tests
    * | 5a09431 : add timeout protection to grit
    * | e1193f8 : support for heads with slashes in them
    * d6016bc : require time for xmlschema

    Option 2: One line summary w/o Graph

    git log --pretty=format:'%h was %an, %ar, message: %s' > log.log

    Results in:

    a6b444f was Scott Chacon, 5 days ago, message: dammit, this is the second time this has re
    49d77f7 was Scott Chacon, 8 days ago, message: modified index to create refs/heads if it i
    9764edd was Hans Engel, 11 days ago, message: Add diff-lcs dependency
    e1ba1e3 was Hans Engel, 11 days ago, message: Add dependency for Open4
    0f87b4d was Scott Chacon, 12 days ago, message: merged recent changes

    You can find more formatting options in the docs here

    Try this line

    git log > log.txt

    git log --oneline --decorate > log.txt
    Git Baby is a git and github fan, let's start git clone.