]> git.phdru.name Git - git-wiki.git/blobdiff - pep-git.txt
Add more details
[git-wiki.git] / pep-git.txt
index d995d2456fe367ceaa1d0fa0a8081274497d2e2c..1b0f384a47f17f72ed3b6b0cf2ccf283d67aa5d8 100644 (file)
@@ -91,6 +91,8 @@ important so let repeat it here::
     $ git config --global user.name "User Name"
     $ git config --global user.email user.name@example.org
 
+Put your real name and preferred email.
+
 
 Examples in this PEP
 ====================
@@ -98,8 +100,14 @@ Examples in this PEP
 Examples of git commands in this PEP use the following approach. It is
 supposed that you, the user, works with a local repository named
 ``python`` that has an upstream remote repo named ``origin``. Your
-local repo has two branches ``v1`` and ``v2``. Usually the currently
-checked out branch is ``v2``.
+local repo has two branches ``v1`` and ``v2``. For most examples the
+currently checked out branch is ``v2``. That is, it's assumed you did
+something like that::
+
+    $ git clone -b v1 http://git.python.org/python.git
+    $ cd python
+    $ git fetch origin v2:v2
+    $ git checkout -b v2
 
 
 Commit editing and caveats
@@ -111,13 +119,15 @@ documentation but it's also repeated here as it's very important.
 It is possible to recover from forced push but it's PITA for the
 entire team. Please avoid it.
 
-To see what commits have not been published yet see the head of the
-remote branch::
+To see what commits have not been published yet compare the head of the
+branch with its upstream remote branch::
 
     $ git log origin/v2..
+    $ git log origin/v1..v1
 
 For every branch that has an upstream remote branch git maintains an
-alias @{upstream} (short version @{u})::
+alias @{upstream} (short version @{u}), so the commands above can be
+given as::
 
     $ git log @{u}..
     $ git log v1@{u}..v1
@@ -126,14 +136,20 @@ To see the status of all branches::
 
     $ git branch -avv
 
+To compare the status of local branches with a remote repo::
+
+    $ git remote show origin
+
 Read `how to recover from upstream rebase
 <https://git-scm.com/docs/git-rebase#_recovering_from_upstream_rebase>`_.
 It is in ``git help rebase``.
 
 On the other hand don't be too afraid about commit editing. You can
-safely edit commits that hasn't been pushed yet. You can even push
-commits to your own (backup) repo, edit them later and force-push
-edited commits to replace what has already been pushed.
+safely edit, remove, reorder, combine and split commits that hasn't
+been pushed yet. You can even push commits to your own (backup) repo,
+edit them later and force-push edited commits to replace what has
+already been pushed. Not a problem until commits are in a public
+repository.
 
 
 References