• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“git mailinfo” Command Examples

by admin

The “git-mailinfo” command is a utility used internally by Git’s “git-am” command to extract patch and authorship information from a single email message.

When you run the “git-mailinfo” command, you typically provide it with an email message as input. It reads the email message and extracts the patch information, including the diff content and authorship details.

The “git-mailinfo” command is designed to work with email messages that are formatted according to Git’s email patch format conventions. It parses the email headers, such as “From:”, “Subject:”, and “Date:”, as well as the body of the message to extract the necessary information for applying the patch.

The extracted patch information can then be used by other Git commands, such as “git-am”, to apply the patch to your repository.

git mailinfo Command Examples

1. Extract the patch and author data from an email message:

# git mailinfo [message|patch]

2. Extract but remove leading and trailing whitespace:

# git mailinfo -k [message|patch]

3. Remove everything from the body before a scissors line (e.g. “–>* –“) and retrieve the message or patch:

# git mailinfo --scissors [message|patch]

Filed Under: Linux

Some more articles you might also be interested in …

  1. diff: command not found
  2. duplicity: Creates incremental, compressed, encrypted and versioned backups
  3. Understanding the Network interface configuration file /etc/sysconfig/network-scripts/ifcfg-eth#
  4. logrotate: command not found
  5. genfstab Command Examples in Linux
  6. How to Start, Stop, Restart, Check Status IIS Service by Command Line
  7. sbatch Command Examples in Linux
  8. How the BASH Shell load its configuration files in Linux
  9. pacman: command not found
  10. Linux OS Service ‘nfslock’

You May Also Like

Primary Sidebar

Recent Posts

  • gml2gv Command Examples
  • glow Command Examples
  • glib-compile-resources Command Examples
  • glances Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright