how to ammend the git commit message through python?

I have used subprocess.check_output to get the result of git command but Cant think of a way how to update the commit message that we do with git command
git commit -amend ?

  • How to interpret this Emacs magit help screen?
  • Managing Multiple Versions of Code in Git
  • How to make Eclipse recognise a Git source tree that was a Bazaar source tree
  • Contributing to an existing pull request
  • Where are the Git man pages online?
  • Can I somehow alias R in Android?
  • Issue with “git pull”
  • How to ignore files which are in repository?
  • Get latest from Git branch
  • Visual studio 2012 git ssh
  • How to restrict code checkout only to a certain user/machine combination
  • GIT with assembla repository type personal or public?
  • One Solution collect form web for “how to ammend the git commit message through python?”

    You can pass a commit message to git commit --amend. For example:

    git commit --amend -m "This is a new commit message"
    

    Or you can read a new commit message from a file:

    git commit --amend -F commitmsg
    

    Or you can read it from stdin:

    echo "This is a new commit message" | git commit --amend -F-
    

    You could use any one of these mechanisms through Python.

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