summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5cd5de)
raw | patch | inline | side by side (parent: d5cd5de)
author | J. Bruce Fields <bfields@citi.umich.edu> | |
Thu, 11 Jan 2007 04:17:00 +0000 (23:17 -0500) | ||
committer | J. Bruce Fields <bfields@citi.umich.edu> | |
Thu, 11 Jan 2007 04:17:00 +0000 (23:17 -0500) |
Fix some typos, start adding some more simple examples.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Documentation/user-manual.txt | patch | blob | history |
index 2fc8ce95827d5a2c5d571c5bfa57873a4ab49693..013e46fe3c5e04ff93d257e9d43382d7b54fef0a 100644 (file)
- HEAD: refers to the head of the current branch
There are many more; see the "SPECIFYING REVISION" section of the
-gitlink:git-rev-list[1] man page for the complete list of ways to
+gitlink:git-rev-parse[1] man page for the complete list of ways to
name revisions. Some examples:
-------------------------------------------------
which refers to the other branch that we're merging in to the current
branch.
+The gitlink:git-rev-parse[1] command is a low-level command that is
+occasionally useful for translating some name for a commit to the SHA1 id for
+that commit:
+
+-------------------------------------------------
+$ git rev-parse origin
+e05db0fd4f31dde7005f075a84f96b360d05984b
+-------------------------------------------------
+
Creating tags
-------------
Before the colon may be anything that names a commit, and after it
may be any path to a file tracked by git.
+Examples
+--------
+
+Check whether two branches point at the same history
+----------------------------------------------------
+
+Suppose you want to check whether two branches point at the same point
+in history.
+
+-------------------------------------------------
+$ git diff origin..master
+-------------------------------------------------
+
+will tell you whether the contents of the project are the same at the two
+branches; in theory, however, it's possible that the same project contents
+could have been arrived at by two different historical routes. You could
+compare the SHA1 id's:
+
+-------------------------------------------------
+$ git rev-list origin
+e05db0fd4f31dde7005f075a84f96b360d05984b
+$ git rev-list master
+e05db0fd4f31dde7005f075a84f96b360d05984b
+-------------------------------------------------
+
+Or you could recall that the ... operator selects all commits contained
+reachable from either one reference or the other but not both: so
+
+-------------------------------------------------
+$ git log origin...master
+-------------------------------------------------
+
+will return no commits when the two branches are equal.
+
+Check which tagged version a given fix was first included in
+------------------------------------------------------------
+
+Suppose you know that a critical fix made it into the linux kernel with commit
+e05db0fd... You'd like to find which kernel version that commit first made it
+into.
+
Developing with git
===================
In the process, it may discover conflicts. In that case it will stop and
allow you to fix the conflicts as described in
-"<<resolving-a-merge,Resolving a merge>>". Once the index is updated with
+"<<resolving-a-merge,Resolving a merge>>".
+
+XXX: no, maybe not: git diff doesn't produce very useful results, and there's
+no MERGE_HEAD.
+
+Once the index is updated with
the results of the conflict resolution, instead of creating a new commit,
just run