Skip to content

Instantly share code, notes, and snippets.

@rsp9u
Created December 2, 2022 00:32
Show Gist options
  • Save rsp9u/0a66fb028990703f856aa292aa230c36 to your computer and use it in GitHub Desktop.
Save rsp9u/0a66fb028990703f856aa292aa230c36 to your computer and use it in GitHub Desktop.
  • from toが第一引数, 第二引数で書ける
  • デフォルトの対象ファイルがカレントからの再帰
  • 表示がgit diff, patch形式
  • デフォルトが上書き動作。オプションでdry-run(diffだけ出る)

example

$ ar from to -dry | tee x.patch
diff --git a/test.file b/test.file
index 0113cbc..94eae1f 100644
--- a/test.file
+++ b/test.file
@@ -1,3 +1,3 @@
 test text
-from foo bar
+to foo bar
 text end.
$ patch < x.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment