Ubuntu 13.04.我想创建一个补丁,当我使用Netbeans或其他IDE但我在命令行中运行时没有问题:
git diff > 1.patch
Run Code Online (Sandbox Code Playgroud)
然后
cat 1.patch
Run Code Online (Sandbox Code Playgroud)
输出看起来像这样:
diff --git a/sites/all/modules/pet/pet.module b/sites/all/modules/pet/pet.module
index adfd273..1091090 100755
--- a/sites/all/modules/pet/pet.module
+++ b/sites/all/modules/pet/pet.module
@@ -71,7 +71,7 @@ function pet_access($op, $type = NULL, $account = NULL) {
/**
* Implements hook_permission().
*/
-function pet_permission() {
+function pet_permission() {
$permissions = array(
'administer previewable email templates' => array(
'title' => t('Administer previewable email templates'),
@@ -183,26 +183,26 @@ function pet_lookup_uid($mail) {
/**
* Send tokenized email to a list of recipients.
*
- * …Run Code Online (Sandbox Code Playgroud)