git am should ignore something in commit message startswith “”?

I have a commit with message like [Hello World]Something.
Then I use git format-patch HEAD~1 to crate a patch.
Content of patch like this:

Subject: [PATCH 1/7] [Hello World] Something.

But after I use git am to apply patch,the commit message became “Something” only,[Hello World] seems lost.
How can I keep content in “[]” after apply patch?

  • Looking for easy to setup version control for website development
  • git-svn clone failure, perl.exe failed assertion
  • Can I make git create two files for merging (mine & theirs) instead of one
  • Find out source of installed gem
  • Going back to specific commit
  • git: get the list of files that have been modified along one specific file
  • Difftool for binary files in git
  • Using git-remote-hg on windows
  • Why does git-status show an updated binary file with a new name as a rename?
  • Multiple Netbeans projects in 1 Git repository
  • What systems are you using with git
  • how to know a total commit of a collaborator
  • One Solution collect form web for “git am should ignore something in commit message startswith “”?”

    git am -k would prevent it from removing content in [] brackets at the beginning of the subject, but that would also keep the [PATCH 1/7] portion. git format-patch also has a -k option which would prevent it from adding that type of content allowing the subject to be preserved through a git format-patch | git am cycle.

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