当您运行时git diff (specific commit)^..(specific commit)
,或者换句话说,当您将提交与其父级进行比较时,您如何知道文件上发生了哪些更改。该特定提交的更改是什么样的?
user2423347
问问题
73 次
2 回答
0
The default diff output format for git diff
is the "unified" format. You can find a description of the unified diff format on Wikipedia.
于 2013-05-27T02:09:41.437 回答
0
Items removed will begin with a "-", whereas lines added will begin with a "+"
A change will often have one or more "-" lines followed by one or more "+" lines, like so
diff --git a/app.js b/app.js
index f029ded..ce7c87d 100644
--- a/app.js
+++ b/app.js
@@ -72,9 +72,9 @@ var handlers = [
, { path: '/logout', get: routes.logout.get }
, { path: '/register', get: routes.register.get, post: routes.register.post }
//, { path: '/profile/:id', get: [auth.restrict(), routes.profile.get], post: [auth.restrict(), routes.profile.post] }
- , { path: '/profile/:user', get: routes.profile.get}
- , { path: '/activity/:user', get: routes.profile.get}
- , { path: '/activity/:user/comments', get: routes.profile.get}
+ , { path: '/profile/:canonical_id', get: routes.profile.get}
+ , { path: '/activity/:canonical_id', get: routes.profile.get}
+ , { path: '/activity/:canonical_id/comments', get: routes.profile.get}
//, { path: '/restricted', get: [auth.restrict(), auth.verifyCertificate, routes.login.get] }
];
console.log(typeof routes.profile.get);
于 2013-05-27T02:11:51.983 回答