I'm trying to see what edits I've made since an initial commit.
This happens a lot when I import and control code from a vendor.
So the workflow is like this:
git log -p -- <file>
Author: Greg Bell <greg@>
Date: Fri Aug 26 07:13:22 2016 +1000
initial import from vendor
diff --git a/vendor/source.h b/vendor/source.h
new file mode 100644
@@ -0,0 +1,221 @@
+ * Error codes returned by blah.
+ * Copyright (C) 1998-2000 blah blah
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, visit the http://fsf.org website.
+#define RERR_OK 0
+#define RERR_SYNTAX 1 /* syntax or usage error */
. (all 1250 lines shown)
If I understand correctly, you want to review only the modifications you've made, and ignore addition of new files. If this is indeed the issue, you can use the
--diff-filter switch to limit what type of changes you want to see, and send the
M (short for modifications) argument:
$ git log --diff-filter=M -p -- <file>