{"thread":{"id":"6120","subject":"[PATCH] everyday: update for v1.5.0","startedAt":"2006-12-27T06:42:33Z","lastAt":"2006-12-27T06:42:33Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"30327","messageId":"7vd565c012.fsf@assigned-by-dhcp.cox.net","threadId":"6120","inReplyTo":null,"subject":"[PATCH] everyday: update for v1.5.0","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-27T06:42:33Z","receivedAt":"2006-12-27T06:42:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Fix minor mark-up mistakes and adjust to v1.5.0 BCP, namely:\n\n - use \"git add\" instead of \"git update-index\";\n - use \"git merge\" instead of \"git pull .\";\n - use separate remote layout;\n - use config instead of remotes/origin file;\n\nAlso updates \"My typical git day\" example since now I have\n'next' branch these days.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n Documentation/everyday.txt |   89 +++++++++++++++++++++++--------------------\n 1 files changed, 48 insertions(+), 41 deletions(-)\n\ndiff --git a/Documentation/everyday.txt b/Documentation/everyday.txt\nindex 9677671..5d17ace 100644\n--- a/Documentation/everyday.txt\n+++ b/Documentation/everyday.txt\n@@ -47,11 +47,11 @@ $ git repack <3>\n $ git prune <4>\n ------------\n +\n-<1> running without \"--full\" is usually cheap and assures the\n+<1> running without `\\--full` is usually cheap and assures the\n repository health reasonably well.\n <2> check how many loose objects there are and how much\n disk space is wasted by not repacking.\n-<3> without \"-a\" repacks incrementally.  repacking every 4-5MB\n+<3> without `-a` repacks incrementally.  repacking every 4-5MB\n of loose objects accumulation may be a good rule of thumb.\n <4> after repack, prune removes the duplicate loose objects.\n \n@@ -80,8 +80,7 @@ following commands.\n   * gitlink:git-checkout[1] and gitlink:git-branch[1] to switch\n     branches.\n \n-  * gitlink:git-add[1] and gitlink:git-update-index[1] to manage\n-    the index file.\n+  * gitlink:git-add[1] to manage the index file.\n \n   * gitlink:git-diff[1] and gitlink:git-status[1] to see what\n     you are in the middle of doing.\n@@ -91,8 +90,7 @@ following commands.\n   * gitlink:git-reset[1] and gitlink:git-checkout[1] (with\n     pathname parameters) to undo changes.\n \n-  * gitlink:git-pull[1] with \".\" as the remote to merge between\n-    local branches.\n+  * gitlink:git-merge[1] to merge between local branches.\n \n   * gitlink:git-rebase[1] to maintain topic branches.\n \n@@ -101,7 +99,7 @@ following commands.\n Examples\n ~~~~~~~~\n \n-Use a tarball as a starting point for a new repository:\n+Use a tarball as a starting point for a new repository.::\n +\n ------------\n $ tar zxf frotz.tar.gz\n@@ -123,7 +121,7 @@ $ edit/compile/test\n $ git checkout -- curses/ux_audio_oss.c <2>\n $ git add curses/ux_audio_alsa.c <3>\n $ edit/compile/test\n-$ git diff <4>\n+$ git diff HEAD <4>\n $ git commit -a -s <5>\n $ edit/compile/test\n $ git reset --soft HEAD^ <6>\n@@ -131,15 +129,15 @@ $ edit/compile/test\n $ git diff ORIG_HEAD <7>\n $ git commit -a -c ORIG_HEAD <8>\n $ git checkout master <9>\n-$ git pull . alsa-audio <10>\n+$ git merge alsa-audio <10>\n $ git log --since='3 days ago' <11>\n $ git log v2.43.. curses/ <12>\n ------------\n +\n <1> create a new topic branch.\n-<2> revert your botched changes in \"curses/ux_audio_oss.c\".\n+<2> revert your botched changes in `curses/ux_audio_oss.c`.\n <3> you need to tell git if you added a new file; removal and\n-modification will be caught if you do \"commit -a\" later.\n+modification will be caught if you do `git commit -a` later.\n <4> to see what changes you are committing.\n <5> commit everything as you have tested, with your sign-off.\n <6> take the last commit back, keeping what is in the working tree.\n@@ -147,11 +145,13 @@ modification will be caught if you do \"commit -a\" later.\n <8> redo the commit undone in the previous step, using the message\n you originally wrote.\n <9> switch to the master branch.\n-<10> merge a topic branch into your master branch\n+<10> merge a topic branch into your master branch.  You can also use\n+`git pull . alsa-audio`, i.e. pull from the local repository.\n <11> review commit logs; other forms to limit output can be\n-combined and include --max-count=10 (show 10 commits), --until='2005-12-10'.\n-<12> view only the changes that touch what's in curses/\n-directory, since v2.43 tag.\n+combined and include `\\--max-count=10` (show 10 commits),\n+`\\--until=2005-12-10`, etc.\n+<12> view only the changes that touch what's in `curses/`\n+directory, since `v2.43` tag.\n \n \n Individual Developer (Participant)[[Individual Developer (Participant)]]\n@@ -193,7 +193,7 @@ $ git fetch --tags <8>\n +\n <1> repeat as needed.\n <2> extract patches from your branch for e-mail submission.\n-<3> \"pull\" fetches from \"origin\" by default and merges into the\n+<3> `git pull` fetches from `origin` by default and merges into the\n current branch.\n <4> immediately after pulling, look at the changes done upstream\n since last time we checked, only in the\n@@ -201,37 +201,41 @@ area we are interested in.\n <5> fetch from a specific branch from a specific repository and merge.\n <6> revert the pull.\n <7> garbage collect leftover objects from reverted pull.\n-<8> from time to time, obtain official tags from the \"origin\"\n-and store them under .git/refs/tags/.\n+<8> from time to time, obtain official tags from the `origin`\n+and store them under `.git/refs/tags/`.\n \n \n Push into another repository.::\n +\n ------------\n-satellite$ git clone mothership:frotz/.git frotz <1>\n+satellite$ git clone mothership:frotz frotz <1>\n satellite$ cd frotz\n-satellite$ cat .git/remotes/origin <2>\n-URL: mothership:frotz/.git\n-Pull: master:origin\n-satellite$ echo 'Push: master:satellite' >>.git/remotes/origin <3>\n+satellite$ git repo-config --get-regexp '^(remote|branch)\\.' <2>\n+remote.origin.url mothership:frotz\n+remote.origin.fetch refs/heads/*:refs/remotes/origin/*\n+branch.master.remote origin\n+branch.master.merge refs/heads/master\n+satellite$ git repo-config remote.origin.push \\\n+           master:refs/remotes/satellite/master <3>\n satellite$ edit/compile/test/commit\n satellite$ git push origin <4>\n \n mothership$ cd frotz\n mothership$ git checkout master\n-mothership$ git pull . satellite <5>\n+mothership$ git merge satellite/master <5>\n ------------\n +\n <1> mothership machine has a frotz repository under your home\n directory; clone from it to start a repository on the satellite\n machine.\n-<2> clone creates this file by default.  It arranges \"git pull\"\n-to fetch and store the master branch head of mothership machine\n-to local \"origin\" branch.\n-<3> arrange \"git push\" to push local \"master\" branch to\n-\"satellite\" branch of the mothership machine.\n-<4> push will stash our work away on \"satellite\" branch on the\n-mothership machine.  You could use this as a back-up method.\n+<2> clone sets these configuration variables by default.\n+It arranges `git pull` to fetch and store the branches of mothership\n+machine to local `remotes/origin/*` tracking branches.\n+<3> arrange `git push` to push local `master` branch to\n+`remotes/satellite/master` branch of the mothership machine.\n+<4> push will stash our work away on `remotes/satellite/master`\n+tracking branch on the mothership machine.  You could use this as\n+a back-up method.\n <5> on mothership machine, merge the work done on the satellite\n machine into the master branch.\n \n@@ -247,7 +251,7 @@ $ git format-patch -k -m --stdout v2.6.14..private2.6.14 |\n +\n <1> create a private branch based on a well known (but somewhat behind)\n tag.\n-<2> forward port all changes in private2.6.14 branch to master branch\n+<2> forward port all changes in `private2.6.14` branch to `master` branch\n without a formal \"merging\".\n \n \n@@ -284,13 +288,13 @@ $ mailx <3>\n & s 2 3 4 5 ./+to-apply\n & s 7 8 ./+hold-linus\n & q\n-$ git checkout master\n+$ git checkout -b topic/one master\n $ git am -3 -i -s -u ./+to-apply <4>\n $ compile/test\n $ git checkout -b hold/linus && git am -3 -i -s -u ./+hold-linus <5>\n $ git checkout topic/one && git rebase master <6>\n-$ git checkout pu && git reset --hard master <7>\n-$ git pull . topic/one topic/two && git pull . hold/linus <8>\n+$ git checkout pu && git reset --hard next <7>\n+$ git merge topic/one topic/two && git merge hold/linus <8>\n $ git checkout maint\n $ git cherry-pick master~4 <9>\n $ compile/test\n@@ -307,29 +311,32 @@ they are.\n that are not quite ready.\n <4> apply them, interactively, with my sign-offs.\n <5> create topic branch as needed and apply, again with my\n-sign-offs. \n+sign-offs.\n <6> rebase internal topic branch that has not been merged to the\n master, nor exposed as a part of a stable branch.\n-<7> restart \"pu\" every time from the master.\n+<7> restart `pu` every time from the next.\n <8> and bundle topic branches still cooking.\n <9> backport a critical fix.\n <10> create a signed tag.\n <11> make sure I did not accidentally rewind master beyond what I\n-already pushed out.  \"ko\" shorthand points at the repository I have\n+already pushed out.  `ko` shorthand points at the repository I have\n at kernel.org, and looks like this:\n +\n ------------\n $ cat .git/remotes/ko\n URL: kernel.org:/pub/scm/git/git.git\n Pull: master:refs/tags/ko-master\n+Pull: next:refs/tags/ko-next\n Pull: maint:refs/tags/ko-maint\n Push: master\n+Push: next\n Push: +pu\n Push: maint\n ------------\n +\n-In the output from \"git show-branch\", \"master\" should have\n-everything \"ko-master\" has.\n+In the output from `git show-branch`, `master` should have\n+everything `ko-master` has, and `next` should have\n+everything `ko-next` has.\n \n <12> push out the bleeding edge.\n <13> push the tag out, too.\n@@ -406,7 +413,7 @@ $ grep git /etc/shells <2>\n ------------\n +\n <1> log-in shell is set to /usr/bin/git-shell, which does not\n-allow anything but \"git push\" and \"git pull\".  The users should\n+allow anything but `git push` and `git pull`.  The users should\n get an ssh access to the machine.\n <2> in many distributions /etc/shells needs to list what is used\n as the login shell.\n-- \n1.5.0.rc0.g9c0d\n"}]}