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?

  • configure git repository in jenkins
  • How to cherry pick only changes for only one file, not the whole commit
  • What does this git log mean?
  • RubyMine doesn't recognize gem from git repository
  • Is there implementation of Git in pure Python?
  • How to create a git repository on my server from the github server?
  • Eclipse - External JARs and git
  • Change Git Repository Of Existing Xcode Project
  • git config: “remote.origin.push” vs “push.default”
  • How I can restore missed commits?
  • What will happen if I delete a branch on my git repo and someone try to push a commit to it?
  • git update-index --assume-unchanged on directory
  • 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.