X7ROOT File Manager
Current Path:
/usr/share/doc/git-1.8.3.1
usr
/
share
/
doc
/
git-1.8.3.1
/
📁
..
📄
COPYING
(18.33 KB)
📄
README
(2.56 KB)
📁
RelNotes
📄
blame-options.txt
(3.95 KB)
📄
cmds-ancillaryinterrogators.txt
(1.18 KB)
📄
cmds-ancillarymanipulators.txt
(1005 B)
📄
cmds-foreignscminterface.txt
(760 B)
📄
cmds-mainporcelain.txt
(2.5 KB)
📄
cmds-plumbinginterrogators.txt
(1.34 KB)
📄
cmds-plumbingmanipulators.txt
(1.21 KB)
📄
cmds-purehelpers.txt
(1.11 KB)
📄
cmds-synchelpers.txt
(543 B)
📄
cmds-synchingrepositories.txt
(397 B)
📄
config.txt
(90.14 KB)
📁
contrib
📄
date-formats.txt
(848 B)
📄
diff-config.txt
(6.87 KB)
📄
diff-format.txt
(5.44 KB)
📄
diff-generate-patch.txt
(6.44 KB)
📄
diff-options.txt
(18.12 KB)
📄
docbook-xsl.css
(4.45 KB)
📄
everyday.html
(35.06 KB)
📄
everyday.txt
(12.71 KB)
📄
fetch-options.txt
(4.22 KB)
📄
git-add.html
(35.63 KB)
📄
git-add.txt
(13.96 KB)
📄
git-am.html
(25.86 KB)
📄
git-am.txt
(6.02 KB)
📄
git-annotate.html
(23.32 KB)
📄
git-annotate.txt
(752 B)
📄
git-apply.html
(30.82 KB)
📄
git-apply.txt
(10.07 KB)
📄
git-archive.html
(25.88 KB)
📄
git-archive.txt
(6.05 KB)
📄
git-bisect-lk2009.html
(78.86 KB)
📄
git-bisect-lk2009.txt
(48.08 KB)
📄
git-bisect.html
(33.08 KB)
📄
git-bisect.txt
(12.38 KB)
📄
git-blame.html
(37.08 KB)
📄
git-blame.txt
(7.63 KB)
📄
git-branch.html
(31.29 KB)
📄
git-branch.txt
(9.87 KB)
📄
git-bundle.html
(25.72 KB)
📄
git-bundle.txt
(6.89 KB)
📄
git-cat-file.html
(21.04 KB)
📄
git-cat-file.txt
(2.9 KB)
📄
git-check-attr.html
(21.17 KB)
📄
git-check-attr.txt
(2.72 KB)
📄
git-check-ignore.html
(20.25 KB)
📄
git-check-ignore.txt
(2.35 KB)
📄
git-check-ref-format.html
(22.43 KB)
📄
git-check-ref-format.txt
(4.08 KB)
📄
git-checkout-index.html
(24.34 KB)
📄
git-checkout-index.txt
(5.31 KB)
📄
git-checkout.html
(38.47 KB)
📄
git-checkout.txt
(15.61 KB)
📄
git-cherry-pick.html
(28.28 KB)
📄
git-cherry-pick.txt
(7.73 KB)
📄
git-cherry.html
(19.15 KB)
📄
git-cherry.txt
(1.71 KB)
📄
git-citool.html
(17.13 KB)
📄
git-citool.txt
(543 B)
📄
git-clean.html
(19.45 KB)
📄
git-clean.txt
(1.92 KB)
📄
git-clone.html
(34.75 KB)
📄
git-clone.txt
(9.84 KB)
📄
git-column.html
(18.47 KB)
📄
git-column.txt
(1.14 KB)
📄
git-commit-tree.html
(25.04 KB)
📄
git-commit-tree.txt
(2.79 KB)
📄
git-commit.html
(43.18 KB)
📄
git-commit.txt
(14.96 KB)
📄
git-config.html
(181.42 KB)
📄
git-config.txt
(11.52 KB)
📄
git-count-objects.html
(18.11 KB)
📄
git-count-objects.txt
(1.06 KB)
📄
git-credential-cache--daemon.html
(17.4 KB)
📄
git-credential-cache--daemon.txt
(684 B)
📄
git-credential-cache.html
(19.26 KB)
📄
git-credential-cache.txt
(2.13 KB)
📄
git-credential-store.html
(19.42 KB)
📄
git-credential-store.txt
(2.11 KB)
📄
git-credential.html
(23.82 KB)
📄
git-credential.txt
(5.72 KB)
📄
git-cvsexportcommit.html
(21.34 KB)
📄
git-cvsexportcommit.txt
(3.13 KB)
📄
git-cvsimport.html
(27.62 KB)
📄
git-cvsimport.txt
(7.57 KB)
📄
git-cvsserver.html
(38.1 KB)
📄
git-cvsserver.txt
(15.21 KB)
📄
git-daemon.html
(32.69 KB)
📄
git-daemon.txt
(11.58 KB)
📄
git-describe.html
(24.35 KB)
📄
git-describe.txt
(5.59 KB)
📄
git-diff-files.html
(59.9 KB)
📄
git-diff-files.txt
(1.18 KB)
📄
git-diff-index.html
(64.69 KB)
📄
git-diff-index.txt
(4.49 KB)
📄
git-diff-tree.html
(82.31 KB)
📄
git-diff-tree.txt
(5.26 KB)
📄
git-diff.html
(66.63 KB)
📄
git-diff.txt
(5.34 KB)
📄
git-difftool.html
(22.93 KB)
📄
git-difftool.txt
(4.02 KB)
📄
git-fast-export.html
(23.45 KB)
📄
git-fast-export.txt
(5.16 KB)
📄
git-fast-import.html
(92.66 KB)
📄
git-fast-import.txt
(53.75 KB)
📄
git-fetch-pack.html
(21.26 KB)
📄
git-fetch-pack.txt
(3.28 KB)
📄
git-fetch.html
(38.95 KB)
📄
git-fetch.txt
(2.65 KB)
📄
git-filter-branch.html
(37.67 KB)
📄
git-filter-branch.txt
(16.84 KB)
📄
git-fmt-merge-msg.html
(19.55 KB)
📄
git-fmt-merge-msg.txt
(1.87 KB)
📄
git-for-each-ref.html
(25.45 KB)
📄
git-for-each-ref.txt
(5.72 KB)
📄
git-format-patch.html
(58.91 KB)
📄
git-format-patch.txt
(18.38 KB)
📄
git-fsck-objects.html
(16.88 KB)
📄
git-fsck-objects.txt
(354 B)
📄
git-fsck.html
(23.33 KB)
📄
git-fsck.txt
(4.54 KB)
📄
git-gc.html
(23.82 KB)
📄
git-gc.txt
(5.34 KB)
📄
git-get-tar-commit-id.html
(17.32 KB)
📄
git-get-tar-commit-id.txt
(737 B)
📄
git-grep.html
(29.02 KB)
📄
git-grep.txt
(7.55 KB)
📄
git-gui.html
(22.1 KB)
📄
git-gui.txt
(3.5 KB)
📄
git-hash-object.html
(18.92 KB)
📄
git-hash-object.txt
(1.8 KB)
📄
git-help.html
(25.14 KB)
📄
git-help.txt
(5.99 KB)
📄
git-http-backend.html
(28.46 KB)
📄
git-http-backend.txt
(9.48 KB)
📄
git-http-fetch.html
(18.41 KB)
📄
git-http-fetch.txt
(1.14 KB)
📄
git-http-push.html
(20.73 KB)
📄
git-http-push.txt
(2.91 KB)
📄
git-imap-send.html
(22.84 KB)
📄
git-imap-send.txt
(4.24 KB)
📄
git-index-pack.html
(21.01 KB)
📄
git-index-pack.txt
(3.32 KB)
📄
git-init-db.html
(16.95 KB)
📄
git-init-db.txt
(409 B)
📄
git-init.html
(23 KB)
📄
git-init.txt
(4.69 KB)
📄
git-instaweb.html
(20.06 KB)
📄
git-instaweb.txt
(2.25 KB)
📄
git-log.html
(111.87 KB)
📄
git-log.txt
(5.68 KB)
📄
git-lost-found.html
(18.83 KB)
📄
git-lost-found.txt
(1.69 KB)
📄
git-ls-files.html
(26.46 KB)
📄
git-ls-files.txt
(6.1 KB)
📄
git-ls-remote.html
(20.11 KB)
📄
git-ls-remote.txt
(2.54 KB)
📄
git-ls-tree.html
(21.06 KB)
📄
git-ls-tree.txt
(2.93 KB)
📄
git-mailinfo.html
(20.78 KB)
📄
git-mailinfo.txt
(3 KB)
📄
git-mailsplit.html
(18.52 KB)
📄
git-mailsplit.txt
(1.21 KB)
📄
git-merge-base.html
(23.17 KB)
📄
git-merge-base.txt
(4.32 KB)
📄
git-merge-file.html
(20.71 KB)
📄
git-merge-file.txt
(2.72 KB)
📄
git-merge-index.html
(19.88 KB)
📄
git-merge-index.txt
(2.39 KB)
📄
git-merge-one-file.html
(16.9 KB)
📄
git-merge-one-file.txt
(387 B)
📄
git-merge-tree.html
(17.32 KB)
📄
git-merge-tree.txt
(749 B)
📄
git-merge.html
(50.38 KB)
📄
git-merge.txt
(11.97 KB)
📄
git-mergetool--lib.html
(18.23 KB)
📄
git-mergetool--lib.txt
(1.18 KB)
📄
git-mergetool.html
(20.98 KB)
📄
git-mergetool.txt
(3.26 KB)
📄
git-mktag.html
(17.63 KB)
📄
git-mktag.txt
(806 B)
📄
git-mktree.html
(17.94 KB)
📄
git-mktree.txt
(1.05 KB)
📄
git-mv.html
(18.33 KB)
📄
git-mv.txt
(1.16 KB)
📄
git-name-rev.html
(19.17 KB)
📄
git-name-rev.txt
(1.68 KB)
📄
git-notes.html
(35.71 KB)
📄
git-notes.txt
(13.08 KB)
📄
git-p4.html
(44.35 KB)
📄
git-p4.txt
(18.73 KB)
📄
git-pack-objects.html
(28.46 KB)
📄
git-pack-objects.txt
(8.86 KB)
📄
git-pack-redundant.html
(18.24 KB)
📄
git-pack-redundant.txt
(1.13 KB)
📄
git-pack-refs.html
(19.15 KB)
📄
git-pack-refs.txt
(2.06 KB)
📄
git-parse-remote.html
(16.97 KB)
📄
git-parse-remote.txt
(471 B)
📄
git-patch-id.html
(17.71 KB)
📄
git-patch-id.txt
(940 B)
📄
git-peek-remote.html
(18.03 KB)
📄
git-peek-remote.txt
(1.08 KB)
📄
git-prune-packed.html
(17.99 KB)
📄
git-prune-packed.txt
(935 B)
📄
git-prune.html
(19.57 KB)
📄
git-prune.txt
(1.76 KB)
📄
git-pull.html
(54.96 KB)
📄
git-pull.txt
(7.72 KB)
📄
git-push.html
(48.49 KB)
📄
git-push.txt
(16.26 KB)
📄
git-quiltimport.html
(18.4 KB)
📄
git-quiltimport.txt
(1.4 KB)
📄
git-read-tree.html
(38.05 KB)
📄
git-read-tree.txt
(16.36 KB)
📄
git-rebase.html
(57.88 KB)
📄
git-rebase.txt
(23.62 KB)
📄
git-receive-pack.html
(23.98 KB)
📄
git-receive-pack.txt
(5.48 KB)
📄
git-reflog.html
(20.86 KB)
📄
git-reflog.txt
(3.09 KB)
📄
git-relink.html
(17.41 KB)
📄
git-relink.txt
(649 B)
📄
git-remote-ext.html
(22.43 KB)
📄
git-remote-ext.txt
(3.93 KB)
📄
git-remote-fd.html
(19 KB)
📄
git-remote-fd.txt
(1.63 KB)
📄
git-remote-helpers.html
(16.45 KB)
📄
git-remote-testgit.html
(17.26 KB)
📄
git-remote-testgit.txt
(570 B)
📄
git-remote.html
(26.62 KB)
📄
git-remote.txt
(6.79 KB)
📄
git-repack.html
(22.99 KB)
📄
git-repack.txt
(4.52 KB)
📄
git-replace.html
(19.86 KB)
📄
git-replace.txt
(2.26 KB)
📄
git-repo-config.html
(16.85 KB)
📄
git-repo-config.txt
(324 B)
📄
git-request-pull.html
(17.41 KB)
📄
git-request-pull.txt
(528 B)
📄
git-rerere.html
(25.93 KB)
📄
git-rerere.txt
(7.29 KB)
📄
git-reset.html
(36.54 KB)
📄
git-reset.txt
(14.15 KB)
📄
git-rev-list.html
(73.64 KB)
📄
git-rev-list.txt
(3.59 KB)
📄
git-rev-parse.html
(46.91 KB)
📄
git-rev-parse.txt
(10.03 KB)
📄
git-revert.html
(22.61 KB)
📄
git-revert.txt
(3.69 KB)
📄
git-rm.html
(24.83 KB)
📄
git-rm.txt
(5.68 KB)
📄
git-send-email.html
(36.99 KB)
📄
git-send-email.txt
(13.93 KB)
📄
git-send-pack.html
(21.8 KB)
📄
git-send-pack.txt
(3.6 KB)
📄
git-sh-i18n--envsubst.html
(17.64 KB)
📄
git-sh-i18n--envsubst.txt
(928 B)
📄
git-sh-i18n.html
(18.06 KB)
📄
git-sh-i18n.txt
(1.12 KB)
📄
git-sh-setup.html
(20.46 KB)
📄
git-sh-setup.txt
(2.73 KB)
📄
git-shell.html
(20.25 KB)
📄
git-shell.txt
(2.47 KB)
📄
git-shortlog.html
(24.29 KB)
📄
git-shortlog.txt
(2.57 KB)
📄
git-show-branch.html
(25.52 KB)
📄
git-show-branch.txt
(6.36 KB)
📄
git-show-index.html
(17.03 KB)
📄
git-show-index.txt
(478 B)
📄
git-show-ref.html
(24.15 KB)
📄
git-show-ref.txt
(5.83 KB)
📄
git-show.html
(38.73 KB)
📄
git-show.txt
(1.64 KB)
📄
git-stage.html
(16.82 KB)
📄
git-stage.txt
(300 B)
📄
git-stash.html
(29.25 KB)
📄
git-stash.txt
(9.85 KB)
📄
git-status.html
(27.38 KB)
📄
git-status.txt
(7.77 KB)
📄
git-stripspace.html
(19.37 KB)
📄
git-stripspace.txt
(1.83 KB)
📄
git-submodule.html
(36.33 KB)
📄
git-submodule.txt
(15.13 KB)
📄
git-svn.html
(73.85 KB)
📄
git-svn.txt
(41.53 KB)
📄
git-symbolic-ref.html
(19.37 KB)
📄
git-symbolic-ref.txt
(1.93 KB)
📄
git-tag.html
(31.51 KB)
📄
git-tag.txt
(9.44 KB)
📄
git-tar-tree.html
(20.04 KB)
📄
git-tar-tree.txt
(2.31 KB)
📄
git-tools.html
(22.01 KB)
📄
git-tools.txt
(3.36 KB)
📄
git-unpack-file.html
(17.13 KB)
📄
git-unpack-file.txt
(434 B)
📄
git-unpack-objects.html
(18.15 KB)
📄
git-unpack-objects.txt
(1.14 KB)
📄
git-update-index.html
(35.2 KB)
📄
git-update-index.txt
(13.2 KB)
📄
git-update-ref.html
(20.82 KB)
📄
git-update-ref.txt
(3.16 KB)
📄
git-update-server-info.html
(17.72 KB)
📄
git-update-server-info.txt
(797 B)
📄
git-upload-archive.html
(17.35 KB)
📄
git-upload-archive.txt
(617 B)
📄
git-upload-pack.html
(17.88 KB)
📄
git-upload-pack.txt
(869 B)
📄
git-var.html
(19.08 KB)
📄
git-var.txt
(1.8 KB)
📄
git-verify-pack.html
(18.39 KB)
📄
git-verify-pack.txt
(1.07 KB)
📄
git-verify-tag.html
(17.2 KB)
📄
git-verify-tag.txt
(411 B)
📄
git-web--browse.html
(21.63 KB)
📄
git-web--browse.txt
(3.43 KB)
📄
git-whatchanged.html
(35.64 KB)
📄
git-whatchanged.txt
(1.55 KB)
📄
git-write-tree.html
(17.91 KB)
📄
git-write-tree.txt
(1 KB)
📄
git.html
(70.05 KB)
📄
git.txt
(31.8 KB)
📄
gitattributes.html
(62.01 KB)
📄
gitattributes.txt
(33.51 KB)
📄
gitcli.html
(26.56 KB)
📄
gitcli.txt
(7.75 KB)
📄
gitcore-tutorial.html
(99.92 KB)
📄
gitcore-tutorial.txt
(62.33 KB)
📄
gitcredentials.html
(24.45 KB)
📄
gitcredentials.txt
(5.93 KB)
📄
gitcvs-migration.html
(26.03 KB)
📄
gitcvs-migration.txt
(7.38 KB)
📄
gitdiffcore.html
(29.51 KB)
📄
gitdiffcore.txt
(10.78 KB)
📄
gitglossary.html
(48.63 KB)
📄
gitglossary.txt
(369 B)
📄
githooks.html
(35.01 KB)
📄
githooks.txt
(13.48 KB)
📄
gitignore.html
(24.81 KB)
📄
gitignore.txt
(6.58 KB)
📄
gitk.html
(21.61 KB)
📄
gitk.txt
(3.23 KB)
📄
gitmodules.html
(21.72 KB)
📄
gitmodules.txt
(3.76 KB)
📄
gitnamespaces.html
(20.5 KB)
📄
gitnamespaces.txt
(3.2 KB)
📄
gitremote-helpers.html
(39.11 KB)
📄
gitremote-helpers.txt
(16.06 KB)
📄
gitrepository-layout.html
(28.1 KB)
📄
gitrepository-layout.txt
(7.95 KB)
📄
gitrevisions.html
(32.66 KB)
📄
gitrevisions.txt
(774 B)
📄
gittutorial-2.html
(33.55 KB)
📄
gittutorial-2.txt
(14.37 KB)
📄
gittutorial.html
(44.41 KB)
📄
gittutorial.txt
(22.43 KB)
📄
gitweb.conf.html
(66.11 KB)
📄
gitweb.conf.txt
(37.3 KB)
📄
gitweb.html
(50.94 KB)
📄
gitweb.txt
(26.34 KB)
📄
gitworkflows.html
(38.85 KB)
📄
gitworkflows.txt
(17 KB)
📄
glossary-content.txt
(21.95 KB)
📁
howto
📄
howto-index.html
(21.31 KB)
📄
howto-index.txt
(3.29 KB)
📄
i18n.txt
(2.16 KB)
📄
mailmap.txt
(2.35 KB)
📄
merge-config.txt
(3.47 KB)
📄
merge-options.txt
(3.58 KB)
📄
merge-strategies.txt
(4.6 KB)
📄
mergetools-diff.txt
(181 B)
📄
mergetools-merge.txt
(187 B)
📄
pretty-formats.txt
(7.59 KB)
📄
pretty-options.txt
(2.81 KB)
📄
pull-fetch-param.txt
(3.19 KB)
📄
rev-list-options.txt
(27.11 KB)
📄
revisions.txt
(11.5 KB)
📄
sequencer.txt
(392 B)
📁
technical
📄
urls-remotes.txt
(2.4 KB)
📄
urls.txt
(3.12 KB)
📄
user-manual.html
(264.08 KB)
📄
user-manual.txt
(170.67 KB)
Editing: everyday.txt
Everyday Git With 20 Commands Or So =================================== <<Individual Developer (Standalone)>> commands are essential for anybody who makes a commit, even for somebody who works alone. If you work with other people, you will need commands listed in the <<Individual Developer (Participant)>> section as well. People who play the <<Integrator>> role need to learn some more commands in addition to the above. <<Repository Administration>> commands are for system administrators who are responsible for the care and feeding of Git repositories. Individual Developer (Standalone)[[Individual Developer (Standalone)]] ---------------------------------------------------------------------- A standalone individual developer does not exchange patches with other people, and works alone in a single repository, using the following commands. * linkgit:git-init[1] to create a new repository. * linkgit:git-show-branch[1] to see where you are. * linkgit:git-log[1] to see what happened. * linkgit:git-checkout[1] and linkgit:git-branch[1] to switch branches. * linkgit:git-add[1] to manage the index file. * linkgit:git-diff[1] and linkgit:git-status[1] to see what you are in the middle of doing. * linkgit:git-commit[1] to advance the current branch. * linkgit:git-reset[1] and linkgit:git-checkout[1] (with pathname parameters) to undo changes. * linkgit:git-merge[1] to merge between local branches. * linkgit:git-rebase[1] to maintain topic branches. * linkgit:git-tag[1] to mark known point. Examples ~~~~~~~~ Use a tarball as a starting point for a new repository.:: + ------------ $ tar zxf frotz.tar.gz $ cd frotz $ git init $ git add . <1> $ git commit -m "import of frotz source tree." $ git tag v2.43 <2> ------------ + <1> add everything under the current directory. <2> make a lightweight, unannotated tag. Create a topic branch and develop.:: + ------------ $ git checkout -b alsa-audio <1> $ edit/compile/test $ git checkout -- curses/ux_audio_oss.c <2> $ git add curses/ux_audio_alsa.c <3> $ edit/compile/test $ git diff HEAD <4> $ git commit -a -s <5> $ edit/compile/test $ git reset --soft HEAD^ <6> $ edit/compile/test $ git diff ORIG_HEAD <7> $ git commit -a -c ORIG_HEAD <8> $ git checkout master <9> $ git merge alsa-audio <10> $ git log --since='3 days ago' <11> $ git log v2.43.. curses/ <12> ------------ + <1> create a new topic branch. <2> revert your botched changes in `curses/ux_audio_oss.c`. <3> you need to tell Git if you added a new file; removal and modification will be caught if you do `git commit -a` later. <4> to see what changes you are committing. <5> commit everything as you have tested, with your sign-off. <6> take the last commit back, keeping what is in the working tree. <7> look at the changes since the premature commit we took back. <8> redo the commit undone in the previous step, using the message you originally wrote. <9> switch to the master branch. <10> merge a topic branch into your master branch. <11> review commit logs; other forms to limit output can be combined and include `--max-count=10` (show 10 commits), `--until=2005-12-10`, etc. <12> view only the changes that touch what's in `curses/` directory, since `v2.43` tag. Individual Developer (Participant)[[Individual Developer (Participant)]] ------------------------------------------------------------------------ A developer working as a participant in a group project needs to learn how to communicate with others, and uses these commands in addition to the ones needed by a standalone developer. * linkgit:git-clone[1] from the upstream to prime your local repository. * linkgit:git-pull[1] and linkgit:git-fetch[1] from "origin" to keep up-to-date with the upstream. * linkgit:git-push[1] to shared repository, if you adopt CVS style shared repository workflow. * linkgit:git-format-patch[1] to prepare e-mail submission, if you adopt Linux kernel-style public forum workflow. Examples ~~~~~~~~ Clone the upstream and work on it. Feed changes to upstream.:: + ------------ $ git clone git://git.kernel.org/pub/scm/.../torvalds/linux-2.6 my2.6 $ cd my2.6 $ edit/compile/test; git commit -a -s <1> $ git format-patch origin <2> $ git pull <3> $ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4> $ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5> $ git reset --hard ORIG_HEAD <6> $ git gc <7> $ git fetch --tags <8> ------------ + <1> repeat as needed. <2> extract patches from your branch for e-mail submission. <3> `git pull` fetches from `origin` by default and merges into the current branch. <4> immediately after pulling, look at the changes done upstream since last time we checked, only in the area we are interested in. <5> fetch from a specific branch from a specific repository and merge. <6> revert the pull. <7> garbage collect leftover objects from reverted pull. <8> from time to time, obtain official tags from the `origin` and store them under `.git/refs/tags/`. Push into another repository.:: + ------------ satellite$ git clone mothership:frotz frotz <1> satellite$ cd frotz satellite$ git config --get-regexp '^(remote|branch)\.' <2> remote.origin.url mothership:frotz remote.origin.fetch refs/heads/*:refs/remotes/origin/* branch.master.remote origin branch.master.merge refs/heads/master satellite$ git config remote.origin.push \ master:refs/remotes/satellite/master <3> satellite$ edit/compile/test/commit satellite$ git push origin <4> mothership$ cd frotz mothership$ git checkout master mothership$ git merge satellite/master <5> ------------ + <1> mothership machine has a frotz repository under your home directory; clone from it to start a repository on the satellite machine. <2> clone sets these configuration variables by default. It arranges `git pull` to fetch and store the branches of mothership machine to local `remotes/origin/*` remote-tracking branches. <3> arrange `git push` to push local `master` branch to `remotes/satellite/master` branch of the mothership machine. <4> push will stash our work away on `remotes/satellite/master` remote-tracking branch on the mothership machine. You could use this as a back-up method. <5> on mothership machine, merge the work done on the satellite machine into the master branch. Branch off of a specific tag.:: + ------------ $ git checkout -b private2.6.14 v2.6.14 <1> $ edit/compile/test; git commit -a $ git checkout master $ git format-patch -k -m --stdout v2.6.14..private2.6.14 | git am -3 -k <2> ------------ + <1> create a private branch based on a well known (but somewhat behind) tag. <2> forward port all changes in `private2.6.14` branch to `master` branch without a formal "merging". Integrator[[Integrator]] ------------------------ A fairly central person acting as the integrator in a group project receives changes made by others, reviews and integrates them and publishes the result for others to use, using these commands in addition to the ones needed by participants. * linkgit:git-am[1] to apply patches e-mailed in from your contributors. * linkgit:git-pull[1] to merge from your trusted lieutenants. * linkgit:git-format-patch[1] to prepare and send suggested alternative to contributors. * linkgit:git-revert[1] to undo botched commits. * linkgit:git-push[1] to publish the bleeding edge. Examples ~~~~~~~~ My typical Git day.:: + ------------ $ git status <1> $ git show-branch <2> $ mailx <3> & s 2 3 4 5 ./+to-apply & s 7 8 ./+hold-linus & q $ git checkout -b topic/one master $ git am -3 -i -s -u ./+to-apply <4> $ compile/test $ git checkout -b hold/linus && git am -3 -i -s -u ./+hold-linus <5> $ git checkout topic/one && git rebase master <6> $ git checkout pu && git reset --hard next <7> $ git merge topic/one topic/two && git merge hold/linus <8> $ git checkout maint $ git cherry-pick master~4 <9> $ compile/test $ git tag -s -m "GIT 0.99.9x" v0.99.9x <10> $ git fetch ko && git show-branch master maint 'tags/ko-*' <11> $ git push ko <12> $ git push ko v0.99.9x <13> ------------ + <1> see what I was in the middle of doing, if any. <2> see what topic branches I have and think about how ready they are. <3> read mails, save ones that are applicable, and save others that are not quite ready. <4> apply them, interactively, with my sign-offs. <5> create topic branch as needed and apply, again with my sign-offs. <6> rebase internal topic branch that has not been merged to the master, nor exposed as a part of a stable branch. <7> restart `pu` every time from the next. <8> and bundle topic branches still cooking. <9> backport a critical fix. <10> create a signed tag. <11> make sure I did not accidentally rewind master beyond what I already pushed out. `ko` shorthand points at the repository I have at kernel.org, and looks like this: + ------------ $ cat .git/remotes/ko URL: kernel.org:/pub/scm/git/git.git Pull: master:refs/tags/ko-master Pull: next:refs/tags/ko-next Pull: maint:refs/tags/ko-maint Push: master Push: next Push: +pu Push: maint ------------ + In the output from `git show-branch`, `master` should have everything `ko-master` has, and `next` should have everything `ko-next` has. <12> push out the bleeding edge. <13> push the tag out, too. Repository Administration[[Repository Administration]] ------------------------------------------------------ A repository administrator uses the following tools to set up and maintain access to the repository by developers. * linkgit:git-daemon[1] to allow anonymous download from repository. * linkgit:git-shell[1] can be used as a 'restricted login shell' for shared central repository users. link:howto/update-hook-example.txt[update hook howto] has a good example of managing a shared central repository. Examples ~~~~~~~~ We assume the following in /etc/services:: + ------------ $ grep 9418 /etc/services git 9418/tcp # Git Version Control System ------------ Run git-daemon to serve /pub/scm from inetd.:: + ------------ $ grep git /etc/inetd.conf git stream tcp nowait nobody \ /usr/bin/git-daemon git-daemon --inetd --export-all /pub/scm ------------ + The actual configuration line should be on one line. Run git-daemon to serve /pub/scm from xinetd.:: + ------------ $ cat /etc/xinetd.d/git-daemon # default: off # description: The Git server offers access to Git repositories service git { disable = no type = UNLISTED port = 9418 socket_type = stream wait = no user = nobody server = /usr/bin/git-daemon server_args = --inetd --export-all --base-path=/pub/scm log_on_failure += USERID } ------------ + Check your xinetd(8) documentation and setup, this is from a Fedora system. Others might be different. Give push/pull only access to developers.:: + ------------ $ grep git /etc/passwd <1> alice:x:1000:1000::/home/alice:/usr/bin/git-shell bob:x:1001:1001::/home/bob:/usr/bin/git-shell cindy:x:1002:1002::/home/cindy:/usr/bin/git-shell david:x:1003:1003::/home/david:/usr/bin/git-shell $ grep git /etc/shells <2> /usr/bin/git-shell ------------ + <1> log-in shell is set to /usr/bin/git-shell, which does not allow anything but `git push` and `git pull`. The users should get an ssh access to the machine. <2> in many distributions /etc/shells needs to list what is used as the login shell. CVS-style shared repository.:: + ------------ $ grep git /etc/group <1> git:x:9418:alice,bob,cindy,david $ cd /home/devo.git $ ls -l <2> lrwxrwxrwx 1 david git 17 Dec 4 22:40 HEAD -> refs/heads/master drwxrwsr-x 2 david git 4096 Dec 4 22:40 branches -rw-rw-r-- 1 david git 84 Dec 4 22:40 config -rw-rw-r-- 1 david git 58 Dec 4 22:40 description drwxrwsr-x 2 david git 4096 Dec 4 22:40 hooks -rw-rw-r-- 1 david git 37504 Dec 4 22:40 index drwxrwsr-x 2 david git 4096 Dec 4 22:40 info drwxrwsr-x 4 david git 4096 Dec 4 22:40 objects drwxrwsr-x 4 david git 4096 Nov 7 14:58 refs drwxrwsr-x 2 david git 4096 Dec 4 22:40 remotes $ ls -l hooks/update <3> -r-xr-xr-x 1 david git 3536 Dec 4 22:40 update $ cat info/allowed-users <4> refs/heads/master alice\|cindy refs/heads/doc-update bob refs/tags/v[0-9]* david ------------ + <1> place the developers into the same git group. <2> and make the shared repository writable by the group. <3> use update-hook example by Carl from Documentation/howto/ for branch policy control. <4> alice and cindy can push into master, only bob can push into doc-update. david is the release manager and is the only person who can create and push version tags. HTTP server to support dumb protocol transfer.:: + ------------ dev$ git update-server-info <1> dev$ ftp user@isp.example.com <2> ftp> cp -r .git /home/user/myproject.git ------------ + <1> make sure your info/refs and objects/info/packs are up-to-date <2> upload to public HTTP server hosted by your ISP.
Upload File
Create Folder