├── .github └── workflows │ ├── pr-build.yml │ └── release-on-merge.yml ├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE.asc ├── README.asc ├── Rakefile ├── TRANSLATION_NOTES.asc ├── atlas.json ├── book ├── 01-introduction │ ├── 1-introduction.asc │ ├── images │ │ ├── areas.png │ │ ├── centralized.png │ │ ├── deltas.png │ │ ├── distributed.png │ │ ├── git-osx-installer.png │ │ ├── local.png │ │ └── snapshots.png │ └── sections │ │ ├── about-version-control.asc │ │ ├── basics.asc │ │ ├── command-line.asc │ │ ├── first-time-setup.asc │ │ ├── help.asc │ │ ├── history.asc │ │ └── installing.asc ├── 02-git-basics │ ├── 1-git-basics.asc │ ├── images │ │ └── lifecycle.png │ └── sections │ │ ├── aliases.asc │ │ ├── getting-a-repository.asc │ │ ├── recording-changes.asc │ │ ├── remotes.asc │ │ ├── tagging.asc │ │ ├── undoing.asc │ │ └── viewing-history.asc ├── 03-git-branching │ ├── 1-git-branching.asc │ ├── images │ │ ├── advance-master.png │ │ ├── advance-testing.png │ │ ├── basic-branching-1.png │ │ ├── basic-branching-2.png │ │ ├── basic-branching-3.png │ │ ├── basic-branching-4.png │ │ ├── basic-branching-5.png │ │ ├── basic-branching-6.png │ │ ├── basic-merging-1.png │ │ ├── basic-merging-2.png │ │ ├── basic-rebase-1.png │ │ ├── basic-rebase-2.png │ │ ├── basic-rebase-3.png │ │ ├── basic-rebase-4.png │ │ ├── branch-and-history.png │ │ ├── checkout-master.png │ │ ├── commit-and-tree.png │ │ ├── commits-and-parents.png │ │ ├── head-to-master.png │ │ ├── head-to-testing.png │ │ ├── interesting-rebase-1.png │ │ ├── interesting-rebase-2.png │ │ ├── interesting-rebase-3.png │ │ ├── interesting-rebase-4.png │ │ ├── interesting-rebase-5.png │ │ ├── lr-branches-1.png │ │ ├── lr-branches-2.png │ │ ├── perils-of-rebasing-1.png │ │ ├── perils-of-rebasing-2.png │ │ ├── perils-of-rebasing-3.png │ │ ├── perils-of-rebasing-4.png │ │ ├── perils-of-rebasing-5.png │ │ ├── remote-branches-1.png │ │ ├── remote-branches-2.png │ │ ├── remote-branches-3.png │ │ ├── remote-branches-4.png │ │ ├── remote-branches-5.png │ │ ├── topic-branches-1.png │ │ ├── topic-branches-2.png │ │ └── two-branches.png │ └── sections │ │ ├── basic-branching-and-merging.asc │ │ ├── branch-management.asc │ │ ├── nutshell.asc │ │ ├── rebasing.asc │ │ ├── remote-branches.asc │ │ └── workflows.asc ├── 04-git-server │ ├── 1-git-server.asc │ ├── images │ │ ├── bitnami.png │ │ ├── git-instaweb.png │ │ ├── gitlab-broadcast.png │ │ ├── gitlab-groups.png │ │ ├── gitlab-menu.png │ │ └── gitlab-users.png │ └── sections │ │ ├── generating-ssh-key.asc │ │ ├── git-daemon.asc │ │ ├── git-on-a-server.asc │ │ ├── gitlab.asc │ │ ├── gitweb.asc │ │ ├── hosted.asc │ │ ├── protocols.asc │ │ ├── setting-up-server.asc │ │ └── smart-http.asc ├── 05-distributed-git │ ├── 1-distributed-git.asc │ ├── images │ │ ├── benevolent-dictator.png │ │ ├── centralized.png │ │ ├── git-diff-check.png │ │ ├── integration-manager.png │ │ ├── large-merges-1.png │ │ ├── large-merges-2.png │ │ ├── managed-team-1.png │ │ ├── managed-team-2.png │ │ ├── managed-team-3.png │ │ ├── managed-team-flow.png │ │ ├── merging-workflows-1.png │ │ ├── merging-workflows-2.png │ │ ├── merging-workflows-3.png │ │ ├── merging-workflows-4 2.png │ │ ├── merging-workflows-4.png │ │ ├── merging-workflows-5.png │ │ ├── public-small-1.png │ │ ├── public-small-2.png │ │ ├── public-small-3.png │ │ ├── rebasing-1.png │ │ ├── rebasing-2.png │ │ ├── small-team-1.png │ │ ├── small-team-2.png │ │ ├── small-team-3.png │ │ ├── small-team-4.png │ │ ├── small-team-5.png │ │ ├── small-team-6.png │ │ ├── small-team-7.png │ │ └── small-team-flow.png │ └── sections │ │ ├── contributing.asc │ │ ├── distributed-workflows.asc │ │ └── maintaining.asc ├── 06-github │ ├── 1-github.asc │ ├── callouts │ │ ├── 1.pdf │ │ ├── 1.png │ │ ├── 10.pdf │ │ ├── 10.png │ │ ├── 2.pdf │ │ ├── 2.png │ │ ├── 3.pdf │ │ ├── 3.png │ │ ├── 4.pdf │ │ ├── 4.png │ │ ├── 5.pdf │ │ ├── 5.png │ │ ├── 6.pdf │ │ ├── 6.png │ │ ├── 7.pdf │ │ ├── 7.png │ │ ├── 8.pdf │ │ ├── 8.png │ │ ├── 9.pdf │ │ └── 9.png │ ├── images │ │ ├── 2fa-1.png │ │ ├── account-settings.png │ │ ├── avatar-crop.png │ │ ├── blink-01-start.png │ │ ├── blink-02-pr.png │ │ ├── blink-03-pull-request-open.png │ │ ├── blink-04-email.png │ │ ├── blink-04-pr-comment.png │ │ ├── blink-05-general-comment.png │ │ ├── blink-06-final.png │ │ ├── blink-pull-request-open copy.png │ │ ├── blink-pull-request-open.png │ │ ├── collaborators.png │ │ ├── email-settings.png │ │ ├── emoji.png │ │ ├── forkbutton.png │ │ ├── hubot.png │ │ ├── maint-01-email.png │ │ ├── maint-02-merge.png │ │ ├── maint-03-email-resp.png │ │ ├── maint-04-target.png │ │ ├── maint-05-mentions.png │ │ ├── maint-06-unsubscribe.png │ │ ├── maint-07-notifications.png │ │ ├── maint-08-notifications-page.png │ │ ├── maint-09-contrib.png │ │ ├── maint-10-default-branch.png │ │ ├── maint-11-transfer.png │ │ ├── markdown-01-example.png │ │ ├── markdown-02-tasks.png │ │ ├── markdown-03-task-summary.png │ │ ├── markdown-04-fenced-code.png │ │ ├── markdown-05-quote.png │ │ ├── markdown-06-emoji-complete.png │ │ ├── markdown-07-emoji.png │ │ ├── markdown-08-drag-drop.png │ │ ├── mentions-01-syntax.png │ │ ├── mentions-02-render.png │ │ ├── mentions-03-closed.png │ │ ├── new-repo.png │ │ ├── neworg.png │ │ ├── newrepo.png │ │ ├── newrepoform.png │ │ ├── notifications.png │ │ ├── orgs-01-page.png │ │ ├── orgs-02-teams.png │ │ ├── orgs-03-audit.png │ │ ├── pr-01-fail.png │ │ ├── pr-02-merge-fix.png │ │ ├── reposettingslink.png │ │ ├── scripting-01-services.png │ │ ├── scripting-02-email-service.png │ │ ├── scripting-03-webhook.png │ │ ├── scripting-04-webhook-debug.png │ │ ├── scripting-05-access-token.png │ │ ├── scripting-06-comment.png │ │ ├── scripting-07-status.png │ │ ├── signup.png │ │ ├── ssh-keys.png │ │ └── your-profile.png │ └── sections │ │ ├── 1-setting-up-account.asc │ │ ├── 2-contributing.asc │ │ ├── 3-maintaining.asc │ │ ├── 4-managing-organization.asc │ │ └── 5-scripting.asc ├── 07-git-tools │ ├── 1-git-tools.asc │ ├── callouts │ │ ├── 1.pdf │ │ ├── 1.png │ │ ├── 10.pdf │ │ ├── 10.png │ │ ├── 2.pdf │ │ ├── 2.png │ │ ├── 3.pdf │ │ ├── 3.png │ │ ├── 4.pdf │ │ ├── 4.png │ │ ├── 5.pdf │ │ ├── 5.png │ │ ├── 6.pdf │ │ ├── 6.png │ │ ├── 7.pdf │ │ ├── 7.png │ │ ├── 8.pdf │ │ ├── 8.png │ │ ├── 9.pdf │ │ └── 9.png │ ├── git-credential-read-only │ ├── images │ │ ├── double-dot.png │ │ ├── replace1.png │ │ ├── replace2.png │ │ ├── replace3.png │ │ ├── replace4.png │ │ ├── replace5.png │ │ ├── rerere1.png │ │ ├── rerere2.png │ │ ├── rerere3.png │ │ ├── reset-checkout.png │ │ ├── reset-ex1.png │ │ ├── reset-ex2.png │ │ ├── reset-ex3.png │ │ ├── reset-ex4.png │ │ ├── reset-ex5.png │ │ ├── reset-ex6.png │ │ ├── reset-hard.png │ │ ├── reset-mixed.png │ │ ├── reset-path1.png │ │ ├── reset-path2.png │ │ ├── reset-path3.png │ │ ├── reset-soft.png │ │ ├── reset-squash-r1.png │ │ ├── reset-squash-r2.png │ │ ├── reset-squash-r3.png │ │ ├── reset-start.png │ │ ├── reset-workflow.png │ │ ├── undomerge-reset.png │ │ ├── undomerge-revert.png │ │ ├── undomerge-revert2.png │ │ ├── undomerge-revert3.png │ │ └── undomerge-start.png │ └── sections │ │ ├── advanced-merging.asc │ │ ├── bundling.asc │ │ ├── credentials.asc │ │ ├── debugging.asc │ │ ├── interactive-staging.asc │ │ ├── notes.asc │ │ ├── replace.asc │ │ ├── rerere.asc │ │ ├── reset.asc │ │ ├── revision-selection.asc │ │ ├── rewriting-history.asc │ │ ├── searching.asc │ │ ├── signing.asc │ │ ├── stashing-cleaning.asc │ │ ├── submodules.asc │ │ └── subtree-merges.asc ├── 08-customizing-git │ ├── 1-customizing-git.asc │ ├── images │ │ ├── clean.png │ │ ├── p4merge.png │ │ └── smudge.png │ └── sections │ │ ├── attributes.asc │ │ ├── config.asc │ │ ├── hooks.asc │ │ └── policy.asc ├── 09-git-and-other-scms │ ├── 1-git-and-other-scms.asc │ ├── images │ │ ├── git-fusion-boot.png │ │ ├── git-fusion-perforce-graph.png │ │ └── git-tfs-ct.png │ └── sections │ │ ├── client-hg.asc │ │ ├── client-p4.asc │ │ ├── client-svn.asc │ │ ├── client-tfs.asc │ │ ├── import-custom.asc │ │ ├── import-hg.asc │ │ ├── import-p4.asc │ │ ├── import-svn.asc │ │ └── import-tfs.asc ├── 10-git-internals │ ├── 1-git-internals.asc │ ├── images │ │ ├── data-model-1.png │ │ ├── data-model-2.png │ │ ├── data-model-3.png │ │ └── data-model-4.png │ └── sections │ │ ├── environment.asc │ │ ├── maintenance.asc │ │ ├── objects.asc │ │ ├── packfiles.asc │ │ ├── plumbing-porcelain.asc │ │ ├── refs.asc │ │ ├── refspec.asc │ │ └── transfer-protocols.asc ├── A-git-in-other-environments │ ├── 1-git-other-environments.asc │ ├── images │ │ ├── branch_widget_mac.png │ │ ├── branch_widget_win.png │ │ ├── egit.png │ │ ├── git-bash.png │ │ ├── git-gui.png │ │ ├── github_mac.png │ │ ├── github_win.png │ │ ├── gitk.png │ │ ├── posh-git.png │ │ ├── vs-1.png │ │ ├── vs-2.png │ │ ├── zsh-oh-my.png │ │ └── zsh-prompt.png │ └── sections │ │ ├── bash.asc │ │ ├── eclipse.asc │ │ ├── guis.asc │ │ ├── powershell.asc │ │ ├── visualstudio.asc │ │ └── zsh.asc ├── B-embedding-git │ ├── 1-embedding-git.asc │ └── sections │ │ ├── command-line.asc │ │ ├── jgit.asc │ │ └── libgit2.asc ├── C-git-commands │ └── 1-git-commands.asc ├── contributors.asc ├── cover.html ├── cover.png ├── index.asc ├── introduction.asc ├── preface.asc └── toc.asc ├── callouts ├── 1.pdf ├── 1.png ├── 10.pdf ├── 10.png ├── 2.pdf ├── 2.png ├── 3.pdf ├── 3.png ├── 4.pdf ├── 4.png ├── 5.pdf ├── 5.png ├── 6.pdf ├── 6.png ├── 7.pdf ├── 7.png ├── 8.pdf ├── 8.png ├── 9.pdf └── 9.png ├── diagram-source └── progit.sketch ├── progit.asc ├── proposal.md ├── status.json └── theme ├── epub ├── epub.css └── epub.xsl ├── html ├── html.css └── html.xsl ├── mobi ├── mobi.css └── mobi.xsl └── pdf ├── pdf.css ├── pdf.xsl └── pdf.xsl~ /.github/workflows/pr-build.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Build 2 | 3 | on: 4 | pull_request: 5 | branches: [ main, master ] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | 13 | - name: Download bootstrap file 14 | run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh 15 | - name: Run bootstrap 16 | run: sh bootstrap.sh 17 | - name: Set up Ruby 18 | uses: ruby/setup-ruby@v1 19 | with: 20 | ruby-version: 2.7 21 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 22 | 23 | - name: Build book 24 | run: bundle exec rake book:build_action 25 | -------------------------------------------------------------------------------- /.github/workflows/release-on-merge.yml: -------------------------------------------------------------------------------- 1 | name: Release on push to main 2 | 3 | on: 4 | push: 5 | branches: [ main, master ] 6 | 7 | jobs: 8 | release: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | with: 13 | fetch-depth: 0 14 | - name: get bootstrap file 15 | run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh 16 | - name: run bootstrap 17 | run: sh bootstrap.sh 18 | - name: Compute tag name 19 | id: compute-tag 20 | run: | 21 | echo Computing next tag number 22 | LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3) 23 | PATCH=$(($LASTPATCH+1)) 24 | echo "::set-output name=tagname::2.1.${PATCH}" 25 | echo "::set-output name=branch::${GITHUB_REF#refs/heads/}" 26 | 27 | - name: Set up Ruby 28 | uses: ruby/setup-ruby@v1 29 | with: 30 | ruby-version: 2.7 31 | bundler-cache: true # runs 'bundle install' and caches installed gems automatically 32 | 33 | - name: Build release assets 34 | run: bundle exec rake book:build_action 35 | 36 | - name: Create release 37 | uses: ncipollo/release-action@v1 38 | with: 39 | token: ${{ secrets.GITHUB_TOKEN }} 40 | tag: ${{ steps.compute-tag.outputs.tagname }} 41 | commit: ${{ steps.compute-tag.outputs.branch }} 42 | artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html' 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | output 2 | .DS_Store 3 | 4 | # build artifacts 5 | progit.html 6 | progit.pdf 7 | progit.pdfmarks 8 | progit.epub 9 | progit-kf8.epub 10 | progit.mobi 11 | images/ 12 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rake', ' 13.0.1' 4 | gem 'asciidoctor', '2.0.12' 5 | 6 | gem 'json', '2.4.1' 7 | gem 'awesome_print', '1.8.0' 8 | 9 | gem 'asciidoctor-epub3', '1.5.0.alpha.19' 10 | gem 'asciidoctor-pdf', '1.5.3' 11 | 12 | gem 'coderay', '1.1.3' 13 | gem 'pygments.rb', '1.2.1' 14 | gem 'thread_safe', '0.3.6' 15 | gem 'epubcheck-ruby', '4.2.4.0' 16 | gem 'html-proofer', '3.18.2' 17 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | Ascii85 (1.0.3) 5 | addressable (2.7.0) 6 | public_suffix (>= 2.0.2, < 5.0) 7 | afm (0.2.2) 8 | asciidoctor (2.0.12) 9 | asciidoctor-epub3 (1.5.0.alpha.19) 10 | asciidoctor (>= 1.5.6, < 3.0.0) 11 | gepub (~> 1.0.0) 12 | mime-types (~> 3.0) 13 | asciidoctor-pdf (1.5.3) 14 | asciidoctor (>= 1.5.3, < 3.0.0) 15 | concurrent-ruby (~> 1.1.0) 16 | prawn (~> 2.2.0) 17 | prawn-icon (~> 2.5.0) 18 | prawn-svg (~> 0.30.0) 19 | prawn-table (~> 0.2.0) 20 | prawn-templates (~> 0.1.0) 21 | safe_yaml (~> 1.0.0) 22 | thread_safe (~> 0.3.0) 23 | treetop (~> 1.6.0) 24 | ttfunk (~> 1.5.0, >= 1.5.1) 25 | awesome_print (1.8.0) 26 | coderay (1.1.3) 27 | concurrent-ruby (1.1.7) 28 | css_parser (1.7.1) 29 | addressable 30 | epubcheck-ruby (4.2.4.0) 31 | ethon (0.12.0) 32 | ffi (>= 1.3.0) 33 | ffi (1.14.0) 34 | gepub (1.0.12) 35 | nokogiri (>= 1.8.2, < 1.11) 36 | rubyzip (> 1.1.1, < 2.4) 37 | hashery (2.1.2) 38 | html-proofer (3.18.2) 39 | addressable (~> 2.3) 40 | mercenary (~> 0.3) 41 | nokogumbo (~> 2.0) 42 | parallel (~> 1.3) 43 | rainbow (~> 3.0) 44 | typhoeus (~> 1.3) 45 | yell (~> 2.0) 46 | json (2.4.1) 47 | mercenary (0.4.0) 48 | mime-types (3.3.1) 49 | mime-types-data (~> 3.2015) 50 | mime-types-data (3.2020.1104) 51 | mini_portile2 (2.4.0) 52 | multi_json (1.15.0) 53 | nokogiri (1.10.10) 54 | mini_portile2 (~> 2.4.0) 55 | nokogumbo (2.0.4) 56 | nokogiri (~> 1.8, >= 1.8.4) 57 | parallel (1.20.1) 58 | pdf-core (0.7.0) 59 | pdf-reader (2.4.1) 60 | Ascii85 (~> 1.0.0) 61 | afm (~> 0.2.1) 62 | hashery (~> 2.0) 63 | ruby-rc4 64 | ttfunk 65 | polyglot (0.3.5) 66 | prawn (2.2.2) 67 | pdf-core (~> 0.7.0) 68 | ttfunk (~> 1.5) 69 | prawn-icon (2.5.0) 70 | prawn (>= 1.1.0, < 3.0.0) 71 | prawn-svg (0.30.0) 72 | css_parser (~> 1.6) 73 | prawn (>= 0.11.1, < 3) 74 | prawn-table (0.2.2) 75 | prawn (>= 1.3.0, < 3.0.0) 76 | prawn-templates (0.1.2) 77 | pdf-reader (~> 2.0) 78 | prawn (~> 2.2) 79 | public_suffix (4.0.6) 80 | pygments.rb (1.2.1) 81 | multi_json (>= 1.0.0) 82 | rainbow (3.0.0) 83 | rake (13.0.1) 84 | ruby-rc4 (0.1.5) 85 | rubyzip (2.3.0) 86 | safe_yaml (1.0.5) 87 | thread_safe (0.3.6) 88 | treetop (1.6.11) 89 | polyglot (~> 0.3) 90 | ttfunk (1.5.1) 91 | typhoeus (1.4.0) 92 | ethon (>= 0.9.0) 93 | yell (2.2.2) 94 | 95 | PLATFORMS 96 | x86_64-darwin-19 97 | 98 | DEPENDENCIES 99 | asciidoctor (= 2.0.12) 100 | asciidoctor-epub3 (= 1.5.0.alpha.19) 101 | asciidoctor-pdf (= 1.5.3) 102 | awesome_print (= 1.8.0) 103 | coderay (= 1.1.3) 104 | epubcheck-ruby (= 4.2.4.0) 105 | html-proofer (= 3.18.2) 106 | json (= 2.4.1) 107 | pygments.rb (= 1.2.1) 108 | rake (= 13.0.1) 109 | thread_safe (= 0.3.6) 110 | 111 | BUNDLED WITH 112 | 2.2.2 113 | -------------------------------------------------------------------------------- /LICENSE.asc: -------------------------------------------------------------------------------- 1 | Buku ini dirilis dengan lisensi Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Untuk membaca salinan lisensi ini, kunjungi http://creativecommons.org/licenses/by-nc-sa/3.0/ atau kirimkan surat kepada Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. 2 | -------------------------------------------------------------------------------- /README.asc: -------------------------------------------------------------------------------- 1 | = Pro Git, Edisi Kedua 2 | 3 | Selamat membaca edisi kedua dari buku Pro Git. 4 | 5 | Versi Bahasa Inggris dari buku ini dapat diakses di alamat: http://git-scm.com/book 6 | 7 | Seperti halnya edisi pertama, edisi kedua dari Pro Git merupakan proyek open source di bawah lisensi Creative Commons. 8 | 9 | Beberapa hal telah berubah sejak edisi pertama dirilis sebagai proyek open source. Salah satunya adalah dengan mengganti format Markdown menjadi AsciiDoc. Kami juga telah menggunakan layanan https://atlas.oreilly.com[Atlas O'Reilly] untuk menghasilkan buku elektronik dalam berbagai format dan berbagai bahasa. 10 | 11 | Kami juga telah memindahkan repositori terjemahan ke dalam repositori yang berbeda dari repositori Bahasa Inggris. Baca bagian Terjemahan untuk informasi lebih lanjut. 12 | 13 | == Berkontribusi 14 | 15 | Untuk berkontribusi dengan mengirimkan perbaikan atau konten baru, pembaca perlu melakukan Pull Request di GitHub. Sebelum melakukan Pull Request, alangkah baiknya jika kita membuka issue baru dan mereferensikannya untuk memastikan kontribusi yang kita lakukan diterima. 16 | 17 | Perbaikan akan diterima jika kami setuju bahwa perbaikan tersebut akan meningkatkan kualitas konten. Pembaca juga dapat membuka issue baru sehingga kami dapat menentukan apakah perbaikan tersebut perlu untuk dilakukan. 18 | 19 | == Bagaimana Cara Menghasilkan Versi Digital Buku Ini 20 | 21 | Ada dua cara untuk menghasilkan buku digital dari source code ini. 22 | 23 | Cara yang paling mudah adalah dengan menyerahkannya kepada penulis. Sebuah program telah siap sedia untuk memproses branch utama repositori ini untuk memproduksi buku digital secara otomatis untuk semua pembaca. 24 | 25 | Versi terakhir Bahasa Indonesia dapat diakses di https://git-scm.com/book/id/v1[] dan informasi yang lebih lengkap tentang versi-versi yang pernah dipublikasikan sebelumnya tersedia di https://progit.org[]. 26 | 27 | Cara lainnya ialah dengan menggunakan Asciidoctor. Jika perintah di bawah ini dieksekusi kita akan mendapatkan buku ini dalam bentuk HTML, Epub, Mobi dan PDF. 28 | 29 | ---- 30 | $ bundle install 31 | $ bundle exec rake book:build 32 | Converting to HTML... 33 | -- HTML output at progit.html 34 | Converting to EPub... 35 | -- Epub output at progit.epub 36 | Converting to Mobi (kf8)... 37 | -- Mobi output at progit.mobi 38 | Converting to PDF... 39 | -- PDF output at progit.pdf 40 | ---- 41 | 42 | Perintah di atas membutuhkan `asciidoctor`, `asciidoctor-pdf` dan `asciidoctor-epub`. 43 | 44 | == Penerjemahan 45 | 46 | Versi asli buku ini menggunakan Bahasa Inggris dan dapat dilihat di https://github.com/progit[progit organization on GitHub]. Tiap terjemahan dalam bahasa lain disimpan di dalam repositori tersebut. Semua orang dapat berkontribusi termasuk pembaca yang saat ini sedang mengakses repositori ini. 47 | 48 | Untuk versi Bahasa Indonesia dikerjakan oleh https://github.com/progit/progit2-id/graphs/contributors[Para Kontributor]. Jika pembaca tertarik untuk ikut serta menerjemahkan atau ingin mengoreksi kesalahan terjemahan yang ada, jangan sungkan untuk menambahkannya. Info lengkap untuk semua terjemahan buku ini dapat dilihat di http://progit.org/translations[]. 49 | 50 | === Bagaimana Caranya Bergabung? 51 | 52 | Semua orang bisa bergabung untuk menerjemahkan buku ini tanpa terkecuali. Untuk saat ini, silahkan buka [issue berikut](https://github.com/progit/progit2-id/issues/19), lalu pilih file yang ingin mulai diterjemahkan. 53 | 54 | === Daftar Penerjemah Bahasa Indonesia 55 | 56 | http://sebagiskode.net[Bagus Aji Santoso] 57 | 58 | == Gambar-gambar 59 | 60 | Gambar-gambar yang ada dibuku ini digambar menggunakan http://bohemiancoding.com/sketch/[Sketch 3]. Aplikasi ini dapat pembaca lihat di link:diagram-source/progit.sketch[included sketchbook file]. 61 | 62 | Untuk menambahkan gambar: 63 | 64 | . Tambah semuah halaman di sketchbook. Usahakan untuk menggunakan simbol yang telah ada. 65 | . Tambahkan sebuah ``slice'' di halaman yang dibuat. Berikan nama yang sesuai dengan nama file PNG gambar tersebut, relatif terhadap direktori source code buku ini. 66 | . Pastikan slice menggunakan ukuran 3x. 67 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | namespace :book do 2 | desc 'prepare build' 3 | task :prebuild do 4 | Dir.mkdir 'images' unless Dir.exists? 'images' 5 | Dir.glob("book/*/images/*").each do |image| 6 | FileUtils.copy(image, "images/" + File.basename(image)) 7 | end 8 | end 9 | 10 | desc 'build basic book formats' 11 | task :build => :prebuild do 12 | puts "Converting to HTML..." 13 | `bundle exec asciidoctor progit.asc` 14 | puts " -- HTML output at progit.html" 15 | 16 | puts "Converting to EPub..." 17 | `bundle exec asciidoctor-epub3 progit.asc` 18 | puts " -- Epub output at progit.epub" 19 | 20 | puts "Converting to Mobi (kf8)..." 21 | `bundle exec asciidoctor-epub3 -a ebook-format=kf8 progit.asc` 22 | puts " -- Mobi output at progit.mobi" 23 | 24 | puts "Converting to PDF... (this one takes a while)" 25 | `bundle exec asciidoctor-pdf progit.asc 2>/dev/null` 26 | puts " -- PDF output at progit.pdf" 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /TRANSLATION_NOTES.asc: -------------------------------------------------------------------------------- 1 | == Catatan Terjemahan 2 | 3 | Repositori ini berisi terjemahan untuk buku Pro Git 2. Buku ini diterjemahkan dalam rangka memudahkan pembaca yang kesulitan untuk menggunakan buku Pro Git 2 yang menggunakan bahasa Inggris. Jangan sungkan untuk ikut berkontribusi dalam terjemahan ini. 4 | 5 | == Bagaimana Cara Ikut Menerjemahkan? 6 | 7 | Pertama, _fork_ repositori buku Pro Git 2 di https://github.com/progit/progit2-id[https://github.com/progit/progit2-id] 8 | 9 | Kedua, unduh repositori yang telah di fork ke komputer lokal dengan perintah: 10 | 11 | ``` 12 | $ git clone https://github.com/progit/progit2-id 13 | ``` 14 | 15 | Setelah proses unduhan selesai dengan sukses, akan muncul satu direktori baru bernama `progit2-id`. Akses direktori ini dengan perintah: 16 | 17 | ``` 18 | $ cd progit2-id 19 | ``` 20 | 21 | Di direktori `progit2-id` buatlah branch git baru dan berikan nama sesuai dengan apa yang ingin dilakukan. Sebagai contoh untuk menerjemahkan subbab about-version-control kita buat branch baru dengan nama: 22 | 23 | ``` 24 | $ git checkout -b 01-introduction-about-version-control 25 | Switched to a new branch '01-introduction-about-version-control' 26 | 27 | ``` 28 | 29 | Sekarang kita dapat mulai melakukan penerjemahan. Jangan lupa untuk mencatat perubahan saat penerjemahan telah selesai dilakukan dengan melakukan commit. 30 | 31 | ``` 32 | $ git add . 33 | $ git commit -m "New Bahasa translation for about-version-control.asc" 34 | ``` 35 | 36 | Selanjutnya untuk memperbarui repositori `progit2-id` di akun github kita, kita harus menggabungkan perubahan di branch yang telah di buat ke branch `master` terlebih dahulu. 37 | 38 | ``` 39 | $ git checkout master 40 | $ git merge 01-introduction-about-version-control 41 | ``` 42 | 43 | Untuk mengunggah perubahan yang sudah dilakukan di komputer lokal, gunakan perintah: 44 | 45 | ``` 46 | git push 47 | ``` 48 | 49 | Untuk menggabungkan perubahan yang kita lakukan ke repositori utama di https://github.com/progit/progit2-id[https://github.com/progit/progit2-id], buat `Pull Request` dari halaman repositori pribadi yang terdapat di https://github.com//progit2-id[https://github.com//progit2-id] 50 | 51 | == Editor Untuk Melakukan Penerjemahan 52 | 53 | Buku Pro Git 2 ditulis menggunakan teknologi AsciiDoc. Pada dasarnya, file AsciiDoc hanya file teks biasa sehingga dapat dibuka dengan berbagai teks editor. Anda dapat menggunakan Sublime Text, Atom, atau teks editor lain dan memasang plugin untuk melakukan _preview_ file berekstensi .asc. 54 | 55 | == Panduan Umum Ejaan Bahasa Indonesia 56 | 57 | Saat melakukan penerjemahan, ada baiknya sambil merujuk ke http://badanbahasa.kemdikbud.go.id/lamanbahasa/sites/default/files/PUEBI.pdf[Panduan Umum Ejaan Bahasa Indonesia] agar sesuai dengan ketentuan berbahasa Indonesia yang benar. 58 | 59 | 60 | === Status Terjemahan 61 | 62 | Terjemahan dimulai pada tanggal 23 Maret 2016 pukul 18:53. 63 | -------------------------------------------------------------------------------- /atlas.json: -------------------------------------------------------------------------------- 1 | { 2 | "branch": "master", 3 | "files": [ 4 | "book/cover.html", 5 | "LICENSE.asc", 6 | "book/preface.asc", 7 | "book/contributors.asc", 8 | "book/introduction.asc", 9 | "book/toc.asc", 10 | "book/01-introduction/1-introduction.asc", 11 | "book/02-git-basics/1-git-basics.asc", 12 | "book/03-git-branching/1-git-branching.asc", 13 | "book/04-git-server/1-git-server.asc", 14 | "book/05-distributed-git/1-distributed-git.asc", 15 | "book/06-github/1-github.asc", 16 | "book/07-git-tools/1-git-tools.asc", 17 | "book/08-customizing-git/1-customizing-git.asc", 18 | "book/09-git-and-other-scms/1-git-and-other-scms.asc", 19 | "book/10-git-internals/1-git-internals.asc", 20 | "book/A-git-in-other-environments/1-git-other-environments.asc", 21 | "book/B-embedding-git/1-embedding-git.asc", 22 | "book/C-git-commands/1-git-commands.asc", 23 | "book/index.asc" 24 | ], 25 | "formats": { 26 | "pdf": { 27 | "version": "web", 28 | "index": true, 29 | "toc": true, 30 | "syntaxhighlighting": true, 31 | "show_comments": false 32 | }, 33 | "epub": { 34 | "index": true, 35 | "toc": true, 36 | "epubcheck": false, 37 | "embedded_fonts": [ 38 | "fonts/DejaVuSerif.otf", 39 | "fonts/DejaVuSans-Bold.otf", 40 | "fonts/hold/UbuntuMono-Bold.otf", 41 | "fonts/hold/UbuntuMono-BoldItalic.otf", 42 | "fonts/hold/UbuntuMono-Regular.otf", 43 | "fonts/hold/UbuntuMono-Italic.otf" 44 | ], 45 | "syntaxhighlighting": true, 46 | "show_comments": false 47 | }, 48 | "mobi": { 49 | "index": true, 50 | "toc": true, 51 | "embedded_fonts": [ 52 | "fonts/DejaVuSerif.otf", 53 | "fonts/DejaVuSans-Bold.otf", 54 | "fonts/hold/UbuntuMono-Bold.otf", 55 | "fonts/hold/UbuntuMono-BoldItalic.otf", 56 | "fonts/hold/UbuntuMono-Regular.otf", 57 | "fonts/hold/UbuntuMono-Italic.otf" 58 | ], 59 | "syntaxhighlighting": true, 60 | "show_comments": false 61 | }, 62 | "html": { 63 | "index": true, 64 | "toc": true, 65 | "syntaxhighlighting": true, 66 | "show_comments": false, 67 | "consolidate": false, 68 | "consolidated": false 69 | } 70 | }, 71 | "theme": "oreillymedia/atlas_tech1c_theme", 72 | "title": "Pro Git" 73 | } 74 | -------------------------------------------------------------------------------- /book/01-introduction/1-introduction.asc: -------------------------------------------------------------------------------- 1 | [[_getting_started]] 2 | == Memulai 3 | 4 | Bab ini akan membahas tentang memulai dengan Git. 5 | Kita akan mulai dengan menjelaskan beberapa latar belakang pada peralatan _version control_, kemudian beralih ke bagaimana cara agar Git dapat berjalan pada sistem Anda, dan terakhir, bagaimana cara mengaturnya agar dapat mulai bekerja dengan Git. 6 | Pada akhir bab ini Anda seharusnya telah paham mengapa Git ada, mengapa sebaiknya Anda menggunakannya dan sebaiknya Anda sudah siap untuk melakukannya. 7 | 8 | include::sections/about-version-control.asc[] 9 | 10 | include::sections/history.asc[] 11 | 12 | include::sections/basics.asc[] 13 | 14 | include::sections/command-line.asc[] 15 | 16 | include::sections/installing.asc[] 17 | 18 | include::sections/first-time-setup.asc[] 19 | 20 | include::sections/help.asc[] 21 | 22 | === Kesimpulan 23 | 24 | Seharusnya Anda telah memiliki pemahaman dasar tentang apa itu Git dan bagaimana Git berbeda dari sistem _version control_ yang terpusat yang mungkin telah Anda gunakan sebelumnya. 25 | Sekarang, seharusnya Anda juga telah memiliki sebuah versi dari Git yang mampu bekerja pada sistem Anda yang telah diatur dengan identitas pribadi Anda. 26 | Sekarang saatnya untuk belajar beberapa dasar dari Git. 27 | -------------------------------------------------------------------------------- /book/01-introduction/images/areas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/areas.png -------------------------------------------------------------------------------- /book/01-introduction/images/centralized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/centralized.png -------------------------------------------------------------------------------- /book/01-introduction/images/deltas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/deltas.png -------------------------------------------------------------------------------- /book/01-introduction/images/distributed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/distributed.png -------------------------------------------------------------------------------- /book/01-introduction/images/git-osx-installer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/git-osx-installer.png -------------------------------------------------------------------------------- /book/01-introduction/images/local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/local.png -------------------------------------------------------------------------------- /book/01-introduction/images/snapshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/01-introduction/images/snapshots.png -------------------------------------------------------------------------------- /book/01-introduction/sections/command-line.asc: -------------------------------------------------------------------------------- 1 | === Command Line 2 | 3 | Ada banyak cara untuk menggunakan Git. 4 | Ada peralatan _command line_ asli, dan ada banyak antarmuka grafis pengguna dari berbagai kemampuan. 5 | Untuk buku ini, kita akan menggunakan Git dengan _command line_. 6 | Sebagai contoh, _command line_ adalah satu-satunya cara agar Anda dapat menjalankan *semua* perintah-perintah Git – kebanyakan GUI hanya menerapkan beberapa subset dari kegunaan Git agar lebih mudah. 7 | Jika Anda tahu bagaimana cara menjalankan versi _command line_, mungkin Anda juga menemukan bagaimana cara menjalankan versi GUI, meski kebalikannya belum tentu benar. 8 | Juga, ketika pilihan klien grafis Anda adalah masalah kesenangan pribadi, _semua_ pengguna akan memiliki peralatan _command line_ terpasang dan tersedia. 9 | 10 | Jadi, kami akan mengharap Anda untuk tahu bagaimana cara membuka Terminal di Mac atau Command Prompt atau Powershell di Windows. 11 | Jika Anda tidak tahu tentang apa yang sedang kita bicarakan di sini, mungkin Anda perlu berhenti dan mempelajari hal itu secepatnya sehingga Anda dapat mengikuti semua contoh-contoh dan penjelasan pada buku ini. 12 | -------------------------------------------------------------------------------- /book/01-introduction/sections/first-time-setup.asc: -------------------------------------------------------------------------------- 1 | [[_first_time]] 2 | === Pengaturan Awal Git 3 | 4 | Karena sekarang Anda telah memiliki Git pada sistem Anda, Anda mungkin ingin melakukan beberapa hal untuk mengatur lingkungan Git Anda. 5 | Sebaiknya Anda melakukan hal ini sekali pada setiap komputer yang diberikan; hal-hal ini akan tetap ada pada setiap peningkatan. 6 | Anda juga dapat mengubah pengaturan tersebut setiap saat dengan menjalankan kembali perintah-perintah tersebut. 7 | 8 | Git datang dengan sebuah alat bernama `git config` yang membolehkan Anda mendapatkan dan mengatur variabel-variabel pengaturan yang mengatur semua aspek tentang bagaimana Git tampak dan bekerja.(((git commands, config))) 9 | Variabel-variabel tersebut dapat disimpan pada tiga tempat yang berbeda: 10 | 11 | 1. Berkas `/etc/gitconfig`: Berisi nilai-nilai untuk setiap pengguna pada sistem dan semua _repository_ mereka. 12 | Jika Anda memberikan pilihan `--system` kepada `git config`, dia membaca dan menulis dari berkas ini secara khusus. 13 | 2. Berkas `~/.gitconfig` atau `~/.config/git/config`: Khusus untuk pengguna Anda. 14 | Anda dapat membuat Git membaca dan menulis ke berkas ini secara khusus dengan memberikan pilihan `--global`. 15 | 3. Berkas `config` dalam direktori Git (yaitu, `.git/config`) atau sebarang _repository_ yang sedang Anda gunakan: Khusus untuk _repository_ tunggal tersebut. 16 | 17 | Setiap tingkat menimpa nilai pada tingkat sebelumnya, jadi, nilai-nilai pada `.git/config` menimpa yang ada pada `/etc/gitconfig`. 18 | 19 | Pada sistem Windows, Git mencari berkas `.gitconfig` pada direktori `$HOME` (`C:\Users\$USER` untuk kebanyakan orang). 20 | Git juga tetap mencari `/etc/gitconfig`, meskipun terhubung kepada _MSys root_, yang mana di manapun Anda memilih untuk memasang Git pada sistem Windows Anda ketika Anda menjalankan pemasang Git. 21 | 22 | ==== Pengenal Anda 23 | 24 | Hal pertama yang sebaiknya Anda lakukan ketika memasang Git adalah menetapkan nama pengguna dan alamat surel. 25 | Ini penting, karena setiap _commit_ pada Git menggunakan informasi ini, dan itu dituliskan dan tidak dapat diganti ke dalam _commit_ yang Anda buat: 26 | 27 | [source,console] 28 | ---- 29 | $ git config --global user.name "John Doe" 30 | $ git config --global user.email johndoe@example.com 31 | ---- 32 | 33 | Sekali lagi, Anda hanya perlu melakukan ini sekali saja jika Anda memberikan pilihan `--global`, karena Git akan selalu menggunakan informasi tersebut untuk apapun yang Anda lakukan pada sistem tersebut. 34 | Jika Anda ingin menimpa ini dengan nama atau alamat surel yang berbeda untuk proyek tertentu, Anda dapat menjalankan perintah tanpa pilihan `--global` ketika Anda berada pada proyek tersebut. 35 | 36 | Banyak dari peralatan GUI akan membantu Anda melakukan hal ini ketika Anda menjalankannya pertama kali. 37 | 38 | ==== Penyunting Anda 39 | 40 | Sekarang, pengenal Anda telah siap, Anda dapat mengatur penyunting teks bawaan yang akan digunakan ketika Git memerlukan Anda untuk menuliskan pesan/ 41 | Jika tidak diatur, Git menggunakan penyunting teks bawaan pada sistem Anda, yang pada umumnya adalah Vim. 42 | Jika Anda ingin menggunakan penyunting teks yang berbeda, seperti Emacs, Anda dapat melakukan hal berikut: 43 | 44 | [source,console] 45 | ---- 46 | $ git config --global core.editor emacs 47 | ---- 48 | 49 | [WARNING] 50 | ==== 51 | Vim dan Emacs adalah penyunting teks terkenal yang sering digunakan oleh para pengembang pada sistem berdasarkan Unix seperti Linux dan Mac. Jika Anda tidak terbiasa dengan kedua penyunting tersebut atau berada pada sistem Windows, Anda mungkin perlu mencari arahan tentang bagaimana cara mengatur penyunting kesukaan Anda dengan Git. 52 | Jika Anda tidak menetapkan penyunting seperti ini dan Anda tidak tahu apa itu Vim atau Emacs, Anda akan mendapatkan hal yang membingungkan ketika mereka diluncurkan. 53 | ==== 54 | 55 | ==== Memeriksa Pengaturan Anda 56 | 57 | Jika Anda ingin memeriksa pengaturan Anda, Anda dapat menggunakan perintah `git config --list` untuk mendaftar semua pengaturan yang dapat ditemukan Git pada saat itu: 58 | 59 | [source,console] 60 | ---- 61 | $ git config --list 62 | user.name=John Doe 63 | user.email=johndoe@example.com 64 | color.status=auto 65 | color.branch=auto 66 | color.interactive=auto 67 | color.diff=auto 68 | ... 69 | ---- 70 | 71 | Anda mungkin melihat kunci-kunci lebih dari satu, karena Git membaca kunci yang sama dari berkas-berkas yang berbeda (`/etc/gitconfig` dan `~/.gitconfig`, contohnya). 72 | Dalam hal ini, Git menggunakan nilai terakhit dari setiap kunci unik yang dia lihat. 73 | 74 | Anda juga dapat memeriksa apa yang Git pikirkan dalam nilai kunci khusus dengan mengetikkan `git config `:(((git commands, config))) 75 | 76 | [source,console] 77 | ---- 78 | $ git config user.name 79 | John Doe 80 | ---- 81 | -------------------------------------------------------------------------------- /book/01-introduction/sections/help.asc: -------------------------------------------------------------------------------- 1 | [[_git_help]] 2 | === Mendapatkan Bantuan 3 | 4 | Jika Anda memerlukan bantuan ketika menggunakan Git, ada tiga cara untuk mendapatkan halaman petunjuk bantuan (_manual page_ atau manpage) untuk sebarang perintah Git: 5 | 6 | [source,console] 7 | ---- 8 | $ git help 9 | $ git --help 10 | $ man git- 11 | ---- 12 | 13 | Sebagai contoh, Anda dapat mendapatkan bantuan manpage untuk perintah config dengan menjalankan(((git commands, help))) 14 | 15 | [source,console] 16 | ---- 17 | $ git help config 18 | ---- 19 | 20 | Perintah-perintah tersebut bagus, karena Anda dapat mendapatkannya di mana saja, bahkan ketika luring. 21 | Jika manpage dan buku ini tidak cukup dan Anda memerlukan bantuan secara langsung, Anda dapat mencoba kanal `#git` atau `#github` pada _server_ Freenode IRC (irc.freenode.net.) 22 | Kanal-kanal tersebut diisi oleh ratusan orang yang sangat memahami tentang Git secara rutin dan seringkali bersedia untuk membantu.(((IRC))) 23 | -------------------------------------------------------------------------------- /book/01-introduction/sections/history.asc: -------------------------------------------------------------------------------- 1 | === Sejarah Singkat Git 2 | 3 | Bersamaan dengan banyak hal besar dalam hidup, Git dimulai dengan sedikit kehancuran kreatifitas dan pertentangan yang ganas. 4 | 5 | Kernel Linux adalah proyek perangkat lunak sumber terbuka dalam lingkup yang cukup besar.(((Linux))) 6 | Sebagian besar waktu pemeliharaan dari kernel Linux (1991-2002), perubahan-perubahan pada perangkat lunak diberikan sebagai _patch_ dan berkas terarsipkan. 7 | Pada 2002, proyek kernel Linux mulai menggunakan DVCS terpatenkan bernama BitKeeper.(((BitKeeper))) 8 | 9 | Pada 2005, hubungan antara komunitas yang mengembangkan kernel Linux dan perusahaan komersil yang mengembangkan BitKeeper terputus, dan status bebas biaya dari alatnya dicabut. 10 | Hal ini mendesak komunitas pengembangan Linux (khususnya Linus Torvalds, pencipta Linux) untuk mengembangkan alat mereka sendiri berdasarkan beberapa pelajaran yang telah mereka pelajari ketika menggunakan BitKeeper.(((Linus Torvalds))) 11 | Beberapa sasaran dari sistem baru tersebut adalah sebagai berikut: 12 | 13 | * Kecepatan 14 | * Rancangan yang sederhana 15 | * Dukungan yang kuat untuk pengembangan non-linier (ribuan cabang paralel) 16 | * Benar-benar tersebar 17 | * Mampu menangani proyek besar seperti Linux secara efisien (kecepatan dan ukuran data) 18 | 19 | Sejak kelahirannya pada 2005, Git telah berevolusi dan berkembang untuk dapat digunakan dengan mudah namun tetap memiliki kualitas awal tersebut. 20 | Git sangat cepat, sangat efisien dengan proyek-proyek besar, dan Git memiliki sistem percabangan yang hebat untuk pengembangan non-linear (Lihat <<_percabangan_git>>). 21 | -------------------------------------------------------------------------------- /book/02-git-basics/1-git-basics.asc: -------------------------------------------------------------------------------- 1 | [[_git_basics_chapter]] 2 | == Git Basics 3 | 4 | If you can read only one chapter to get going with Git, this is it. 5 | This chapter covers every basic command you need to do the vast majority of the things you'll eventually spend your time doing with Git. 6 | By the end of the chapter, you should be able to configure and initialize a repository, begin and stop tracking files, and stage and commit changes. 7 | We'll also show you how to set up Git to ignore certain files and file patterns, how to undo mistakes quickly and easily, how to browse the history of your project and view changes between commits, and how to push and pull from remote repositories. 8 | 9 | include::sections/getting-a-repository.asc[] 10 | 11 | include::sections/recording-changes.asc[] 12 | 13 | include::sections/viewing-history.asc[] 14 | 15 | include::sections/undoing.asc[] 16 | 17 | include::sections/remotes.asc[] 18 | 19 | include::sections/tagging.asc[] 20 | 21 | include::sections/aliases.asc[] 22 | 23 | === Summary 24 | 25 | At this point, you can do all the basic local Git operations – creating or cloning a repository, making changes, staging and committing those changes, and viewing the history of all the changes the repository has been through. 26 | Next, we'll cover Git's killer feature: its branching model. 27 | -------------------------------------------------------------------------------- /book/02-git-basics/images/lifecycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/02-git-basics/images/lifecycle.png -------------------------------------------------------------------------------- /book/02-git-basics/sections/aliases.asc: -------------------------------------------------------------------------------- 1 | [[_git_aliases]] 2 | === Alias Git 3 | 4 | (((aliases))) 5 | Sebelum kita menyelesaikan bab tentang Git dasar ini, hanya ada satu tip kecil yang bisa membuat pengalaman Git Anda lebih sederhana, mudah, dan lebih familiar: alias. 6 | Kami tidak akan merujuk atau menganggap Anda telah menggunakannya di buku ini, tetapi Anda mungkin harus tahu cara menggunakannya. 7 | 8 | Git tidak secara otomatis menyimpulkan _command_ Anda jika Anda mengetikkannya secara parsial. 9 | Jika Anda tidak ingin mengetik seluruh teks dari masing-masing _command_ Git, Anda dapat dengan mudah membuat sebuah alias untuk setiap _command_ menggunakan `git config`. (((git commands, config))) 10 | Berikut adalah beberapa contoh yang mungkin ingin Anda siapkan: 11 | 12 | [source,console] 13 | ---- 14 | $ git config --global alias.co checkout 15 | $ git config --global alias.br branch 16 | $ git config --global alias.ci commit 17 | $ git config --global alias.st status 18 | ---- 19 | 20 | Ini berarti, misalnya, sebagai ganti mengetik `git commit`, Anda hanya perlu mengetikkan `git ci`. 21 | Saat Anda terus menggunakan Git, Anda mungkin juga sering menggunakan _command_ lain; jangan ragu untuk membuat alias baru. 22 | 23 | Teknik ini juga sangat berguna dalam membuat _command_ yang menurut Anda harus ada. 24 | Misalnya, untuk memperbaiki masalah kegunaan yang Anda hadapi saat melakukan unstaging sebuah file, Anda dapat menambahkan alias unstage Anda sendiri ke Git: 25 | 26 | [source,console] 27 | ---- 28 | $ git config --global alias.unstage 'reset HEAD --' 29 | ---- 30 | 31 | Ini akan membuat dua _command_ yang setara dengan: 32 | 33 | [source,console] 34 | ---- 35 | $ git unstage fileA 36 | $ git reset HEAD fileA 37 | ---- 38 | 39 | Hal ini tampaknya sedikit lebih jelas. 40 | Secara umum juga bisa dengan menambahkan _command_ `last`, seperti ini: 41 | 42 | [source,console] 43 | ---- 44 | $ git config --global alias.last 'log -1 HEAD' 45 | ---- 46 | 47 | Dengan cara ini, Anda bisa melihat _commit_ terakhir dengan mudah: 48 | 49 | [source,console] 50 | ---- 51 | $ git last 52 | commit 66938dae3329c7aebe598c2246a8e6af90d04646 53 | Author: Josh Goebel 54 | Date: Tue Aug 26 19:48:51 2008 +0800 55 | 56 | test for current head 57 | 58 | Signed-off-by: Scott Chacon 59 | ---- 60 | 61 | Seperti yang Anda tahu, Git hanya mengganti _command_ baru dengan alias apapun yang Anda inginkan. 62 | Namun, mungkin Anda ingin menjalankan _command_ eksternal, bukan sub _command_ Git. 63 | Dalam hal ini, Anda memulai _command_ dengan karakter `!`. 64 | Ini berguna jika Anda menulis alat Anda sendiri yang bekerja dengan _repository_ Git. 65 | Kita bisa menunjukkan dengan alias `git visual` untuk menjalankan `gitk`: 66 | 67 | [source,console] 68 | ---- 69 | $ git config --global alias.visual "!gitk" 70 | ---- 71 | -------------------------------------------------------------------------------- /book/02-git-basics/sections/getting-a-repository.asc: -------------------------------------------------------------------------------- 1 | [[_getting_a_repo]] 2 | === Mendapatkan Repository Git 3 | 4 | Anda bisa mendapatkan _project_ Git menggunakan dua pendekatan utama. 5 | Pendekatan yang pertama mengambil _project_ atau direktori yang ada dan mengimpornya ke Git. 6 | Pendekatan yang kedua dengan melakukan _clone_ ke repositori Git yang ada dari server lain. 7 | 8 | ==== Menginisialisasi Repositori di Direktori yang Ada 9 | 10 | Jika Anda mulai melacak _project_ yang ada di Git, Anda perlu masuk ke direktori dan jenis proyek 11 | 12 | [source,console] 13 | ---- 14 | $ git init 15 | ---- 16 | 17 | Ini akan membuat sub direktori baru bernama `.git` yang berisi semua file repositori yang diperlukan - kerangka penyimpanan repositori Git. 18 | Pada titik ini, tidak ada yang dilacak dalam _project_ Anda. 19 | (Lihat <<_git_internals>> untuk informasi lebih lanjut tentang file apa saja yang terdapat di direktori `.git` yang baru saja Anda buat.)(((git commands, init))) 20 | 21 | Jika Anda ingin memulai mengendalikan-versi file yang ada (berlawanan dengan direktori kosong), Anda mungkin harus mulai melacak file-file tersebut dan melakukan _commit_ awal. 22 | Anda bisa mencapainya dengan beberapa perintah `git add` yang menentukan file yang ingin Anda lacak, diikuti dengan `git commit`: 23 | 24 | [source,console] 25 | ---- 26 | $ git add *.c 27 | $ git add LICENSE 28 | $ git commit -m 'initial project version' 29 | ---- 30 | 31 | Kita akan membahas apa yang diperintahkan _commands_ ini hanya dalam satu menit. 32 | Pada titik ini, Anda memiliki repositori Git dengan file yang dilacak dan _commit_ awal. 33 | 34 | [[_git_cloning]] 35 | ==== Menduplikat Repositori yang Ada 36 | 37 | Jika Anda ingin mendapatkan duplikat repositori Git yang ada - misalnya, sebuah _project_ yang ingin Anda kontribusikan - _command_ yang Anda butuhkan adalah `git clone`. 38 | Jika Anda terbiasa dengan sistem VCS lain seperti _Subversion_, Anda akan melihat bahwa _command_-nya adalah "clone" dan bukan "checkout". 39 | Setiap versi setiap file untuk sejarah _project_ ditarik secara default saat Anda menjalankan `git clone`. 40 | Sebenarnya, jika _disk server_ Anda rusak, Anda dapat sering menggunakan hampir semua duplikat pada klien mana pun untuk mengatur server kembali ke keadaan saat duplikat (Anda mungkin kehilangan beberapa kait sisi server dan semacamnya, tapi semua data berversi akan ada di sana - lihat <<_git_on_the_server>> untuk lebih jelasnya). 41 | 42 | Anda menduplikat sebuah repositori dengan `git clone [url]`. (((git commands, clone))) 43 | Misalnya, jika Anda ingin menduplikat pustaka yang terhubung dengan Git yang disebut libgit2, Anda dapat melakukannya seperti ini: 44 | 45 | [source,console] 46 | ---- 47 | $ git clone https://github.com/libgit2/libgit2 48 | ---- 49 | 50 | Ini membuat sebuah direktori bernama ``libgit2``, menginisialisasi direktori `.git` di dalamnya, menarik semua data untuk repositori tersebut, dan memeriksa salinan tugas versi terbaru. 51 | Jika Anda masuk ke direktori `libgit2` yang baru, Anda akan melihat file _project_ di sana, siap untuk dikerjakan atau digunakan. 52 | Jika Anda ingin menduplikat repositori ke dalam direktori yang bernama sesuatu selain ``libgit2``, Anda dapat menentukannya sebagai opsi baris _command_ berikutnya: 53 | 54 | [source,console] 55 | ---- 56 | $ git clone https://github.com/libgit2/libgit2 mylibgit 57 | ---- 58 | 59 | _Command_ itu melakukan hal yang sama seperti yang sebelumnya, tapi direktori targetnya disebut 'mylibgit`. 60 | 61 | Git memiliki sejumlah protokol transfer yang berbeda yang dapat Anda gunakan. 62 | Contoh sebelumnya menggunakan protokol `https://`, tetapi Anda juga bisa melihat `git://` atau `user@server:path/to/repo.git`, yang menggunakan protokol transfer SSH. 63 | <<_git_on_the_server>> akan memperkenalkan semua pilihan yang tersedia yang bisa diatur server untuk mengakses repositori Git Anda dengan membahas kelebihan dan kekurangan masing-masing pilihan. 64 | -------------------------------------------------------------------------------- /book/03-git-branching/1-git-branching.asc: -------------------------------------------------------------------------------- 1 | [[_git_branching]] 2 | == Git Branching 3 | 4 | (((branches))) 5 | Nearly every VCS has some form of branching support. 6 | Branching means you diverge from the main line of development and continue to do work without messing with that main line. 7 | In many VCS tools, this is a somewhat expensive process, often requiring you to create a new copy of your source code directory, which can take a long time for large projects. 8 | 9 | Some people refer to Git's branching model as its ``killer feature,'' and it certainly sets Git apart in the VCS community. 10 | Why is it so special? 11 | The way Git branches is incredibly lightweight, making branching operations nearly instantaneous, and switching back and forth between branches generally just as fast. 12 | Unlike many other VCSs, Git encourages workflows that branch and merge often, even multiple times in a day. 13 | Understanding and mastering this feature gives you a powerful and unique tool and can entirely change the way that you develop. 14 | 15 | include::sections/nutshell.asc[] 16 | 17 | include::sections/basic-branching-and-merging.asc[] 18 | 19 | include::sections/branch-management.asc[] 20 | 21 | include::sections/workflows.asc[] 22 | 23 | include::sections/remote-branches.asc[] 24 | 25 | include::sections/rebasing.asc[] 26 | 27 | === Summary 28 | 29 | We've covered basic branching and merging in Git. 30 | You should feel comfortable creating and switching to new branches, switching between branches and merging local branches together. 31 | You should also be able to share your branches by pushing them to a shared server, working with others on shared branches and rebasing your branches before they are shared. 32 | Next, we'll cover what you'll need to run your own Git repository-hosting server. 33 | -------------------------------------------------------------------------------- /book/03-git-branching/images/advance-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/advance-master.png -------------------------------------------------------------------------------- /book/03-git-branching/images/advance-testing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/advance-testing.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-branching-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-branching-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-branching-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-branching-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-branching-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-branching-3.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-branching-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-branching-4.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-branching-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-branching-5.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-branching-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-branching-6.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-merging-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-merging-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-merging-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-merging-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-rebase-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-rebase-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-rebase-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-rebase-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-rebase-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-rebase-3.png -------------------------------------------------------------------------------- /book/03-git-branching/images/basic-rebase-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/basic-rebase-4.png -------------------------------------------------------------------------------- /book/03-git-branching/images/branch-and-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/branch-and-history.png -------------------------------------------------------------------------------- /book/03-git-branching/images/checkout-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/checkout-master.png -------------------------------------------------------------------------------- /book/03-git-branching/images/commit-and-tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/commit-and-tree.png -------------------------------------------------------------------------------- /book/03-git-branching/images/commits-and-parents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/commits-and-parents.png -------------------------------------------------------------------------------- /book/03-git-branching/images/head-to-master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/head-to-master.png -------------------------------------------------------------------------------- /book/03-git-branching/images/head-to-testing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/head-to-testing.png -------------------------------------------------------------------------------- /book/03-git-branching/images/interesting-rebase-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/interesting-rebase-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/interesting-rebase-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/interesting-rebase-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/interesting-rebase-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/interesting-rebase-3.png -------------------------------------------------------------------------------- /book/03-git-branching/images/interesting-rebase-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/interesting-rebase-4.png -------------------------------------------------------------------------------- /book/03-git-branching/images/interesting-rebase-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/interesting-rebase-5.png -------------------------------------------------------------------------------- /book/03-git-branching/images/lr-branches-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/lr-branches-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/lr-branches-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/lr-branches-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/perils-of-rebasing-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/perils-of-rebasing-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/perils-of-rebasing-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/perils-of-rebasing-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/perils-of-rebasing-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/perils-of-rebasing-3.png -------------------------------------------------------------------------------- /book/03-git-branching/images/perils-of-rebasing-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/perils-of-rebasing-4.png -------------------------------------------------------------------------------- /book/03-git-branching/images/perils-of-rebasing-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/perils-of-rebasing-5.png -------------------------------------------------------------------------------- /book/03-git-branching/images/remote-branches-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/remote-branches-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/remote-branches-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/remote-branches-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/remote-branches-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/remote-branches-3.png -------------------------------------------------------------------------------- /book/03-git-branching/images/remote-branches-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/remote-branches-4.png -------------------------------------------------------------------------------- /book/03-git-branching/images/remote-branches-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/remote-branches-5.png -------------------------------------------------------------------------------- /book/03-git-branching/images/topic-branches-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/topic-branches-1.png -------------------------------------------------------------------------------- /book/03-git-branching/images/topic-branches-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/topic-branches-2.png -------------------------------------------------------------------------------- /book/03-git-branching/images/two-branches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/03-git-branching/images/two-branches.png -------------------------------------------------------------------------------- /book/03-git-branching/sections/branch-management.asc: -------------------------------------------------------------------------------- 1 | [[_branch_management]] 2 | === Branch Management 3 | 4 | (((branches, managing))) 5 | Now that you've created, merged, and deleted some branches, let's look at some branch-management tools that will come in handy when you begin using branches all the time. 6 | 7 | The `git branch` command does more than just create and delete branches.(((git commands, branch))) 8 | If you run it with no arguments, you get a simple listing of your current branches: 9 | 10 | [source,console] 11 | ---- 12 | $ git branch 13 | iss53 14 | * master 15 | testing 16 | ---- 17 | 18 | Notice the `*` character that prefixes the `master` branch: it indicates the branch that you currently have checked out (i.e., the branch that `HEAD` points to). 19 | This means that if you commit at this point, the `master` branch will be moved forward with your new work. 20 | To see the last commit on each branch, you can run `git branch -v`: 21 | 22 | [source,console] 23 | ---- 24 | $ git branch -v 25 | iss53 93b412c fix javascript issue 26 | * master 7a98805 Merge branch 'iss53' 27 | testing 782fd34 add scott to the author list in the readmes 28 | ---- 29 | 30 | The useful `--merged` and `--no-merged` options can filter this list to branches that you have or have not yet merged into the branch you're currently on. 31 | To see which branches are already merged into the branch you're on, you can run `git branch --merged`: 32 | 33 | [source,console] 34 | ---- 35 | $ git branch --merged 36 | iss53 37 | * master 38 | ---- 39 | 40 | Because you already merged in `iss53` earlier, you see it in your list. 41 | Branches on this list without the `*` in front of them are generally fine to delete with `git branch -d`; you've already incorporated their work into another branch, so you're not going to lose anything. 42 | 43 | To see all the branches that contain work you haven't yet merged in, you can run `git branch --no-merged`: 44 | 45 | [source,console] 46 | ---- 47 | $ git branch --no-merged 48 | testing 49 | ---- 50 | 51 | This shows your other branch. 52 | Because it contains work that isn't merged in yet, trying to delete it with `git branch -d` will fail: 53 | 54 | [source,console] 55 | ---- 56 | $ git branch -d testing 57 | error: The branch 'testing' is not fully merged. 58 | If you are sure you want to delete it, run 'git branch -D testing'. 59 | ---- 60 | 61 | If you really do want to delete the branch and lose that work, you can force it with `-D`, as the helpful message points out. 62 | -------------------------------------------------------------------------------- /book/03-git-branching/sections/workflows.asc: -------------------------------------------------------------------------------- 1 | === Branching Workflows 2 | 3 | Now that you have the basics of branching and merging down, what can or should you do with them? 4 | In this section, we'll cover some common workflows that this lightweight branching makes possible, so you can decide if you would like to incorporate it into your own development cycle. 5 | 6 | ==== Long-Running Branches 7 | 8 | (((branches, long-running))) 9 | Because Git uses a simple three-way merge, merging from one branch into another multiple times over a long period is generally easy to do. 10 | This means you can have several branches that are always open and that you use for different stages of your development cycle; you can merge regularly from some of them into others. 11 | 12 | Many Git developers have a workflow that embraces this approach, such as having only code that is entirely stable in their `master` branch – possibly only code that has been or will be released. 13 | They have another parallel branch named `develop` or `next` that they work from or use to test stability – it isn't necessarily always stable, but whenever it gets to a stable state, it can be merged into `master`. 14 | It's used to pull in topic branches (short-lived branches, like your earlier `iss53` branch) when they're ready, to make sure they pass all the tests and don't introduce bugs. 15 | 16 | In reality, we're talking about pointers moving up the line of commits you're making. 17 | The stable branches are farther down the line in your commit history, and the bleeding-edge branches are farther up the history. 18 | 19 | .A linear view of progressive-stability branching 20 | image::images/lr-branches-1.png[A linear view of progressive-stability branching.] 21 | 22 | It's generally easier to think about them as work silos, where sets of commits graduate to a more stable silo when they're fully tested. 23 | 24 | [[lrbranch_b]] 25 | .A ``silo'' view of progressive-stability branching 26 | image::images/lr-branches-2.png[A ``silo'' view of progressive-stability branching.] 27 | 28 | You can keep doing this for several levels of stability. 29 | Some larger projects also have a `proposed` or `pu` (proposed updates) branch that has integrated branches that may not be ready to go into the `next` or `master` branch. 30 | The idea is that your branches are at various levels of stability; when they reach a more stable level, they're merged into the branch above them. 31 | Again, having multiple long-running branches isn't necessary, but it's often helpful, especially when you're dealing with very large or complex projects. 32 | 33 | [[_topic_branch]] 34 | ==== Topic Branches 35 | 36 | (((branches, topic))) 37 | Topic branches, however, are useful in projects of any size. 38 | A topic branch is a short-lived branch that you create and use for a single particular feature or related work. 39 | This is something you've likely never done with a VCS before because it's generally too expensive to create and merge branches. 40 | But in Git it's common to create, work on, merge, and delete branches several times a day. 41 | 42 | You saw this in the last section with the `iss53` and `hotfix` branches you created. 43 | You did a few commits on them and deleted them directly after merging them into your main branch. 44 | This technique allows you to context-switch quickly and completely – because your work is separated into silos where all the changes in that branch have to do with that topic, it's easier to see what has happened during code review and such. 45 | You can keep the changes there for minutes, days, or months, and merge them in when they're ready, regardless of the order in which they were created or worked on. 46 | 47 | Consider an example of doing some work (on `master`), branching off for an issue (`iss91`), working on it for a bit, branching off the second branch to try another way of handling the same thing (`iss91v2`), going back to your master branch and working there for a while, and then branching off there to do some work that you're not sure is a good idea (`dumbidea` branch). 48 | Your commit history will look something like this: 49 | 50 | .Multiple topic branches 51 | image::images/topic-branches-1.png[Multiple topic branches.] 52 | 53 | Now, let's say you decide you like the second solution to your issue best (`iss91v2`); and you showed the `dumbidea` branch to your coworkers, and it turns out to be genius. 54 | You can throw away the original `iss91` branch (losing commits `C5` and `C6`) and merge in the other two. 55 | Your history then looks like this: 56 | 57 | .History after merging `dumbidea` and `iss91v2` 58 | image::images/topic-branches-2.png[History after merging `dumbidea` and `iss91v2`.] 59 | 60 | We will go into more detail about the various possible workflows for your Git project in <<_distributed_git>>, so before you decide which branching scheme your next project will use, be sure to read that chapter. 61 | 62 | It's important to remember when you're doing all this that these branches are completely local. 63 | When you're branching and merging, everything is being done only in your Git repository – no server communication is happening. 64 | -------------------------------------------------------------------------------- /book/04-git-server/1-git-server.asc: -------------------------------------------------------------------------------- 1 | == Git di _Server_ 2 | 3 | (((serving repositories))) 4 | Pada tahap ini, seharusnya Anda sudah mampu melakukan sebagian besar tugas sehari-hari yang akan Anda kerjakan dengan menggunakan Git. 5 | Namun, untuk melakukan kolaborasi di Git, Anda harus memiliki repositori remote Git. 6 | Walaupun secara teknis Anda dapat mendorong dan menarik perubahan dari dan ke repositori seseorang, namun hal itu sangat tidak dianjurkan karena Anda akan kebingungan terhadap apa yang sedang mereka kerjakan jika Anda tidak berhati-hati. 7 | Selanjutnya, Anda mengharapkan kolaborator Anda dapat mengakses repositori meskipun komputer Anda sedang luring - memiliki repositori umum yang dapat diandalkan seringkali berguna dalam hal ini. Oleh karena itu, metode yang dianjurkan untuk berkolaborasi dengan seseorang adalah dengan cara membuat repositori perantara dimana Anda berdua memiliki akses untuk mendorong dan menarik perubahan dari repositori tersebut. 8 | 9 | Menjalankan _server_ Git cukup mudah dilakukan. 10 | Pertama, Anda memilih protokol yang diinginkan untuk berkomunikasi dengan _server_ Anda. 11 | Bagian pertama dari bab ini akan membahas protokol-protokol yang tersedia beserta pro dan kontra dari masing-masing protokol. 12 | Bagian selanjutnya akan menjelaskan beberapa pengaturan khusus menggunakan protokol-protokol tersebut dan bagaimana manjalankan _server_ Anda dengannya. 13 | Terakhir, kita akan membahas beberapa pilihan tempat penyimpanan, jika Anda tidak keberatan menyimpan kode Anda pada _server_ orang lain dan tidak ingin rumit-rumit mengatur dan merawat _server_ Anda sendiri. 14 | 15 | Jika Anda tidak tertarik untuk menjalankan _server_ sendiri, Anda dapat melewatinya dan langsung ke bagian terakhir bab ini untuk melihat beberapa pilihan untuk pengaturan penyimpanan akun dan kemudian beralih ke bab berikutnya, di mana kami membahas berbagai seluk beluk tentang bekerja dalam lingkungan sumber kontrol yang terdistribusi. 16 | 17 | Sebuah repositori remote pada umumnya merupakan sebuah _repositori kosong_ - sebuah repositori Git yang tidak memiliki direktori kerja. 18 | Karena repositori tersebut hanya digunakan sebagai titik kolaborasi, tidak ada alasan untuk memeriksa setiap gambarannya pada _disk_; itu hanya data Git. 19 | Dalam istilah yang paling sederhana, sebuah repositori kosong merupakan isi dari direktori `.git` proyek Anda dan tidak ada yang lain. 20 | 21 | include::sections/protocols.asc[] 22 | 23 | include::sections/git-on-a-server.asc[] 24 | 25 | include::sections/generating-ssh-key.asc[] 26 | 27 | include::sections/setting-up-server.asc[] 28 | 29 | include::sections/git-daemon.asc[] 30 | 31 | include::sections/smart-http.asc[] 32 | 33 | include::sections/gitweb.asc[] 34 | 35 | include::sections/gitlab.asc[] 36 | 37 | include::sections/hosted.asc[] 38 | 39 | === Ringkasan 40 | 41 | Anda memiliki beberapa pilihan untuk mendapatkan repositori remote Git dan menjalankannya sehingga Anda dapat bekerjasama dengan orang lain atau membagikan pekerjaan Anda. 42 | 43 | Menjalankan _server_ Anda sendiri akan memberikan Anda kontrol yang lebih dan memungkinkan Anda untuk menjalankan _server_ di dalam _firewall_ Anda sendiri, namun _server_ semacam itu umumnya membutuhkan cukup banyak waktu untuk persiapan dan perawatan. Jika Anda meletakkan data Anda pada _server_ penyimpanan milik orang lain, mudah sekali untuk melakukan pengaturan dan perawatan; Namun, Anda harus mampu menyimpan kode Anda pada _server_ milik orang lain, dan beberapa organisasi tidak mengizinkan hal tersebut. 44 | 45 | Seharusnya cukup mudah untuk menentukan solusi yang mana atau kombinasi solusi seperti apa yang sesuai bagi Anda dan organisasi Anda. 46 | -------------------------------------------------------------------------------- /book/04-git-server/images/bitnami.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/04-git-server/images/bitnami.png -------------------------------------------------------------------------------- /book/04-git-server/images/git-instaweb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/04-git-server/images/git-instaweb.png -------------------------------------------------------------------------------- /book/04-git-server/images/gitlab-broadcast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/04-git-server/images/gitlab-broadcast.png -------------------------------------------------------------------------------- /book/04-git-server/images/gitlab-groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/04-git-server/images/gitlab-groups.png -------------------------------------------------------------------------------- /book/04-git-server/images/gitlab-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/04-git-server/images/gitlab-menu.png -------------------------------------------------------------------------------- /book/04-git-server/images/gitlab-users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/04-git-server/images/gitlab-users.png -------------------------------------------------------------------------------- /book/04-git-server/sections/generating-ssh-key.asc: -------------------------------------------------------------------------------- 1 | [[_generate_ssh_key]] 2 | === Generating Your SSH Public Key 3 | 4 | (((SSH keys))) 5 | That being said, many Git servers authenticate using SSH public keys. 6 | In order to provide a public key, each user in your system must generate one if they don't already have one. 7 | This process is similar across all operating systems. 8 | First, you should check to make sure you don't already have a key. 9 | By default, a user's SSH keys are stored in that user's `~/.ssh` directory. 10 | You can easily check to see if you have a key already by going to that directory and listing the contents: 11 | 12 | [source,console] 13 | ---- 14 | $ cd ~/.ssh 15 | $ ls 16 | authorized_keys2 id_dsa known_hosts 17 | config id_dsa.pub 18 | ---- 19 | 20 | You're looking for a pair of files named something like `id_dsa` or `id_rsa` and a matching file with a `.pub` extension. 21 | The `.pub` file is your public key, and the other file is your private key. 22 | If you don't have these files (or you don't even have a `.ssh` directory), you can create them by running a program called `ssh-keygen`, which is provided with the SSH package on Linux/Mac systems and comes with the MSysGit package on Windows: 23 | 24 | [source,console] 25 | ---- 26 | $ ssh-keygen 27 | Generating public/private rsa key pair. 28 | Enter file in which to save the key (/home/schacon/.ssh/id_rsa): 29 | Created directory '/home/schacon/.ssh'. 30 | Enter passphrase (empty for no passphrase): 31 | Enter same passphrase again: 32 | Your identification has been saved in /home/schacon/.ssh/id_rsa. 33 | Your public key has been saved in /home/schacon/.ssh/id_rsa.pub. 34 | The key fingerprint is: 35 | d0:82:24:8e:d7:f1:bb:9b:33:53:96:93:49:da:9b:e3 schacon@mylaptop.local 36 | ---- 37 | 38 | First it confirms where you want to save the key (`.ssh/id_rsa`), and then it asks twice for a passphrase, which you can leave empty if you don't want to type a password when you use the key. 39 | 40 | Now, each user that does this has to send their public key to you or whoever is administrating the Git server (assuming you're using an SSH server setup that requires public keys). 41 | All they have to do is copy the contents of the `.pub` file and e-mail it. 42 | The public keys look something like this: 43 | 44 | [source,console] 45 | ---- 46 | $ cat ~/.ssh/id_rsa.pub 47 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU 48 | GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3 49 | Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA 50 | t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En 51 | mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx 52 | NrRFi9wrf+M7Q== schacon@mylaptop.local 53 | ---- 54 | 55 | For a more in-depth tutorial on creating an SSH key on multiple operating systems, see the GitHub guide on SSH keys at https://help.github.com/articles/generating-ssh-keys[]. 56 | -------------------------------------------------------------------------------- /book/04-git-server/sections/git-daemon.asc: -------------------------------------------------------------------------------- 1 | === Git Daemon 2 | 3 | (((serving repositories, git protocol))) 4 | Next we'll set up a daemon serving repositories over the ``Git'' protocol. This is common choice for fast, unauthenticated access to your Git data. Remember that since it's not an authenticated service, anything you serve over this protocol is public within it's network. 5 | 6 | If you're running this on a server outside your firewall, it should only be used for projects that are publicly visible to the world. 7 | If the server you're running it on is inside your firewall, you might use it for projects that a large number of people or computers (continuous integration or build servers) have read-only access to, when you don't want to have to add an SSH key for each. 8 | 9 | In any case, the Git protocol is relatively easy to set up. 10 | Basically, you need to run this command in a daemonized manner:(((git commands, daemon))) 11 | 12 | [source,console] 13 | ---- 14 | git daemon --reuseaddr --base-path=/opt/git/ /opt/git/ 15 | ---- 16 | 17 | `--reuseaddr` allows the server to restart without waiting for old connections to time out, the `--base-path` option allows people to clone projects without specifying the entire path, and the path at the end tells the Git daemon where to look for repositories to export. 18 | If you're running a firewall, you'll also need to punch a hole in it at port 9418 on the box you're setting this up on. 19 | 20 | You can daemonize this process a number of ways, depending on the operating system you're running. 21 | On an Ubuntu machine, you can use an Upstart script. 22 | So, in the following file 23 | 24 | [source,console] 25 | ---- 26 | /etc/event.d/local-git-daemon 27 | ---- 28 | 29 | you put this script: 30 | 31 | [source,console] 32 | ---- 33 | start on startup 34 | stop on shutdown 35 | exec /usr/bin/git daemon \ 36 | --user=git --group=git \ 37 | --reuseaddr \ 38 | --base-path=/opt/git/ \ 39 | /opt/git/ 40 | respawn 41 | ---- 42 | 43 | For security reasons, it is strongly encouraged to have this daemon run as a user with read-only permissions to the repositories – you can easily do this by creating a new user 'git-ro' and running the daemon as them. 44 | For the sake of simplicity we'll simply run it as the same 'git' user that Gitosis is running as. 45 | 46 | When you restart your machine, your Git daemon will start automatically and respawn if it goes down. 47 | To get it running without having to reboot, you can run this: 48 | 49 | [source,console] 50 | ---- 51 | initctl start local-git-daemon 52 | ---- 53 | 54 | On other systems, you may want to use `xinetd`, a script in your `sysvinit` system, or something else – as long as you get that command daemonized and watched somehow. 55 | 56 | Next, you have to tell Git which repositories to allow unauthenticated Git server-based access to. You can do this in each repository by creating a file name `git-daemon-export-ok`. 57 | 58 | [source,console] 59 | ---- 60 | $ cd /path/to/project.git 61 | $ touch git-daemon-export-ok 62 | ---- 63 | 64 | The presence of that file tells Git that it's OK to serve this project without authentication. 65 | -------------------------------------------------------------------------------- /book/04-git-server/sections/gitweb.asc: -------------------------------------------------------------------------------- 1 | === GitWeb 2 | 3 | (((serving repositories, GitWeb)))(((GitWeb))) 4 | Now that you have basic read/write and read-only access to your project, you may want to set up a simple web-based visualizer. 5 | Git comes with a CGI script called GitWeb that is sometimes used for this. 6 | 7 | [[gitweb]] 8 | .The GitWeb web-based user interface. 9 | image::images/git-instaweb.png[The GitWeb web-based user interface.] 10 | 11 | If you want to check out what GitWeb would look like for your project, Git comes with a command to fire up a temporary instance if you have a lightweight server on your system like `lighttpd` or `webrick`. 12 | On Linux machines, `lighttpd` is often installed, so you may be able to get it to run by typing `git instaweb` in your project directory. 13 | If you're running a Mac, Leopard comes preinstalled with Ruby, so `webrick` may be your best bet. 14 | To start `instaweb` with a non-lighttpd handler, you can run it with the `--httpd` option.(((git commands, instaweb))) 15 | 16 | [source,console] 17 | ---- 18 | $ git instaweb --httpd=webrick 19 | [2009-02-21 10:02:21] INFO WEBrick 1.3.1 20 | [2009-02-21 10:02:21] INFO ruby 1.8.6 (2008-03-03) [universal-darwin9.0] 21 | ---- 22 | 23 | That starts up an HTTPD server on port 1234 and then automatically starts a web browser that opens on that page. 24 | It's pretty easy on your part. 25 | When you're done and want to shut down the server, you can run the same command with the `--stop` option: 26 | 27 | [source,console] 28 | ---- 29 | $ git instaweb --httpd=webrick --stop 30 | ---- 31 | 32 | If you want to run the web interface on a server all the time for your team or for an open source project you're hosting, you'll need to set up the CGI script to be served by your normal web server. 33 | Some Linux distributions have a `gitweb` package that you may be able to install via `apt` or `yum`, so you may want to try that first. 34 | We'll walk though installing GitWeb manually very quickly. 35 | First, you need to get the Git source code, which GitWeb comes with, and generate the custom CGI script: 36 | 37 | [source,console] 38 | ---- 39 | $ git clone git://git.kernel.org/pub/scm/git/git.git 40 | $ cd git/ 41 | $ make GITWEB_PROJECTROOT="/opt/git" prefix=/usr gitweb 42 | SUBDIR gitweb 43 | SUBDIR ../ 44 | make[2]: `GIT-VERSION-FILE' is up to date. 45 | GEN gitweb.cgi 46 | GEN static/gitweb.js 47 | $ sudo cp -Rf gitweb /var/www/ 48 | ---- 49 | 50 | Notice that you have to tell the command where to find your Git repositories with the `GITWEB_PROJECTROOT` variable. 51 | Now, you need to make Apache use CGI for that script, for which you can add a VirtualHost: 52 | 53 | [source,console] 54 | ---- 55 | 56 | ServerName gitserver 57 | DocumentRoot /var/www/gitweb 58 | 59 | Options ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch 60 | AllowOverride All 61 | order allow,deny 62 | Allow from all 63 | AddHandler cgi-script cgi 64 | DirectoryIndex gitweb.cgi 65 | 66 | 67 | ---- 68 | 69 | Again, GitWeb can be served with any CGI or Perl capable web server; if you prefer to use something else, it shouldn't be difficult to set up. 70 | At this point, you should be able to visit `http://gitserver/` to view your repositories online. 71 | -------------------------------------------------------------------------------- /book/04-git-server/sections/hosted.asc: -------------------------------------------------------------------------------- 1 | === Third Party Hosted Options 2 | 3 | If you don't want to go through all of the work involved in setting up your own Git server, you have several options for hosting your Git projects on an external dedicated hosting site. 4 | Doing so offers a number of advantages: a hosting site is generally quick to set up and easy to start projects on, and no server maintenance or monitoring is involved. 5 | Even if you set up and run your own server internally, you may still want to use a public hosting site for your open source code – it's generally easier for the open source community to find and help you with. 6 | 7 | These days, you have a huge number of hosting options to choose from, each with different advantages and disadvantages. 8 | To see an up-to-date list, check out the GitHosting page on the main Git wiki at https://git.wiki.kernel.org/index.php/GitHosting[] 9 | 10 | We'll cover using GitHub in detail in <<_github>>, as it is the largest Git host out there and you may need to interact with projects hosted on it in any case, but there are dozens more to choose from should you not want to set up your own Git server. 11 | -------------------------------------------------------------------------------- /book/04-git-server/sections/smart-http.asc: -------------------------------------------------------------------------------- 1 | === Smart HTTP 2 | 3 | (((serving repositories, HTTP))) 4 | We now have authenticated access though SSH and unauthenticated access through `git://`, but there is also a protocol that can do both at the same time. 5 | Setting up Smart HTTP is basically just enabling a CGI script that is provided with Git called `git-http-backend` on the server.((git commands, "http-backend")) 6 | This CGI will read the path and headers sent by a `git fetch` or `git push` to an HTTP URL and determine if the client can communicate over HTTP (which is true for any client since version 1.6.6). 7 | If the CGI sees that the client is smart, it will communicate smartly with it, otherwise it will fall back to the dumb behavior (so it is backward compatible for reads with older clients). 8 | 9 | Let's walk though a very basic setup. We'll set this up with Apache as the CGI server. If you don't have Apache setup, you can do so on a Linux box with something like this:(((Apache))) 10 | 11 | [source,console] 12 | ---- 13 | $ sudo apt-get install apache2 apache2-utils 14 | $ a2enmod cgi alias env 15 | ---- 16 | 17 | This also enables the `mod_cgi`, `mod_alias`, and `mod_env` modules, which are all needed for this to work properly. 18 | 19 | Next we need to add some things to the Apache configuration to run the `git http-backend` as the handler for anything coming into the `/git` path of your web server. 20 | 21 | [source,console] 22 | ---- 23 | SetEnv GIT_PROJECT_ROOT /opt/git 24 | SetEnv GIT_HTTP_EXPORT_ALL 25 | ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/ 26 | ---- 27 | 28 | If you leave out `GIT_HTTP_EXPORT_ALL` environment variable, then Git will only serve to unauthenticated clients the repositories with the `git-daemon-export-ok` file in them, just like the Git daemon did. 29 | 30 | Then you'll have to tell Apache to allow requests to that path with something like this: 31 | 32 | [source,console] 33 | ---- 34 | 35 | Options ExecCGI Indexes 36 | Order allow,deny 37 | Allow from all 38 | Require all granted 39 | 40 | ---- 41 | 42 | Finally you'll want to make writes be authenticated somehow, possibly with an Auth block like this: 43 | 44 | [source,console] 45 | ---- 46 | 47 | AuthType Basic 48 | AuthName "Git Access" 49 | AuthUserFile /opt/git/.htpasswd 50 | Require valid-user 51 | 52 | ---- 53 | 54 | That will require you to create a `.htaccess` file containing the passwords of all the valid users. Here is an example of adding a ``schacon'' user to the file: 55 | 56 | [source,console] 57 | ---- 58 | $ htdigest -c /opt/git/.htpasswd "Git Access" schacon 59 | ---- 60 | 61 | There are tons of ways to have Apache authenticate users, you'll have to choose and implement one of them. This is just the simplest example we could come up with. You'll also almost certainly want to set this up over SSL so all this data is encrypted. 62 | 63 | We don't want to go too far down the rabbit hole of Apache configuration specifics, since you could well be using a different server or have different authenication needs. The idea is that Git comes with a CGI called `git http-backend` that when invoked will do all the negotiation to send and receive data over HTTP. It does not implement any authentication itself, but that can easily be controlled at the layer of the web server that invokes it. You can do this with nearly any CGI-capable web server, so go with the one that you know best. 64 | 65 | [NOTE] 66 | ==== 67 | For more information on configuring authentication in Apache, check out the Apache docs here: http://httpd.apache.org/docs/current/howto/auth.html[] 68 | ==== 69 | -------------------------------------------------------------------------------- /book/05-distributed-git/1-distributed-git.asc: -------------------------------------------------------------------------------- 1 | [[_distributed_git]] 2 | == Distributed Git 3 | 4 | (((distributed git))) 5 | Now that you have a remote Git repository set up as a point for all the developers to share their code, and you're familiar with basic Git commands in a local workflow, you'll look at how to utilize some of the distributed workflows that Git affords you. 6 | 7 | In this chapter, you'll see how to work with Git in a distributed environment as a contributor and an integrator. 8 | That is, you'll learn how to contribute code successfully to a project and make it as easy on you and the project maintainer as possible, and also how to maintain a project successfully with a number of developers contributing. 9 | 10 | include::sections/distributed-workflows.asc[] 11 | 12 | include::sections/contributing.asc[] 13 | 14 | include::sections/maintaining.asc[] 15 | 16 | === Summary 17 | 18 | You should feel fairly comfortable contributing to a project in Git as well as maintaining your own project or integrating other users' contributions. 19 | Congratulations on being an effective Git developer! 20 | In the next chapter, you'll learn about how to use the largest and most popular Git hosting service, GitHub. 21 | -------------------------------------------------------------------------------- /book/05-distributed-git/images/benevolent-dictator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/benevolent-dictator.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/centralized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/centralized.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/git-diff-check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/git-diff-check.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/integration-manager.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/integration-manager.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/large-merges-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/large-merges-1.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/large-merges-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/large-merges-2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/managed-team-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/managed-team-1.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/managed-team-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/managed-team-2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/managed-team-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/managed-team-3.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/managed-team-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/managed-team-flow.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/merging-workflows-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/merging-workflows-1.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/merging-workflows-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/merging-workflows-2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/merging-workflows-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/merging-workflows-3.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/merging-workflows-4 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/merging-workflows-4 2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/merging-workflows-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/merging-workflows-4.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/merging-workflows-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/merging-workflows-5.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/public-small-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/public-small-1.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/public-small-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/public-small-2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/public-small-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/public-small-3.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/rebasing-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/rebasing-1.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/rebasing-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/rebasing-2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-1.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-2.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-3.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-4.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-5.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-6.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-7.png -------------------------------------------------------------------------------- /book/05-distributed-git/images/small-team-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/05-distributed-git/images/small-team-flow.png -------------------------------------------------------------------------------- /book/06-github/1-github.asc: -------------------------------------------------------------------------------- 1 | [[_github]] 2 | == GitHub 3 | 4 | (((GitHub))) 5 | GitHub adalah penyimpanan terbesar tunggal untuk repositori Git, dan Github adalah titik pusat kolaborasi untuk jutaan pengembang dan proyek. 6 | Sebagian besar dari semua repositori Git di simpan di GitHub, dan banyak proyek open-source menggunakan Github untuk menyimpan Git, pelacakan masalah, tinjauan kode, dan hal-hal lainnya. 7 | Jadi sementara ini GitHub bukan bagian langsung dari proyek open source Git, ada kesempatan baik bagi Anda yang ingin atau perlu berinteraksi dengan GitHub pada titik tertentu saat menggunakan Git secara profesional. 8 | 9 | Bab ini membahas tentang penggunaan GitHub secara efektif. 10 | Kita akan membahas tentang cara mendaftar dan mengelola akun, membuat dan menggunakan repositori Git, alur kerja umum untuk berkontribusi pada proyek dan untuk menerima kontribusi-kontribusi Anda, antarmuka program GitHub dan banyak tip-tip kecil untuk membuat hidup Anda lebih mudah pada umumnya. 11 | 12 | Jika Anda tidak tertarik menggunakan GitHub untuk menyimpan proyek Anda sendiri atau untuk berkolaborasi dengan proyek lain yang di simpan di GitHub, Anda dapat dengan aman melewati ke <<_git_tools>>. 13 | 14 | [WARNING] 15 | .Perubahan Antar Muka 16 | ==== 17 | Penting untuk dicatat bahwa seperti banyak situs web aktif, elemen UI dalam tangkapan layar ini pasti akan berubah seiring waktu. Semoga gagasan umum tentang apa yang ingin kita capai di sini akan tetap ada di sana, tetapi jika Anda menginginkan versi layar yang lebih mutakhir, versi daring buku ini mungkin memiliki tangkapan layar yang lebih baru. 18 | ==== 19 | 20 | include::sections/1-setting-up-account.asc[] 21 | 22 | include::sections/2-contributing.asc[] 23 | 24 | include::sections/3-maintaining.asc[] 25 | 26 | include::sections/4-managing-organization.asc[] 27 | 28 | include::sections/5-scripting.asc[] 29 | 30 | === Ringkasan 31 | 32 | Sekarang Anda adalah pengguna GitHub. 33 | Anda mengetahui cara membuat akun, mengelola organisasi, membuat dan push ke repositori, berkontribusi pada proyek orang lain dan menerima kontribusi dari orang lain. 34 | Di bab selanjutnya, Anda akan mempelajari alat dan tip yang lebih canggih untuk menghadapi situasi yang kompleks, yang benar-benar akan membuat Anda menjadi master Git. 35 | -------------------------------------------------------------------------------- /book/06-github/callouts/1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/1.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/1.png -------------------------------------------------------------------------------- /book/06-github/callouts/10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/10.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/10.png -------------------------------------------------------------------------------- /book/06-github/callouts/2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/2.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/2.png -------------------------------------------------------------------------------- /book/06-github/callouts/3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/3.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/3.png -------------------------------------------------------------------------------- /book/06-github/callouts/4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/4.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/4.png -------------------------------------------------------------------------------- /book/06-github/callouts/5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/5.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/5.png -------------------------------------------------------------------------------- /book/06-github/callouts/6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/6.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/6.png -------------------------------------------------------------------------------- /book/06-github/callouts/7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/7.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/7.png -------------------------------------------------------------------------------- /book/06-github/callouts/8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/8.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/8.png -------------------------------------------------------------------------------- /book/06-github/callouts/9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/9.pdf -------------------------------------------------------------------------------- /book/06-github/callouts/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/callouts/9.png -------------------------------------------------------------------------------- /book/06-github/images/2fa-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/2fa-1.png -------------------------------------------------------------------------------- /book/06-github/images/account-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/account-settings.png -------------------------------------------------------------------------------- /book/06-github/images/avatar-crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/avatar-crop.png -------------------------------------------------------------------------------- /book/06-github/images/blink-01-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-01-start.png -------------------------------------------------------------------------------- /book/06-github/images/blink-02-pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-02-pr.png -------------------------------------------------------------------------------- /book/06-github/images/blink-03-pull-request-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-03-pull-request-open.png -------------------------------------------------------------------------------- /book/06-github/images/blink-04-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-04-email.png -------------------------------------------------------------------------------- /book/06-github/images/blink-04-pr-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-04-pr-comment.png -------------------------------------------------------------------------------- /book/06-github/images/blink-05-general-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-05-general-comment.png -------------------------------------------------------------------------------- /book/06-github/images/blink-06-final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-06-final.png -------------------------------------------------------------------------------- /book/06-github/images/blink-pull-request-open copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-pull-request-open copy.png -------------------------------------------------------------------------------- /book/06-github/images/blink-pull-request-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/blink-pull-request-open.png -------------------------------------------------------------------------------- /book/06-github/images/collaborators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/collaborators.png -------------------------------------------------------------------------------- /book/06-github/images/email-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/email-settings.png -------------------------------------------------------------------------------- /book/06-github/images/emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/emoji.png -------------------------------------------------------------------------------- /book/06-github/images/forkbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/forkbutton.png -------------------------------------------------------------------------------- /book/06-github/images/hubot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/hubot.png -------------------------------------------------------------------------------- /book/06-github/images/maint-01-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-01-email.png -------------------------------------------------------------------------------- /book/06-github/images/maint-02-merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-02-merge.png -------------------------------------------------------------------------------- /book/06-github/images/maint-03-email-resp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-03-email-resp.png -------------------------------------------------------------------------------- /book/06-github/images/maint-04-target.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-04-target.png -------------------------------------------------------------------------------- /book/06-github/images/maint-05-mentions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-05-mentions.png -------------------------------------------------------------------------------- /book/06-github/images/maint-06-unsubscribe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-06-unsubscribe.png -------------------------------------------------------------------------------- /book/06-github/images/maint-07-notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-07-notifications.png -------------------------------------------------------------------------------- /book/06-github/images/maint-08-notifications-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-08-notifications-page.png -------------------------------------------------------------------------------- /book/06-github/images/maint-09-contrib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-09-contrib.png -------------------------------------------------------------------------------- /book/06-github/images/maint-10-default-branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-10-default-branch.png -------------------------------------------------------------------------------- /book/06-github/images/maint-11-transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/maint-11-transfer.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-01-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-01-example.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-02-tasks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-02-tasks.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-03-task-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-03-task-summary.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-04-fenced-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-04-fenced-code.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-05-quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-05-quote.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-06-emoji-complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-06-emoji-complete.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-07-emoji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-07-emoji.png -------------------------------------------------------------------------------- /book/06-github/images/markdown-08-drag-drop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/markdown-08-drag-drop.png -------------------------------------------------------------------------------- /book/06-github/images/mentions-01-syntax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/mentions-01-syntax.png -------------------------------------------------------------------------------- /book/06-github/images/mentions-02-render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/mentions-02-render.png -------------------------------------------------------------------------------- /book/06-github/images/mentions-03-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/mentions-03-closed.png -------------------------------------------------------------------------------- /book/06-github/images/new-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/new-repo.png -------------------------------------------------------------------------------- /book/06-github/images/neworg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/neworg.png -------------------------------------------------------------------------------- /book/06-github/images/newrepo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/newrepo.png -------------------------------------------------------------------------------- /book/06-github/images/newrepoform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/newrepoform.png -------------------------------------------------------------------------------- /book/06-github/images/notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/notifications.png -------------------------------------------------------------------------------- /book/06-github/images/orgs-01-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/orgs-01-page.png -------------------------------------------------------------------------------- /book/06-github/images/orgs-02-teams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/orgs-02-teams.png -------------------------------------------------------------------------------- /book/06-github/images/orgs-03-audit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/orgs-03-audit.png -------------------------------------------------------------------------------- /book/06-github/images/pr-01-fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/pr-01-fail.png -------------------------------------------------------------------------------- /book/06-github/images/pr-02-merge-fix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/pr-02-merge-fix.png -------------------------------------------------------------------------------- /book/06-github/images/reposettingslink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/reposettingslink.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-01-services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-01-services.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-02-email-service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-02-email-service.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-03-webhook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-03-webhook.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-04-webhook-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-04-webhook-debug.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-05-access-token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-05-access-token.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-06-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-06-comment.png -------------------------------------------------------------------------------- /book/06-github/images/scripting-07-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/scripting-07-status.png -------------------------------------------------------------------------------- /book/06-github/images/signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/signup.png -------------------------------------------------------------------------------- /book/06-github/images/ssh-keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/ssh-keys.png -------------------------------------------------------------------------------- /book/06-github/images/your-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/06-github/images/your-profile.png -------------------------------------------------------------------------------- /book/06-github/sections/4-managing-organization.asc: -------------------------------------------------------------------------------- 1 | [[_github_orgs]] 2 | === Mengelola Organization 3 | 4 | (((GitHub, organizations))) 5 | Selain akun pengguna-tunggal, GitHub memiliki apa yang disebut Organizations. 6 | Seperti akun pribadi, akun Organizations memiliki namespace dimana semua proyek mereka ada, namun banyak hal lainnya yang berbeda. 7 | Akun ini mewakili sekelompok orang dengan kepemilikan bersama atas proyek, dan ada banyak alat untuk mengelola subkelompok orang-orang tersebut. 8 | Biasanya akun ini digunakan untuk grup Open Source (seperti ``perl'' atau ``rails'') atau perusahaan (seperti ``google'' atau ``twitter''). 9 | 10 | ==== Dasar Organization 11 | 12 | Sebuah organization cukup mudah untuk dibuat; cukup klik pada ikon ``+'' di kanan atas halaman GitHub manapun, dan pilih ``New organization'' dari menu. 13 | 14 | .The ``New organization'' menu item. 15 | image::images/neworg.png[The ``New organization'' menu item.] 16 | 17 | Pertama, Anda harus memberi nama organization Anda dan memberikan alamat surel untuk kontak utama grup tersebut. Kemudian Anda dapat mengundang pengguna lain untuk menjadi pemilik akun bersama jika Anda ingin. 18 | 19 | Ikuti langkah-langkah ini dan Anda akan segera menjadi pemilik sebuah organization baru. 20 | Seperti akun pribadi, organization gratis jika semua yang Anda rencanakan untuk disimpan akan ada open source. 21 | 22 | Sebagai pemilik organization, ketika Anda mem-fork sebuah repositori, Anda akan memiliki pilihan untuk mem-fork ke namespace organization Anda. Ketika Anda membuat repositori baru, Anda dapat membuatnya di akun pribadi Anda atau di bawah organization yang Anda miliki. Anda juga secara otomatis ``watch'' setiap repositori baru yang dibuat organization ini. 23 | 24 | Sama seperti di <<_personal_avatar>>, Anda dapat mengunggah avatar agar organization Anda mempersonalisasinya sedikit. Sama seperti akun pribadi, Anda memiliki landing page untuk organization yang mencantumkan semua repositori Anda dan dapat dilihat oleh orang lain. 25 | 26 | Sekarang mari kita membahas beberapa hal yang sedikit berbeda dengan akun organization. 27 | 28 | ==== Tim 29 | 30 | Organizations berhubungan dengan perorangan melalui tim, yang hanya merupakan pengelompokan akun pengguna perorangan dan repositori di dalam organization dan jenis akses apa yang dimiliki orang-orang di repositori tersebut. 31 | 32 | Contoh, katakanlah perusahaan Anda memiliki tiga repositori: `frontend`,`backend`, dan `deployscripts`. 33 | Anda ingin pengembang HTML/CSS/Javascript Anda memiliki akses ke `frontend` dan mungkin `backend`, dan orang operasi Anda memiliki akses ke `backend` dan` deployscripts`. 34 | Tim membuat ini mudah, tanpa harus mengelola kolaborator untuk setiap repositori perorangan. 35 | 36 | Laman organization menunjukkan dasbor sederhana untuk semua repositori, pengguna, dan tim yang berada di bawah organization ini. 37 | 38 | [[_org_page]] 39 | .The Organization page. 40 | image::images/orgs-01-page.png[] 41 | 42 | Untuk mengelola Tim Anda, Anda dapat mengklik pada sidebar Tim di sisi kanan laman di <<_org_page>>. Ini akan membawa Anda ke halaman yang dapat Anda gunakan untuk menambahkan anggota ke tim Anda, menambahkan repositori ke tim atau mengelola pengaturan dan mengakses tingkat kontrol untuk tim. Setiap tim hanya dapat membaca, membaca/menulis atau akses administratif ke repositori. Anda dapat mengubah tingkat itu dengan mengklik tombol ``Settings'' di <<_team_page>>. 43 | 44 | [[_team_page]] 45 | .The Team page. 46 | image::images/orgs-02-teams.png[] 47 | 48 | Ketika Anda mengundang seseorang ke tim, mereka akan mendapatkan surel yang memberitahukannya bahwa mereka telah diundang. 49 | 50 | Selain itu, tim `@mentions` (seperti `@acmecorp/frontend`) bekerja sama seperti yang mereka lakukan dengan pengguna perorangan, kecuali *semua* anggota tim itu kemudian berlangganan thread. 51 | Ini berguna jika Anda menginginkan perhatian dari seseorang dalam tim, tapi Anda tidak tahu pasti dengan siapa yang harus ditanyakan. 52 | 53 | Seorang pengguna dapat masuk dalam jumlah tim, jadi jangan membatasi diri hanya dengan tim kontrol-akses. 54 | Tim minat khusus seperti `ux`, `css`, atau `refactoring` berguna untuk beberapa jenis pertanyaan, dan lainnya seperti `legal` dan `colorblind` untuk jenis yang sama sekali berbeda. 55 | 56 | ==== Audit Log 57 | 58 | Organization juga memberikan pemilik akses ke semua informasi tentang apa yang terjadi di organization. Anda bisa masuk ke tab 'Audit Log' dan melihat kejadian apa yang terjadi di tingkat organization, siapa yang melakukannya dan di dunia mana mereka selesai. 59 | 60 | [[_audit_log]] 61 | .The Audit log. 62 | image::images/orgs-03-audit.png[] 63 | 64 | Anda juga dapat menyaring jenis aktivitas tertentu, tempat tertentu atau orang tertentu. 65 | -------------------------------------------------------------------------------- /book/07-git-tools/1-git-tools.asc: -------------------------------------------------------------------------------- 1 | [[_git_tools]] 2 | == Git Tools 3 | 4 | By now, you’ve learned most of the day-to-day commands and workflows that you need to manage or maintain a Git repository for your source code control. 5 | You’ve accomplished the basic tasks of tracking and committing files, and you’ve harnessed the power of the staging area and lightweight topic branching and merging. 6 | 7 | Now you’ll explore a number of very powerful things that Git can do that you may not necessarily use on a day-to-day basis but that you may need at some point. 8 | 9 | include::sections/revision-selection.asc[] 10 | 11 | include::sections/interactive-staging.asc[] 12 | 13 | include::sections/stashing-cleaning.asc[] 14 | 15 | include::sections/signing.asc[] 16 | 17 | include::sections/searching.asc[] 18 | 19 | include::sections/rewriting-history.asc[] 20 | 21 | include::sections/reset.asc[] 22 | 23 | include::sections/advanced-merging.asc[] 24 | 25 | include::sections/rerere.asc[] 26 | 27 | include::sections/debugging.asc[] 28 | 29 | include::sections/submodules.asc[] 30 | 31 | include::sections/bundling.asc[] 32 | 33 | include::sections/replace.asc[] 34 | 35 | include::sections/credentials.asc[] 36 | 37 | === Summary 38 | 39 | You’ve seen a number of advanced tools that allow you to manipulate your commits and staging area more precisely. 40 | When you notice issues, you should be able to easily figure out what commit introduced them, when, and by whom. 41 | If you want to use subprojects in your project, you’ve learned how to accommodate those needs. 42 | At this point, you should be able to do most of the things in Git that you’ll need on the command line day to day and feel comfortable doing so. 43 | -------------------------------------------------------------------------------- /book/07-git-tools/callouts/1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/1.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/1.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/10.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/10.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/2.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/2.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/3.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/3.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/4.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/4.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/5.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/5.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/6.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/6.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/7.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/7.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/8.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/8.png -------------------------------------------------------------------------------- /book/07-git-tools/callouts/9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/9.pdf -------------------------------------------------------------------------------- /book/07-git-tools/callouts/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/callouts/9.png -------------------------------------------------------------------------------- /book/07-git-tools/git-credential-read-only: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'optparse' 4 | 5 | path = File.expand_path '~/.git-credentials' # <1> 6 | OptionParser.new do |opts| 7 | opts.banner = 'USAGE: git-credential-read-only [options] ' 8 | opts.on('-f', '--file PATH', 'Specify path for backing store') do |argpath| 9 | path = File.expand_path argpath 10 | end 11 | end.parse! 12 | 13 | exit(0) unless ARGV[0].downcase == 'get' # <2> 14 | exit(0) unless File.exists? path 15 | 16 | known = {} # <3> 17 | while line = STDIN.gets 18 | break if line.strip == '' 19 | k,v = line.strip.split '=', 2 20 | known[k] = v 21 | end 22 | 23 | File.readlines(path).each do |fileline| # <4> 24 | prot,user,pass,host = fileline.scan(/^(.*?):\/\/(.*?):(.*?)@(.*)$/).first 25 | if prot == known['protocol'] and host == known['host'] then 26 | puts "protocol=#{prot}" 27 | puts "host=#{host}" 28 | puts "username=#{user}" 29 | puts "password=#{pass}" 30 | exit(0) 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /book/07-git-tools/images/double-dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/double-dot.png -------------------------------------------------------------------------------- /book/07-git-tools/images/replace1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/replace1.png -------------------------------------------------------------------------------- /book/07-git-tools/images/replace2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/replace2.png -------------------------------------------------------------------------------- /book/07-git-tools/images/replace3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/replace3.png -------------------------------------------------------------------------------- /book/07-git-tools/images/replace4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/replace4.png -------------------------------------------------------------------------------- /book/07-git-tools/images/replace5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/replace5.png -------------------------------------------------------------------------------- /book/07-git-tools/images/rerere1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/rerere1.png -------------------------------------------------------------------------------- /book/07-git-tools/images/rerere2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/rerere2.png -------------------------------------------------------------------------------- /book/07-git-tools/images/rerere3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/rerere3.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-checkout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-checkout.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-ex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-ex1.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-ex2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-ex2.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-ex3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-ex3.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-ex4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-ex4.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-ex5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-ex5.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-ex6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-ex6.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-hard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-hard.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-mixed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-mixed.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-path1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-path1.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-path2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-path2.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-path3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-path3.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-soft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-soft.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-squash-r1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-squash-r1.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-squash-r2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-squash-r2.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-squash-r3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-squash-r3.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-start.png -------------------------------------------------------------------------------- /book/07-git-tools/images/reset-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/reset-workflow.png -------------------------------------------------------------------------------- /book/07-git-tools/images/undomerge-reset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/undomerge-reset.png -------------------------------------------------------------------------------- /book/07-git-tools/images/undomerge-revert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/undomerge-revert.png -------------------------------------------------------------------------------- /book/07-git-tools/images/undomerge-revert2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/undomerge-revert2.png -------------------------------------------------------------------------------- /book/07-git-tools/images/undomerge-revert3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/undomerge-revert3.png -------------------------------------------------------------------------------- /book/07-git-tools/images/undomerge-start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/07-git-tools/images/undomerge-start.png -------------------------------------------------------------------------------- /book/08-customizing-git/1-customizing-git.asc: -------------------------------------------------------------------------------- 1 | [[_customizing_git]] 2 | == Kostumisasi Git 3 | 4 | Sejauh ini, kita sudah membahas dasar-dasar bagaimana Git bekerja dan bagaimana menggunakannya, kita juga sudah memperkenalkan beberapa peralatan yang disediakan Git untuk membantu Anda menggunakannya dengan mudah dan efektif. 5 | Pada bab ini, kita akan melihat bagaimana Anda bisa membuat Git bekerja dengan kostumisasi, sambil memperkenalkan beberapa pengaturan konfigurasi penting dan sistem hook. 6 | Dengan peralatan-peralatan tersebut, akan memudahkan untuk membuat Git bekerja sesuai dengan yang Anda inginkan, perusahaan Anda, atau kebutuhan kelompok Anda. 7 | 8 | include::sections/config.asc[] 9 | 10 | include::sections/attributes.asc[] 11 | 12 | include::sections/hooks.asc[] 13 | 14 | include::sections/policy.asc[] 15 | 16 | === Ringkasan 17 | 18 | Kita sudah membahas sebagian besar langkah-langkah utama sehingga Anda bisa menyesuaikan klien Git dan server Git Anda sesuai dengan alur kerja Anda dan proyek Anda. 19 | Anda sudah mempelajari semua jenis kostumisasi konfigurasi, kelengkapan-kelengkapan berbasis file (berkas), dan event hook nya, dan anda sudah membuat sebuah contoh pelaksanaan kebijakan server. 20 | Anda sekarang semestinya sudah bisa membuat Git sesuai dengan semua alur kerja yang Anda impikan. 21 | -------------------------------------------------------------------------------- /book/08-customizing-git/images/clean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/08-customizing-git/images/clean.png -------------------------------------------------------------------------------- /book/08-customizing-git/images/p4merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/08-customizing-git/images/p4merge.png -------------------------------------------------------------------------------- /book/08-customizing-git/images/smudge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/08-customizing-git/images/smudge.png -------------------------------------------------------------------------------- /book/09-git-and-other-scms/1-git-and-other-scms.asc: -------------------------------------------------------------------------------- 1 | == Git and Other Systems 2 | 3 | The world isn't perfect. 4 | Usually, you can't immediately switch every project you come in contact with to Git. 5 | Sometimes you're stuck on a project using another VCS, and wish it was Git. 6 | We'll spend the first part of this chapter learning about ways to use Git as a client when the project you're working on is hosted in a different system. 7 | 8 | At some point, you may want to convert your existing project to Git. 9 | The second part of this chapter covers how to migrate your project into Git from several specific systems, as well as a method that will work if no pre-built import tool exists. 10 | 11 | === Git as a Client 12 | 13 | (((Git as a client))) 14 | Git provides such a nice experience for developers that many people have figured out how to use it on their workstation, even if the rest of their team is using an entirely different VCS. 15 | There are a number of these adapters, called ``bridges,'' available. 16 | Here we'll cover the ones you're most likely to run into in the wild. 17 | 18 | include::sections/client-svn.asc[] 19 | 20 | include::sections/client-hg.asc[] 21 | 22 | include::sections/client-p4.asc[] 23 | 24 | include::sections/client-tfs.asc[] 25 | 26 | [[_migrating]] 27 | === Migrating to Git 28 | 29 | (((Migrating to Git))) 30 | If you have an existing codebase in another VCS but you've decided to start using Git, you must migrate your project one way or another. 31 | This section goes over some importers for common systems, and then demonstrates how to develop your own custom importer. 32 | You'll learn how to import data from several of the bigger professionally used SCM systems, because they make up the majority of users who are switching, and because high-quality tools for them are easy to come by. 33 | 34 | include::sections/import-svn.asc[] 35 | 36 | include::sections/import-hg.asc[] 37 | 38 | include::sections/import-p4.asc[] 39 | 40 | include::sections/import-tfs.asc[] 41 | 42 | include::sections/import-custom.asc[] 43 | 44 | === Summary 45 | 46 | You should feel comfortable using Git as a client for other version-control systems, or importing nearly any existing repository into Git without losing data. 47 | In the next chapter, we'll cover the raw internals of Git so you can craft every single byte, if need be. 48 | -------------------------------------------------------------------------------- /book/09-git-and-other-scms/images/git-fusion-boot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/09-git-and-other-scms/images/git-fusion-boot.png -------------------------------------------------------------------------------- /book/09-git-and-other-scms/images/git-fusion-perforce-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/09-git-and-other-scms/images/git-fusion-perforce-graph.png -------------------------------------------------------------------------------- /book/09-git-and-other-scms/images/git-tfs-ct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/09-git-and-other-scms/images/git-tfs-ct.png -------------------------------------------------------------------------------- /book/09-git-and-other-scms/sections/import-p4.asc: -------------------------------------------------------------------------------- 1 | [[_perforce_import]] 2 | ==== Perforce 3 | 4 | (((Perforce)))(((Importing, from Perforce))) 5 | The next system you'll look at importing from is Perforce. 6 | As we discussed above, there are two ways to let Git and Perforce talk to each other: git-p4 and Perforce Git Fusion. 7 | 8 | ===== Perforce Git Fusion 9 | 10 | Git Fusion makes this process fairly painless. 11 | Just configure your project settings, user mappings, and branches using a configuration file (as discussed in <<_p4_git_fusion>>), and clone the repository. 12 | Git Fusion leaves you with what looks like a native Git repository, which is then ready to push to a native Git host if you desire. 13 | You could even use Perforce as your Git host if you like. 14 | 15 | [[_git_p4]] 16 | ===== Git-p4 17 | 18 | Git-p4 can also act as an import tool. 19 | As an example, we'll import the Jam project from the Perforce Public Depot. 20 | To set up your client, you must export the P4PORT environment variable to point to the Perforce depot: 21 | 22 | [source,console] 23 | ---- 24 | $ export P4PORT=public.perforce.com:1666 25 | ---- 26 | 27 | [NOTE] 28 | ==== 29 | In order to follow along, you'll need a Perforce depot to connect with. 30 | We'll be using the public depot at public.perforce.com for our examples, but you can use any depot you have access to. 31 | ==== 32 | 33 | (((git commands, p4))) 34 | Run the `git p4 clone` command to import the Jam project from the Perforce server, supplying the depot and project path and the path into which you want to import the project: 35 | 36 | [source,console] 37 | ---- 38 | $ git-p4 clone //guest/perforce_software/jam@all p4import 39 | Importing from //guest/perforce_software/jam@all into p4import 40 | Initialized empty Git repository in /private/tmp/p4import/.git/ 41 | Import destination: refs/remotes/p4/master 42 | Importing revision 9957 (100%) 43 | ---- 44 | 45 | This particular project has only one branch, but if you have branches that are configured with branch views (or just a set of directories), you can use the `--detect-branches` flag to `git p4 clone` to import all the project's branches as well. 46 | See <<_git_p4_branches>> for a bit more detail on this. 47 | 48 | At this point you're almost done. 49 | If you go to the `p4import` directory and run `git log`, you can see your imported work: 50 | 51 | [source,console] 52 | ---- 53 | $ git log -2 54 | commit e5da1c909e5db3036475419f6379f2c73710c4e6 55 | Author: giles 56 | Date: Wed Feb 8 03:13:27 2012 -0800 57 | 58 | Correction to line 355; change to . 59 | 60 | [git-p4: depot-paths = "//public/jam/src/": change = 8068] 61 | 62 | commit aa21359a0a135dda85c50a7f7cf249e4f7b8fd98 63 | Author: kwirth 64 | Date: Tue Jul 7 01:35:51 2009 -0800 65 | 66 | Fix spelling error on Jam doc page (cummulative -> cumulative). 67 | 68 | [git-p4: depot-paths = "//public/jam/src/": change = 7304] 69 | ---- 70 | 71 | You can see that `git-p4` has left an identifier in each commit message. 72 | It's fine to keep that identifier there, in case you need to reference the Perforce change number later. 73 | However, if you'd like to remove the identifier, now is the time to do so – before you start doing work on the new repository. 74 | (((git commands, filter-branch))) 75 | You can use `git filter-branch` to remove the identifier strings en masse: 76 | 77 | [source,console] 78 | ---- 79 | $ git filter-branch --msg-filter 'sed -e "/^\[git-p4:/d"' 80 | Rewrite e5da1c909e5db3036475419f6379f2c73710c4e6 (125/125) 81 | Ref 'refs/heads/master' was rewritten 82 | ---- 83 | 84 | If you run `git log`, you can see that all the SHA-1 checksums for the commits have changed, but the `git-p4` strings are no longer in the commit messages: 85 | 86 | [source,console] 87 | ---- 88 | $ git log -2 89 | commit b17341801ed838d97f7800a54a6f9b95750839b7 90 | Author: giles 91 | Date: Wed Feb 8 03:13:27 2012 -0800 92 | 93 | Correction to line 355; change to . 94 | 95 | commit 3e68c2e26cd89cb983eb52c024ecdfba1d6b3fff 96 | Author: kwirth 97 | Date: Tue Jul 7 01:35:51 2009 -0800 98 | 99 | Fix spelling error on Jam doc page (cummulative -> cumulative). 100 | ---- 101 | 102 | Your import is ready to push up to your new Git server. 103 | -------------------------------------------------------------------------------- /book/09-git-and-other-scms/sections/import-svn.asc: -------------------------------------------------------------------------------- 1 | ==== Subversion 2 | 3 | (((Subversion))) 4 | (((Importing, from Subversion))) 5 | If you read the previous section about using `git svn`, you can easily use those instructions to `git svn clone` a repository; then, stop using the Subversion server, push to a new Git server, and start using that. 6 | If you want the history, you can accomplish that as quickly as you can pull the data out of the Subversion server (which may take a while). 7 | 8 | However, the import isn't perfect; and because it will take so long, you may as well do it right. 9 | The first problem is the author information. 10 | In Subversion, each person committing has a user on the system who is recorded in the commit information. 11 | The examples in the previous section show `schacon` in some places, such as the `blame` output and the `git svn log`. 12 | If you want to map this to better Git author data, you need a mapping from the Subversion users to the Git authors. 13 | Create a file called `users.txt` that has this mapping in a format like this: 14 | 15 | [source] 16 | ---- 17 | schacon = Scott Chacon 18 | selse = Someo Nelse 19 | ---- 20 | 21 | To get a list of the author names that SVN uses, you can run this: 22 | 23 | [source,console] 24 | ---- 25 | $ svn log --xml | grep author | sort -u | \ 26 | perl -pe 's/.*>(.*?)<.*/$1 = /' 27 | ---- 28 | 29 | That generates the log output in XML format, then keeps only the lines with author information, discards duplicates, strips out the XML tags. 30 | (Obviously this only works on a machine with `grep`, `sort`, and `perl` installed.) 31 | Then, redirect that output into your users.txt file so you can add the equivalent Git user data next to each entry. 32 | 33 | You can provide this file to `git svn` to help it map the author data more accurately. 34 | You can also tell `git svn` not to include the metadata that Subversion normally imports, by passing `--no-metadata` to the `clone` or `init` command. 35 | This makes your `import` command look like this: 36 | 37 | [source,console] 38 | ---- 39 | $ git svn clone http://my-project.googlecode.com/svn/ \ 40 | --authors-file=users.txt --no-metadata -s my_project 41 | ---- 42 | 43 | Now you should have a nicer Subversion import in your `my_project` directory. 44 | Instead of commits that look like this 45 | 46 | [source] 47 | ---- 48 | commit 37efa680e8473b615de980fa935944215428a35a 49 | Author: schacon 50 | Date: Sun May 3 00:12:22 2009 +0000 51 | 52 | fixed install - go to trunk 53 | 54 | git-svn-id: https://my-project.googlecode.com/svn/trunk@94 4c93b258-373f-11de- 55 | be05-5f7a86268029 56 | ---- 57 | 58 | they look like this: 59 | 60 | [source] 61 | ---- 62 | commit 03a8785f44c8ea5cdb0e8834b7c8e6c469be2ff2 63 | Author: Scott Chacon 64 | Date: Sun May 3 00:12:22 2009 +0000 65 | 66 | fixed install - go to trunk 67 | ---- 68 | 69 | Not only does the Author field look a lot better, but the `git-svn-id` is no longer there, either. 70 | 71 | You should also do a bit of post-import cleanup. 72 | For one thing, you should clean up the weird references that `git svn` set up. 73 | First you'll move the tags so they're actual tags rather than strange remote branches, and then you'll move the rest of the branches so they're local. 74 | 75 | To move the tags to be proper Git tags, run 76 | 77 | [source,console] 78 | ---- 79 | $ cp -Rf .git/refs/remotes/origin/tags/* .git/refs/tags/ 80 | $ rm -Rf .git/refs/remotes/origin/tags 81 | ---- 82 | 83 | This takes the references that were remote branches that started with `remotes/origin/tags/` and makes them real (lightweight) tags. 84 | 85 | Next, move the rest of the references under `refs/remotes` to be local branches: 86 | 87 | [source,console] 88 | ---- 89 | $ cp -Rf .git/refs/remotes/* .git/refs/heads/ 90 | $ rm -Rf .git/refs/remotes 91 | ---- 92 | 93 | Now all the old branches are real Git branches and all the old tags are real Git tags. 94 | The last thing to do is add your new Git server as a remote and push to it. 95 | Here is an example of adding your server as a remote: 96 | 97 | [source,console] 98 | ---- 99 | $ git remote add origin git@my-git-server:myrepository.git 100 | ---- 101 | 102 | Because you want all your branches and tags to go up, you can now run this: 103 | 104 | [source,console] 105 | ---- 106 | $ git push origin --all 107 | ---- 108 | 109 | All your branches and tags should be on your new Git server in a nice, clean import. 110 | -------------------------------------------------------------------------------- /book/09-git-and-other-scms/sections/import-tfs.asc: -------------------------------------------------------------------------------- 1 | [[_git_tfs]] 2 | ==== TFS 3 | 4 | (((TFS)))(((Importing, from TFS))) 5 | If your team is convering their source control from TFVC to Git, you'll want the highest-fidelity conversion you can get. 6 | This means that, while we covered both git-tfs and git-tf for the interop section, we'll only be covering git-tfs for this part, because git-tfs supports branches, and this is prohibitively difficult using git-tf. 7 | 8 | [NOTE] 9 | ==== 10 | This is a one-way conversion. 11 | The resulting Git repository won't be able to connect with the original TFVC project. 12 | ==== 13 | 14 | The first thing to do is map usernames. 15 | TFVC is fairly liberal with what goes into the author field for changesets, but Git wants a human-readable name and email address. 16 | You can get this information from the `tf` command-line client, like so: 17 | 18 | [source,powershell] 19 | ---- 20 | PS> tf history $/myproject -recursive | cut -b 11-20 | tail -n+3 | uniq | sort > AUTHORS 21 | ---- 22 | 23 | This grabs all of the changesets in the history of the project. 24 | The `cut` command ignores everything except characters 11-20 from each line (you'll have to experiment with the length of the fields to get these numbers right). 25 | The `tail` command skips the first two lines, which are field headers and ASCII-art underlines. 26 | The result of all of this is piped to `uniq` to eliminate duplicates, and saved to a file named `AUTHORS`. 27 | The next step is manual; in order for git-tfs to make effective use of this file, each line must be in this format: 28 | 29 | [source,text] 30 | ---- 31 | DOMAIN\username = User Name 32 | ---- 33 | 34 | The portion on the left is the ``User'' field from TFVC, and the portion on the right side of the equals sign is the user name that will be used for Git commits. 35 | 36 | Once you have this file, the next thing to do is make a full clone of the TFVC project you're interested in: 37 | 38 | [source,powershell] 39 | ---- 40 | PS> git tfs clone --with-branches --authors=AUTHORS https://username.visualstudio.com/DefaultCollection $/project/Trunk project_git 41 | ---- 42 | 43 | Next you'll want to clean the `git-tfs-id` sections from the bottom of the commit messages. 44 | The following command will do that: 45 | 46 | [source,powershell] 47 | ---- 48 | PS> git filter-branch -f --msg-filter 'sed "s/^git-tfs-id:.*$//g"' -- --all 49 | ---- 50 | 51 | That uses the `sed` command from the Git-bash environment to replace any line starting with ``git-tfs-id:'' with emptiness, which Git will then ignore. 52 | 53 | Once that's all done, you're ready to add a new remote, push all your branches up, and have your team start working from Git. 54 | -------------------------------------------------------------------------------- /book/10-git-internals/1-git-internals.asc: -------------------------------------------------------------------------------- 1 | [[_git_internals]] 2 | == Git Internals 3 | 4 | You may have skipped to this chapter from a previous chapter, or you may have gotten here after reading the rest of the book – in either case, this is where we'll go over the inner workings and implementation of Git. 5 | We found that learning this information was fundamentally important to understanding how useful and powerful Git is, but others have argued to us that it can be confusing and unnecessarily complex for beginners. 6 | Thus, we've made this discussion the last chapter in the book so you could read it early or later in your learning process. 7 | We leave it up to you to decide. 8 | 9 | Now that you're here, let's get started. 10 | First, if it isn't yet clear, Git is fundamentally a content-addressable filesystem with a VCS user interface written on top of it. 11 | You'll learn more about what this means in a bit. 12 | 13 | In the early days of Git (mostly pre 1.5), the user interface was much more complex because it emphasized this filesystem rather than a polished VCS. 14 | In the last few years, the UI has been refined until it's as clean and easy to use as any system out there; but often, the stereotype lingers about the early Git UI that was complex and difficult to learn. 15 | 16 | The content-addressable filesystem layer is amazingly cool, so I'll cover that first in this chapter; then, you'll learn about the transport mechanisms and the repository maintenance tasks that you may eventually have to deal with. 17 | 18 | include::sections/plumbing-porcelain.asc[] 19 | 20 | include::sections/objects.asc[] 21 | 22 | include::sections/refs.asc[] 23 | 24 | include::sections/packfiles.asc[] 25 | 26 | include::sections/refspec.asc[] 27 | 28 | include::sections/transfer-protocols.asc[] 29 | 30 | include::sections/maintenance.asc[] 31 | 32 | include::sections/environment.asc[] 33 | 34 | === Summary 35 | 36 | You should have a pretty good understanding of what Git does in the background and, to some degree, how it's implemented. 37 | This chapter has covered a number of plumbing commands – commands that are lower level and simpler than the porcelain commands you've learned about in the rest of the book. 38 | Understanding how Git works at a lower level should make it easier to understand why it's doing what it's doing and also to write your own tools and helping scripts to make your specific workflow work for you. 39 | 40 | Git as a content-addressable filesystem is a very powerful tool that you can easily use as more than just a VCS. 41 | We hope you can use your newfound knowledge of Git internals to implement your own cool application of this technology and feel more comfortable using Git in more advanced ways. 42 | -------------------------------------------------------------------------------- /book/10-git-internals/images/data-model-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/10-git-internals/images/data-model-1.png -------------------------------------------------------------------------------- /book/10-git-internals/images/data-model-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/10-git-internals/images/data-model-2.png -------------------------------------------------------------------------------- /book/10-git-internals/images/data-model-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/10-git-internals/images/data-model-3.png -------------------------------------------------------------------------------- /book/10-git-internals/images/data-model-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/10-git-internals/images/data-model-4.png -------------------------------------------------------------------------------- /book/10-git-internals/sections/plumbing-porcelain.asc: -------------------------------------------------------------------------------- 1 | [[_plumbing_porcelain]] 2 | === Plumbing and Porcelain 3 | 4 | This book covers how to use Git with 30 or so verbs such as `checkout`, `branch`, `remote`, and so on. 5 | But because Git was initially a toolkit for a VCS rather than a full user-friendly VCS, it has a bunch of verbs that do low-level work and were designed to be chained together UNIX style or called from scripts. 6 | These commands are generally referred to as ``plumbing'' commands, and the more user-friendly commands are called ``porcelain'' commands. 7 | 8 | The book's first nine chapters deal almost exclusively with porcelain commands. 9 | But in this chapter, you'll be dealing mostly with the lower-level plumbing commands, because they give you access to the inner workings of Git, and help demonstrate how and why Git does what it does. 10 | Many of these commands aren't meant to be used manually on the command line, but rather to be used as building blocks for new tools and custom scripts. 11 | 12 | When you run `git init` in a new or existing directory, Git creates the `.git` directory, which is where almost everything that Git stores and manipulates is located. 13 | If you want to back up or clone your repository, copying this single directory elsewhere gives you nearly everything you need. 14 | This entire chapter basically deals with the stuff in this directory. 15 | Here's what it looks like: 16 | 17 | [source,console] 18 | ---- 19 | $ ls -F1 20 | HEAD 21 | config* 22 | description 23 | hooks/ 24 | info/ 25 | objects/ 26 | refs/ 27 | ---- 28 | 29 | You may see some other files in there, but this is a fresh `git init` repository – it's what you see by default. 30 | The `description` file is only used by the GitWeb program, so don't worry about it. 31 | The `config` file contains your project-specific configuration options, and the `info` directory keeps a global exclude file (((excludes))) for ignored patterns that you don't want to track in a .gitignore file. 32 | The `hooks` directory contains your client- or server-side hook scripts, which are discussed in detail in <<_git_hooks>>. 33 | 34 | This leaves four important entries: the `HEAD` and (yet to be created) `index` files, and the `objects` and `refs` directories. 35 | These are the core parts of Git. 36 | The `objects` directory stores all the content for your database, the `refs` directory stores pointers into commit objects in that data (branches), the `HEAD` file points to the branch you currently have checked out, and the `index` file is where Git stores your staging area information. 37 | You'll now look at each of these sections in detail to see how Git operates. 38 | -------------------------------------------------------------------------------- /book/A-git-in-other-environments/1-git-other-environments.asc: -------------------------------------------------------------------------------- 1 | [appendix] 2 | == Git in Other Environments 3 | 4 | If you read through the whole book, you've learned a lot about how to use Git at the command line. 5 | You can work with local files, connect your repository to others over a network, and work effectively with others. 6 | But the story doesn't end there; Git is usually used as part of a larger ecosystem, and the terminal isn't always the best way to work with it. 7 | Now we'll take a look at some of the other kinds of environments where Git can be useful, and how other applications (including yours) work alongside Git. 8 | 9 | include::sections/guis.asc[] 10 | 11 | include::sections/visualstudio.asc[] 12 | 13 | include::sections/eclipse.asc[] 14 | 15 | 16 | include::sections/bash.asc[] 17 | 18 | include::sections/zsh.asc[] 19 | 20 | include::sections/powershell.asc[] 21 | 22 | === Summary 23 | 24 | You've learned how to harness Git's power from inside the tools that you use during your everyday work, and also how to access Git repositories from your own programs. 25 | -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/branch_widget_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/branch_widget_mac.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/branch_widget_win.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/branch_widget_win.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/egit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/egit.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/git-bash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/git-bash.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/git-gui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/git-gui.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/github_mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/github_mac.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/github_win.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/github_win.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/gitk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/gitk.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/posh-git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/posh-git.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/vs-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/vs-1.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/vs-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/vs-2.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/zsh-oh-my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/zsh-oh-my.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/images/zsh-prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/A-git-in-other-environments/images/zsh-prompt.png -------------------------------------------------------------------------------- /book/A-git-in-other-environments/sections/bash.asc: -------------------------------------------------------------------------------- 1 | === Git in Bash 2 | 3 | (((bash)))(((tab completion, bash)))(((shell prompts, bash))) 4 | If you're a Bash user, you can tap into some of your shell's features to make your experience with Git a lot friendlier. 5 | Git actually ships with plugins for several shells, but it's not turned on by default. 6 | 7 | First, you need to get a copy of the `contrib/completion/git-completion.bash` file out of the Git source code. 8 | Copy it somewhere handy, like your home directory, and add this to your `.bashrc`: 9 | 10 | [source,console] 11 | ----- 12 | . ~/git-completion.bash 13 | ----- 14 | 15 | Once that's done, change your directory to a git repository, and type: 16 | 17 | [source,console] 18 | ---- 19 | $ git chec 20 | ---- 21 | 22 | …and Bash will auto-complete to `git checkout`. 23 | This works with all of Git's subcommands, command-line parameters, and remotes and ref names where appropriate. 24 | 25 | It's also useful to customize your prompt to show information about the current directory's Git repository. 26 | This can be as simple or complex as you want, but there are generally a few key pieces of information that most people want, like the current branch, and the status of the working directory. 27 | To add these to your prompt, just copy the `contrib/completion/git-prompt.sh` file from Git's source repository to your home directory, add something like this to your `.bashrc`: 28 | 29 | [source,console] 30 | ----- 31 | . ~/git-prompt.sh 32 | export GIT_PS1_SHOWDIRTYSTATE=1 33 | export PS1='\w$(__git_ps1 " (%s)")\$ ' 34 | ----- 35 | 36 | The `\w` means print the current working directory, the `\$` prints the `$` part of the prompt, and `__git_ps1 " (%s)"` calls the function provided by `git-prompt.sh` with a formatting argument. 37 | Now your bash prompt will look like this when you're anywhere inside a Git-controlled project: 38 | 39 | .Customized `bash` prompt. 40 | image::images/git-bash.png[Customized `bash` prompt.] 41 | 42 | Both of these scripts come with helpful documentation; take a look at the contents of `git-completion.bash` and `git-prompt.sh` for more information. 43 | -------------------------------------------------------------------------------- /book/A-git-in-other-environments/sections/eclipse.asc: -------------------------------------------------------------------------------- 1 | === Git in Eclipse 2 | 3 | (((Eclipse))) 4 | Eclipse ships with a plugin called Egit, which provides a fairly-complete interface to Git operations. 5 | It's accessed by switching to the Git Perspective (Window > Open Perpective > Other…, and select "Git"). 6 | 7 | .Eclipse's EGit environment. 8 | image::images/egit.png[Eclipse's EGit environment.] 9 | 10 | EGit comes with plenty of great documentation, which you can find by going to Help > Help Contents, and choosing the "EGit Documentation" node from the contents listing. 11 | -------------------------------------------------------------------------------- /book/A-git-in-other-environments/sections/powershell.asc: -------------------------------------------------------------------------------- 1 | [[_git_powershell]] 2 | === Git in Powershell 3 | 4 | (((powershell)))(((tab completion, powershell)))(((shell prompts, powershell))) 5 | (((posh-git))) 6 | The standard command-line terminal on Windows (`cmd.exe`) isn't really capable of a customized Git experience, but if you're using Powershell, you're in luck. 7 | A package called Posh-Git (https://github.com/dahlbyk/posh-git[]) provides powerful tab-completion facilities, as well as an enhanced prompt to help you stay on top of your repostitory status. It looks like this: 8 | 9 | .Powershell with Posh-git. 10 | image::images/posh-git.png[Powershell with Posh-git.] 11 | 12 | If you've installed GitHub for Windows, Posh-Git is included by default, and all you have to do is add these lines to your `profile.ps1` (which is usually located in `C:\Users\\Documents\WindowsPowerShell`): 13 | 14 | [source,powershell] 15 | ----- 16 | . (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") 17 | . $env:github_posh_git\profile.example.ps1 18 | ----- 19 | 20 | If you're not a GitHub for Windows user, just download a Posh-Git release from (https://github.com/dahlbyk/posh-git[]), and uncompress it to the `WindowsPowershell` directory. 21 | Then open a Powershell prompt as the administrator, and do this: 22 | 23 | [source,powershell] 24 | ----- 25 | > Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm 26 | > cd ~\Documents\WindowsPowerShell\posh-git 27 | > .\install.ps1 28 | ----- 29 | 30 | This will add the proper line to your `profile.ps1` file, and posh-git will be active the next time you open your prompt. 31 | -------------------------------------------------------------------------------- /book/A-git-in-other-environments/sections/visualstudio.asc: -------------------------------------------------------------------------------- 1 | === Git in Visual Studio 2 | 3 | (((Visual Studio))) 4 | Starting with Visual Studio 2013 Update 1, Visual Studio users have a Git client built directly into their IDE. 5 | Visual Studio has had source-control integration features for quite some time, but they were oriented towards centralized, file-locking systems, and Git was not a good match for this workflow. 6 | Visual Studio 2013's Git support has been separated from this older feature, and the result is a much better fit between Studio and Git. 7 | 8 | To locate the feature, open a project that's controlled by Git (or just `git init` an existing project), and select View > Team Explorer from the menu. 9 | You'll see the "Connect" view, which looks a bit like this: 10 | 11 | .Connecting to a Git repository from Team Explorer. 12 | image::images/vs-1.png[Connecting to a Git repository from Team Explorer.] 13 | 14 | Visual Studio remembers all of the projects you've opened that are Git-controlled, and they're available in the list at the bottom. 15 | If you don't see the one you want there, click the "Add" link and type in the path to the working directory. 16 | Double clicking on one of the local Git repositories leads you to the Home view, which looks like <>. 17 | This is a hub for performing Git actions; when you're _writing_ code, you'll probably spend most of your time in the "Changes" view, but when it comes time to pull down changes made by your teammates, you'll use the "Unsynced Commits" and "Branches" views. 18 | 19 | [[vs_home]] 20 | .The "Home" view for a Git repository in Visual Studio. 21 | image::images/vs-2.png[The Home view for a Git repository in Visual Studio.] 22 | 23 | Visual Studio now has a powerful task-focused UI for Git. 24 | It includes a linear history view, a diff viewer, remote commands, and many other capabilities. 25 | For complete documentation of this feature (which doesn't fit here), go to http://msdn.microsoft.com/en-us/library/hh850437.aspx[]. 26 | -------------------------------------------------------------------------------- /book/A-git-in-other-environments/sections/zsh.asc: -------------------------------------------------------------------------------- 1 | === Git in Zsh 2 | 3 | (((zsh)))(((tab completion, zsh)))(((shell prompts, zsh))) 4 | Git also ships with a tab-completion library for Zsh. 5 | Just copy `contrib/completion/git-completion.zsh` to your home directory and source it from your `.zshrc`. 6 | Zsh's interface is a bit more powerful than Bash's: 7 | 8 | [source,console] 9 | ---- 10 | $ git che 11 | check-attr -- display gitattributes information 12 | check-ref-format -- ensure that a reference name is well formed 13 | checkout -- checkout branch or paths to working tree 14 | checkout-index -- copy files from index to working directory 15 | cherry -- find commits not merged upstream 16 | cherry-pick -- apply changes introduced by some existing commits 17 | ---- 18 | 19 | Ambiguous tab-completions aren't just listed; they have helpful descriptions, and you can graphically navigate the list by repeatedly hitting tab. 20 | This works with Git commands, their arguments, and names of things inside the repository (like refs and remotes), as well filenames and all the other things Zsh knows how to tab-complete. 21 | 22 | Zsh happens to be fairly compatible with Bash when it comes to prompt customization, but it allows you to have a right-side prompt as well. 23 | To include the branch name on the right side, add these lines to your `~/.zshrc` file: 24 | 25 | [source,console] 26 | ---- 27 | setopt prompt_subst 28 | . ~/git-prompt.sh 29 | export RPROMPT=$'$(__git_ps1 "%s")' 30 | ---- 31 | 32 | This results in a display of the current branch on the right-hand side of the terminal window, whenever your shell is inside a Git repository. It looks a bit like this: 33 | 34 | .Customized `zsh` prompt. 35 | image::images/zsh-prompt.png[Customized `zsh` prompt.] 36 | 37 | Zsh is powerful enough that there are entire frameworks dedicated to making it better. 38 | One of them is called "oh-my-zsh", and it can be found at https://github.com/robbyrussell/oh-my-zsh[]. 39 | oh-my-zsh's plugin system comes with powerful git tab-completion, and it has a variety of prompt "themes", many of which display version-control data. 40 | <> is just one example of what can be done with this system. 41 | 42 | [[oh_my_zsh_git]] 43 | .An example of an oh-my-zsh theme. 44 | image::images/zsh-oh-my.png[An example of an oh-my-zsh theme.] 45 | -------------------------------------------------------------------------------- /book/B-embedding-git/1-embedding-git.asc: -------------------------------------------------------------------------------- 1 | [appendix] 2 | == Embedding Git in your Applications 3 | 4 | If your application is for developers, chances are good that it could benefit from integration with source control. 5 | Even non-developer applications, such as document editors, could potentially benefit from version-control features, and Git's model works very well for many different scenarios. 6 | 7 | If you need to integrate Git with your application, you have essentially three choices: spawning a shell and using the Git command-line tool; Libgit2; and JGit. 8 | 9 | include::sections/command-line.asc[] 10 | 11 | include::sections/libgit2.asc[] 12 | 13 | include::sections/jgit.asc[] 14 | -------------------------------------------------------------------------------- /book/B-embedding-git/sections/command-line.asc: -------------------------------------------------------------------------------- 1 | === Command-line Git 2 | 3 | One option is to spawn a shell process and use the Git command-line tool to do the work. 4 | This has the benefit of being canonical, and all of Git's features are supported. 5 | This also happens to be fairly easy, as most runtime environments have a relatively simple facility for invoking a process with command-line arguments. 6 | However, this approach does have some downsides. 7 | 8 | One is that all the output is in plain text. 9 | This means that you'll have to parse Git's occasionally-changing output format to read progress and result information, which can be inefficient and error-prone. 10 | 11 | Another is the lack of error recovery. 12 | If a repository is corrupted somehow, or the user has a malformed configuration value, Git will simply refuse to perform many operations. 13 | 14 | Yet another is process management. 15 | Git requires you to maintain a shell environment on a separate process, which can add unwanted complexity. 16 | Trying to coordinate many of these processes (especially when potentially accessing the same repository from several processes) can be quite a challenge. 17 | -------------------------------------------------------------------------------- /book/contributors.asc: -------------------------------------------------------------------------------- 1 | [preface] 2 | == Kontributor 3 | 4 | Karena buku ini merupakan buku Open Source, kami telah menerima banyak bantuan selama bertahun-tahun. Berikut ini adalah mereka yang telah berkontribusi untuk versi Bahasa Inggris dari buku Pro Git sebagai sebuah proyek open source. Terimakasih semua atas bantuan untuk membuat buku ini lebih baik. 5 | 6 | [source] 7 | ---- 8 | 2 Aaron Schumacher 9 | 4 Aggelos Orfanakos 10 | 4 Alec Clews 11 | 1 Alex Moundalexis 12 | 2 Alexander Harkness 13 | 1 Alexander Kahn 14 | 1 Andrew McCarthy 15 | 1 AntonioK 16 | 1 Benjamin Bergman 17 | 1 Brennon Bortz 18 | 2 Brian P O'Rourke 19 | 1 Bryan Goines 20 | 1 Cameron Wright 21 | 1 Chris Down 22 | 1 Christian Kluge 23 | 1 Christoph Korn 24 | 2 Ciro Santilli 25 | 2 Cor 26 | 1 Dan Croak 27 | 1 Dan Johnson 28 | 1 Daniel Kay 29 | 2 Daniel Rosen 30 | 1 DanielWeber 31 | 1 Dave Dash 32 | 10 Davide Fiorentino lo Regio 33 | 2 Dilip M 34 | 1 Dimitar Bonev 35 | 1 Emmanuel Trillaud 36 | 1 Eric-Paul Lecluse 37 | 1 Eugene Serkin 38 | 1 Fernando Dobladez 39 | 2 Gordon McCreight 40 | 1 Helmut K. C. Tessarek 41 | 31 Igor Murzov 42 | 1 Ilya Kuznetsov 43 | 1 Jason St. John 44 | 1 Jay Taggart 45 | 1 Jean Jordaan 46 | 51 Jean-Noël Avila 47 | 1 Jean-Noël Rouvignac 48 | 1 Jed Hartman 49 | 1 Jeffrey Forman 50 | 1 John DeStefano 51 | 1 Junior 52 | 1 Kieran Spear 53 | 1 Larry Shatzer, Jr 54 | 1 Linquize 55 | 1 Markus 56 | 7 Matt Deacalion Stevens 57 | 1 Matthew McCullough 58 | 1 Matthieu Moy 59 | 1 Max F. Albrecht 60 | 1 Michael Schneider 61 | 8 Mike D. Smith 62 | 1 Mike Limansky 63 | 1 Olivier Trichet 64 | 1 Ondrej Novy 65 | 6 Ori Avtalion 66 | 1 Paul Baumgart 67 | 1 Peter Vojtek 68 | 1 Philipp Kempgen 69 | 2 Philippe Lhoste 70 | 1 PowerKiKi 71 | 1 Radek Simko 72 | 1 Rasmus Abrahamsen 73 | 1 Reinhard Holler 74 | 1 Ross Light 75 | 1 Ryuichi Okumura 76 | 1 Sebastian Wiesinger 77 | 1 Severyn Kozak 78 | 1 Shane 79 | 2 Shannen 80 | 8 Sitaram Chamarty 81 | 5 Soon Van 82 | 4 Sven Axelsson 83 | 2 Tim Court 84 | 1 Tuomas Suutari 85 | 1 Vlad Gorodetsky 86 | 3 W. Trevor King 87 | 1 Wyatt Carss 88 | 1 Włodzimierz Gajda 89 | 1 Xue Fuqiao 90 | 1 Yue Lin Ho 91 | 2 adelcambre 92 | 1 anaran 93 | 1 bdukes 94 | 1 burningTyger 95 | 1 cor 96 | 1 iosias 97 | 7 nicesw123 98 | 1 onovy 99 | 2 pcasaretto 100 | 1 sampablokuper 101 | ---- 102 | 103 | -------------------------------------------------------------------------------- /book/cover.html: -------------------------------------------------------------------------------- 1 |
cover
2 | -------------------------------------------------------------------------------- /book/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/book/cover.png -------------------------------------------------------------------------------- /book/index.asc: -------------------------------------------------------------------------------- 1 | == Index 2 | -------------------------------------------------------------------------------- /book/toc.asc: -------------------------------------------------------------------------------- 1 | {{ toc }} 2 | -------------------------------------------------------------------------------- /callouts/1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/1.pdf -------------------------------------------------------------------------------- /callouts/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/1.png -------------------------------------------------------------------------------- /callouts/10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/10.pdf -------------------------------------------------------------------------------- /callouts/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/10.png -------------------------------------------------------------------------------- /callouts/2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/2.pdf -------------------------------------------------------------------------------- /callouts/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/2.png -------------------------------------------------------------------------------- /callouts/3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/3.pdf -------------------------------------------------------------------------------- /callouts/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/3.png -------------------------------------------------------------------------------- /callouts/4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/4.pdf -------------------------------------------------------------------------------- /callouts/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/4.png -------------------------------------------------------------------------------- /callouts/5.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/5.pdf -------------------------------------------------------------------------------- /callouts/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/5.png -------------------------------------------------------------------------------- /callouts/6.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/6.pdf -------------------------------------------------------------------------------- /callouts/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/6.png -------------------------------------------------------------------------------- /callouts/7.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/7.pdf -------------------------------------------------------------------------------- /callouts/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/7.png -------------------------------------------------------------------------------- /callouts/8.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/8.pdf -------------------------------------------------------------------------------- /callouts/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/8.png -------------------------------------------------------------------------------- /callouts/9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/9.pdf -------------------------------------------------------------------------------- /callouts/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/callouts/9.png -------------------------------------------------------------------------------- /diagram-source/progit.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/progit/progit2-id/a2778fbc03eea7792fcdc838bd89c95d4c9e14b0/diagram-source/progit.sketch -------------------------------------------------------------------------------- /progit.asc: -------------------------------------------------------------------------------- 1 | Pro Git 2 | ======= 3 | :doctype: book 4 | :docinfo: 5 | :toc: 6 | :toclevels: 2 7 | :front-cover-image: image:book/cover.png[width=1050,height=1600] 8 | 9 | include::book/preface.asc[] 10 | 11 | include::book/01-introduction/1-introduction.asc[] 12 | 13 | include::book/02-git-basics/1-git-basics.asc[] 14 | 15 | include::book/03-git-branching/1-git-branching.asc[] 16 | 17 | include::book/04-git-server/1-git-server.asc[] 18 | 19 | include::book/05-distributed-git/1-distributed-git.asc[] 20 | 21 | include::book/06-github/1-github.asc[] 22 | 23 | include::book/07-git-tools/1-git-tools.asc[] 24 | 25 | include::book/08-customizing-git/1-customizing-git.asc[] 26 | 27 | include::book/09-git-and-other-scms/1-git-and-other-scms.asc[] 28 | 29 | include::book/10-git-internals/1-git-internals.asc[] 30 | 31 | include::book/A-git-in-other-environments/1-git-other-environments.asc[] 32 | 33 | include::book/B-embedding-git/1-embedding-git.asc[] 34 | 35 | include::book/C-git-commands/1-git-commands.asc[] 36 | -------------------------------------------------------------------------------- /status.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": "id", 3 | "language": "Bahasa Indonesia", 4 | "maintainers": ["baguzzzaji"], 5 | "files": { 6 | "01-introduction": { 7 | "1-introduction.asc": 0, 8 | "sections/about-version-control.asc": 0, 9 | "sections/basics.asc": 0, 10 | "sections/command-line.asc": 0, 11 | "sections/first-time-setup.asc": 0, 12 | "sections/help.asc": 0, 13 | "sections/history.asc": 0, 14 | "sections/installing.asc": 0 15 | }, 16 | "02-git-basics": { 17 | "1-git-basics.asc": 0, 18 | "sections/aliases.asc": 0, 19 | "sections/getting-a-repository.asc": 0, 20 | "sections/recording-changes.asc": 0, 21 | "sections/remotes.asc": 0, 22 | "sections/tagging.asc": 0, 23 | "sections/undoing.asc": 0, 24 | "sections/viewing-history.asc": 0 25 | }, 26 | "03-git-branching": { 27 | "1-git-branching.asc": 0, 28 | "sections/basic-branching-and-merging.asc": 0, 29 | "sections/branch-management.asc": 0, 30 | "sections/nutshell.asc": 0, 31 | "sections/rebasing.asc": 0, 32 | "sections/remote-branches.asc": 0, 33 | "sections/workflows.asc": 0 34 | }, 35 | "04-git-server": { 36 | "1-git-server.asc": 0, 37 | "sections/generating-ssh-key.asc": 0, 38 | "sections/git-daemon.asc": 0, 39 | "sections/git-on-a-server.asc": 0, 40 | "sections/gitlab.asc": 0, 41 | "sections/gitweb.asc": 0, 42 | "sections/hosted.asc": 0, 43 | "sections/protocols.asc": 0, 44 | "sections/setting-up-server.asc": 0, 45 | "sections/smart-http.asc": 0 46 | }, 47 | "05-distributed-git": { 48 | "1-distributed-git.asc": 0, 49 | "sections/contributing.asc": 0, 50 | "sections/distributed-workflows.asc": 0, 51 | "sections/maintaining.asc": 0 52 | }, 53 | "06-github": { 54 | "1-github.asc": 0, 55 | "sections/1-setting-up-account.asc": 0, 56 | "sections/2-contributing.asc": 0, 57 | "sections/3-maintaining.asc": 0, 58 | "sections/4-managing-organization.asc": 0, 59 | "sections/5-scripting.asc": 0 60 | }, 61 | "07-git-tools": { 62 | "1-git-tools.asc": 0, 63 | "sections/advanced-merging.asc": 0, 64 | "sections/bundling.asc": 0, 65 | "sections/credentials.asc": 0, 66 | "sections/debugging.asc": 0, 67 | "sections/interactive-staging.asc": 0, 68 | "sections/notes.asc": 0, 69 | "sections/replace.asc": 0, 70 | "sections/rerere.asc": 0, 71 | "sections/reset.asc": 0, 72 | "sections/revision-selection.asc": 0, 73 | "sections/rewriting-history.asc": 0, 74 | "sections/searching.asc": 0, 75 | "sections/signing.asc": 0, 76 | "sections/stashing-cleaning.asc": 0, 77 | "sections/submodules.asc": 0, 78 | "sections/subtree-merges.asc": 0 79 | }, 80 | "08-customizing-git": { 81 | "1-customizing-git.asc": 0, 82 | "sections/attributes.asc": 0, 83 | "sections/config.asc": 0, 84 | "sections/hooks.asc": 0, 85 | "sections/policy.asc": 0 86 | }, 87 | "09-git-and-other-scms": { 88 | "1-git-and-other-scms.asc": 0, 89 | "sections/client-hg.asc": 0, 90 | "sections/client-p4.asc": 0, 91 | "sections/client-svn.asc": 0, 92 | "sections/client-tfs.asc": 0, 93 | "sections/import-custom.asc": 0, 94 | "sections/import-hg.asc": 0, 95 | "sections/import-p4.asc": 0, 96 | "sections/import-svn.asc": 0, 97 | "sections/import-tfs.asc": 0 98 | }, 99 | "10-git-internals": { 100 | "1-git-internals.asc": 0, 101 | "sections/environment.asc": 0, 102 | "sections/maintenance.asc": 0, 103 | "sections/objects.asc": 0, 104 | "sections/packfiles.asc": 0, 105 | "sections/plumbing-porcelain.asc": 0, 106 | "sections/refs.asc": 0, 107 | "sections/refspec.asc": 0, 108 | "sections/transfer-protocols.asc": 0 109 | }, 110 | "A-git-in-other-environments": { 111 | "1-git-other-environments.asc": 0, 112 | "sections/bash.asc": 0, 113 | "sections/eclipse.asc": 0, 114 | "sections/guis.asc": 0, 115 | "sections/powershell.asc": 0, 116 | "sections/visualstudio.asc": 0, 117 | "sections/zsh.asc": 0 118 | }, 119 | "B-embedding-git": { 120 | "1-embedding-git.asc": 0, 121 | "sections/command-line.asc": 0, 122 | "sections/jgit.asc": 0, 123 | "sections/libgit2.asc": 0 124 | }, 125 | "C-git-commands": { 126 | "1-git-commands.asc": 0 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /theme/epub/epub.css: -------------------------------------------------------------------------------- 1 | /* syntax highlighting and coloring text in general */ 2 | 3 | /* Pygments with manni theme */ 4 | pre code.hll { background-color: #ffffcc } 5 | pre code.c { color: #0099FF; font-style: italic } /* Comment */ 6 | pre code.err { color: #AA0000 } /* Error */ 7 | pre code.k { color: #006699; font-weight: bold } /* Keyword */ 8 | pre code.o { color: #555555 } /* Operator */ 9 | pre code.cm { color: #35586C; font-style: italic } /* Comment.Multiline */ 10 | pre code.cp { color: #009999 } /* Comment.Preproc */ 11 | pre code.c1 { color: #35586C; font-style: italic } /* Comment.Single */ 12 | pre code.cs { color: #35586C; font-weight: bold; font-style: italic } /* Comment.Special */ 13 | pre code.gd { background-color: #FFCCCC } /* Generic.Deleted */ 14 | pre code.ge { font-style: italic } /* Generic.Emph */ 15 | pre code.gr { color: #FF0000 } /* Generic.Error */ 16 | pre code.gh { color: #003300; font-weight: bold } /* Generic.Heading */ 17 | pre code.gi { background-color: #CCFFCC } /* Generic.Inserted */ 18 | 19 | /* Overriding default manni style of #AAAAAA gray for Generic Output with #000000 black, which is better suited to ORM terminal output */ 20 | pre code.go { color: #000000 } /* Generic.Output */ 21 | 22 | pre code.gp { color: #000099; font-weight: bold } /* Generic.Prompt */ 23 | pre code.gs { font-weight: bold } /* Generic.Strong */ 24 | pre code.gu { color: #003300; font-weight: bold } /* Generic.Subheading */ 25 | pre code.gt { color: #99CC66 } /* Generic.Traceback */ 26 | pre code.kc { color: #006699; font-weight: bold } /* Keyword.Constant */ 27 | pre code.kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ 28 | pre code.kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ 29 | pre code.kp { color: #006699 } /* Keyword.Pseudo */ 30 | pre code.kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ 31 | pre code.kt { color: #007788; font-weight: bold } /* Keyword.Type */ 32 | pre code.m { color: #FF6600 } /* Literal.Number */ 33 | pre code.s { color: #CC3300 } /* Literal.String */ 34 | pre code.na { color: #330099 } /* Name.Attribute */ 35 | pre code.nb { color: #336666 } /* Name.Builtin */ 36 | pre code.nc { color: #00AA88; font-weight: bold } /* Name.Class */ 37 | pre code.no { color: #336600 } /* Name.Constant */ 38 | pre code.nd { color: #9999FF } /* Name.Decorator */ 39 | pre code.ni { color: #999999; font-weight: bold } /* Name.Entity */ 40 | pre code.ne { color: #CC0000; font-weight: bold } /* Name.Exception */ 41 | pre code.nf { color: #CC00FF } /* Name.Function */ 42 | pre code.nl { color: #9999FF } /* Name.Label */ 43 | pre code.nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ 44 | pre code.nt { color: #330099; font-weight: bold } /* Name.Tag */ 45 | pre code.nv { color: #003333 } /* Name.Variable */ 46 | pre code.ow { color: #000000; font-weight: bold } /* Operator.Word */ 47 | pre code.w { color: #bbbbbb } /* Text.Whitespace */ 48 | pre code.mf { color: #FF6600 } /* Literal.Number.Float */ 49 | pre code.mh { color: #FF6600 } /* Literal.Number.Hex */ 50 | pre code.mi { color: #FF6600 } /* Literal.Number.Integer */ 51 | pre code.mo { color: #FF6600 } /* Literal.Number.Oct */ 52 | pre code.sb { color: #CC3300 } /* Literal.String.Backtick */ 53 | pre code.sc { color: #CC3300 } /* Literal.String.Char */ 54 | pre code.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 55 | pre code.s2 { color: #CC3300 } /* Literal.String.Double */ 56 | pre code.se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ 57 | pre code.sh { color: #CC3300 } /* Literal.String.Heredoc */ 58 | pre code.si { color: #AA0000 } /* Literal.String.Interpol */ 59 | pre code.sx { color: #CC3300 } /* Literal.String.Other */ 60 | pre code.sr { color: #33AAAA } /* Literal.String.Regex */ 61 | pre code.s1 { color: #CC3300 } /* Literal.String.Single */ 62 | 63 | /* Overriding manni default yellow #FFCC33 with brown #AA6600, which is easier to read */ 64 | pre code.ss { color: #AA6600 } /* Literal.String.Symbol */ 65 | 66 | pre code.bp { color: #336666 } /* Name.Builtin.Pseudo */ 67 | pre code.vc { color: #003333 } /* Name.Variable.Class */ 68 | pre code.vg { color: #003333 } /* Name.Variable.Global */ 69 | pre code.vi { color: #003333 } /* Name.Variable.Instance */ 70 | pre code.il { color: #FF6600 } /* Literal.Number.Integer.Long */ 71 | 72 | /* Sanders's additions to manni */ 73 | pre code.g { color: #005500 } /* Generic */ 74 | pre code.l { color: #CC6600 } /* Literal */ 75 | pre code.l { color: #FF9900 } /* Literal.Date */ 76 | pre code.n { color: #000088 } /* Name */ 77 | pre code.nx { color: #000088 } /* Name.Other */ 78 | pre code.py { color: #9966FF } /* Name.Property */ 79 | pre code.p { color: #000000 } /* Punctuation */ 80 | pre code.x { color: #FF0066 } /* Other */ 81 | 82 | /* Chacon's additions to make command line look more like a command line */ 83 | pre[data-code-language="console"] { 84 | background: #ddd; 85 | padding: 10px; 86 | } 87 | pre[data-code-language="console"] code.go { 88 | color: #555; 89 | font-size: 1.0em; 90 | } 91 | pre[data-code-language="console"] code.gp { 92 | color: #009900; 93 | font-weight: bold; 94 | } 95 | -------------------------------------------------------------------------------- /theme/epub/epub.xsl: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /theme/html/html.css: -------------------------------------------------------------------------------- 1 | /* syntax highlighting and coloring text in general */ 2 | 3 | /* Pygments with manni theme */ 4 | pre code.hll { background-color: #ffffcc } 5 | pre code.c { color: #0099FF; font-style: italic } /* Comment */ 6 | pre code.err { color: #AA0000 } /* Error */ 7 | pre code.k { color: #006699; font-weight: bold } /* Keyword */ 8 | pre code.o { color: #555555 } /* Operator */ 9 | pre code.cm { color: #35586C; font-style: italic } /* Comment.Multiline */ 10 | pre code.cp { color: #009999 } /* Comment.Preproc */ 11 | pre code.c1 { color: #35586C; font-style: italic } /* Comment.Single */ 12 | pre code.cs { color: #35586C; font-weight: bold; font-style: italic } /* Comment.Special */ 13 | pre code.gd { background-color: #FFCCCC } /* Generic.Deleted */ 14 | pre code.ge { font-style: italic } /* Generic.Emph */ 15 | pre code.gr { color: #FF0000 } /* Generic.Error */ 16 | pre code.gh { color: #003300; font-weight: bold } /* Generic.Heading */ 17 | pre code.gi { background-color: #CCFFCC } /* Generic.Inserted */ 18 | 19 | /* Overriding default manni style of #AAAAAA gray for Generic Output with #000000 black, which is better suited to ORM terminal output */ 20 | pre code.go { color: #000000 } /* Generic.Output */ 21 | 22 | pre code.gp { color: #000099; font-weight: bold } /* Generic.Prompt */ 23 | pre code.gs { font-weight: bold } /* Generic.Strong */ 24 | pre code.gu { color: #003300; font-weight: bold } /* Generic.Subheading */ 25 | pre code.gt { color: #99CC66 } /* Generic.Traceback */ 26 | pre code.kc { color: #006699; font-weight: bold } /* Keyword.Constant */ 27 | pre code.kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ 28 | pre code.kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ 29 | pre code.kp { color: #006699 } /* Keyword.Pseudo */ 30 | pre code.kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ 31 | pre code.kt { color: #007788; font-weight: bold } /* Keyword.Type */ 32 | pre code.m { color: #FF6600 } /* Literal.Number */ 33 | pre code.s { color: #CC3300 } /* Literal.String */ 34 | pre code.na { color: #330099 } /* Name.Attribute */ 35 | pre code.nb { color: #336666 } /* Name.Builtin */ 36 | pre code.nc { color: #00AA88; font-weight: bold } /* Name.Class */ 37 | pre code.no { color: #336600 } /* Name.Constant */ 38 | pre code.nd { color: #9999FF } /* Name.Decorator */ 39 | pre code.ni { color: #999999; font-weight: bold } /* Name.Entity */ 40 | pre code.ne { color: #CC0000; font-weight: bold } /* Name.Exception */ 41 | pre code.nf { color: #CC00FF } /* Name.Function */ 42 | pre code.nl { color: #9999FF } /* Name.Label */ 43 | pre code.nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ 44 | pre code.nt { color: #330099; font-weight: bold } /* Name.Tag */ 45 | pre code.nv { color: #003333 } /* Name.Variable */ 46 | pre code.ow { color: #000000; font-weight: bold } /* Operator.Word */ 47 | pre code.w { color: #bbbbbb } /* Text.Whitespace */ 48 | pre code.mf { color: #FF6600 } /* Literal.Number.Float */ 49 | pre code.mh { color: #FF6600 } /* Literal.Number.Hex */ 50 | pre code.mi { color: #FF6600 } /* Literal.Number.Integer */ 51 | pre code.mo { color: #FF6600 } /* Literal.Number.Oct */ 52 | pre code.sb { color: #CC3300 } /* Literal.String.Backtick */ 53 | pre code.sc { color: #CC3300 } /* Literal.String.Char */ 54 | pre code.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 55 | pre code.s2 { color: #CC3300 } /* Literal.String.Double */ 56 | pre code.se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ 57 | pre code.sh { color: #CC3300 } /* Literal.String.Heredoc */ 58 | pre code.si { color: #AA0000 } /* Literal.String.Interpol */ 59 | pre code.sx { color: #CC3300 } /* Literal.String.Other */ 60 | pre code.sr { color: #33AAAA } /* Literal.String.Regex */ 61 | pre code.s1 { color: #CC3300 } /* Literal.String.Single */ 62 | 63 | /* Overriding manni default yellow #FFCC33 with brown #AA6600, which is easier to read */ 64 | pre code.ss { color: #AA6600 } /* Literal.String.Symbol */ 65 | 66 | pre code.bp { color: #336666 } /* Name.Builtin.Pseudo */ 67 | pre code.vc { color: #003333 } /* Name.Variable.Class */ 68 | pre code.vg { color: #003333 } /* Name.Variable.Global */ 69 | pre code.vi { color: #003333 } /* Name.Variable.Instance */ 70 | pre code.il { color: #FF6600 } /* Literal.Number.Integer.Long */ 71 | 72 | /* Sanders's additions to manni */ 73 | pre code.g { color: #005500 } /* Generic */ 74 | pre code.l { color: #CC6600 } /* Literal */ 75 | pre code.l { color: #FF9900 } /* Literal.Date */ 76 | pre code.n { color: #000088 } /* Name */ 77 | pre code.nx { color: #000088 } /* Name.Other */ 78 | pre code.py { color: #9966FF } /* Name.Property */ 79 | pre code.p { color: #000000 } /* Punctuation */ 80 | pre code.x { color: #FF0066 } /* Other */ 81 | 82 | /* Chacon's additions to make command line look more like a command line */ 83 | pre[data-code-language="console"] { 84 | background: #ddd; 85 | padding: 10px; 86 | } 87 | pre[data-code-language="console"] code.go { 88 | color: #555; 89 | font-size: 1.0em; 90 | } 91 | pre[data-code-language="console"] code.gp { 92 | color: #009900; 93 | font-weight: bold; 94 | } 95 | -------------------------------------------------------------------------------- /theme/html/html.xsl: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /theme/mobi/mobi.css: -------------------------------------------------------------------------------- 1 | /* syntax highlighting and coloring text in general */ 2 | 3 | /* Pygments with manni theme */ 4 | pre code.hll { background-color: #ffffcc } 5 | pre code.c { color: #0099FF; font-style: italic } /* Comment */ 6 | pre code.err { color: #AA0000 } /* Error */ 7 | pre code.k { color: #006699; font-weight: bold } /* Keyword */ 8 | pre code.o { color: #555555 } /* Operator */ 9 | pre code.cm { color: #35586C; font-style: italic } /* Comment.Multiline */ 10 | pre code.cp { color: #009999 } /* Comment.Preproc */ 11 | pre code.c1 { color: #35586C; font-style: italic } /* Comment.Single */ 12 | pre code.cs { color: #35586C; font-weight: bold; font-style: italic } /* Comment.Special */ 13 | pre code.gd { background-color: #FFCCCC } /* Generic.Deleted */ 14 | pre code.ge { font-style: italic } /* Generic.Emph */ 15 | pre code.gr { color: #FF0000 } /* Generic.Error */ 16 | pre code.gh { color: #003300; font-weight: bold } /* Generic.Heading */ 17 | pre code.gi { background-color: #CCFFCC } /* Generic.Inserted */ 18 | 19 | /* Overriding default manni style of #AAAAAA gray for Generic Output with #000000 black, which is better suited to ORM terminal output */ 20 | pre code.go { color: #000000 } /* Generic.Output */ 21 | 22 | pre code.gp { color: #000099; font-weight: bold } /* Generic.Prompt */ 23 | pre code.gs { font-weight: bold } /* Generic.Strong */ 24 | pre code.gu { color: #003300; font-weight: bold } /* Generic.Subheading */ 25 | pre code.gt { color: #99CC66 } /* Generic.Traceback */ 26 | pre code.kc { color: #006699; font-weight: bold } /* Keyword.Constant */ 27 | pre code.kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ 28 | pre code.kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ 29 | pre code.kp { color: #006699 } /* Keyword.Pseudo */ 30 | pre code.kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ 31 | pre code.kt { color: #007788; font-weight: bold } /* Keyword.Type */ 32 | pre code.m { color: #FF6600 } /* Literal.Number */ 33 | pre code.s { color: #CC3300 } /* Literal.String */ 34 | pre code.na { color: #330099 } /* Name.Attribute */ 35 | pre code.nb { color: #336666 } /* Name.Builtin */ 36 | pre code.nc { color: #00AA88; font-weight: bold } /* Name.Class */ 37 | pre code.no { color: #336600 } /* Name.Constant */ 38 | pre code.nd { color: #9999FF } /* Name.Decorator */ 39 | pre code.ni { color: #999999; font-weight: bold } /* Name.Entity */ 40 | pre code.ne { color: #CC0000; font-weight: bold } /* Name.Exception */ 41 | pre code.nf { color: #CC00FF } /* Name.Function */ 42 | pre code.nl { color: #9999FF } /* Name.Label */ 43 | pre code.nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ 44 | pre code.nt { color: #330099; font-weight: bold } /* Name.Tag */ 45 | pre code.nv { color: #003333 } /* Name.Variable */ 46 | pre code.ow { color: #000000; font-weight: bold } /* Operator.Word */ 47 | pre code.w { color: #bbbbbb } /* Text.Whitespace */ 48 | pre code.mf { color: #FF6600 } /* Literal.Number.Float */ 49 | pre code.mh { color: #FF6600 } /* Literal.Number.Hex */ 50 | pre code.mi { color: #FF6600 } /* Literal.Number.Integer */ 51 | pre code.mo { color: #FF6600 } /* Literal.Number.Oct */ 52 | pre code.sb { color: #CC3300 } /* Literal.String.Backtick */ 53 | pre code.sc { color: #CC3300 } /* Literal.String.Char */ 54 | pre code.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 55 | pre code.s2 { color: #CC3300 } /* Literal.String.Double */ 56 | pre code.se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ 57 | pre code.sh { color: #CC3300 } /* Literal.String.Heredoc */ 58 | pre code.si { color: #AA0000 } /* Literal.String.Interpol */ 59 | pre code.sx { color: #CC3300 } /* Literal.String.Other */ 60 | pre code.sr { color: #33AAAA } /* Literal.String.Regex */ 61 | pre code.s1 { color: #CC3300 } /* Literal.String.Single */ 62 | 63 | /* Overriding manni default yellow #FFCC33 with brown #AA6600, which is easier to read */ 64 | pre code.ss { color: #AA6600 } /* Literal.String.Symbol */ 65 | 66 | pre code.bp { color: #336666 } /* Name.Builtin.Pseudo */ 67 | pre code.vc { color: #003333 } /* Name.Variable.Class */ 68 | pre code.vg { color: #003333 } /* Name.Variable.Global */ 69 | pre code.vi { color: #003333 } /* Name.Variable.Instance */ 70 | pre code.il { color: #FF6600 } /* Literal.Number.Integer.Long */ 71 | 72 | /* Sanders's additions to manni */ 73 | pre code.g { color: #005500 } /* Generic */ 74 | pre code.l { color: #CC6600 } /* Literal */ 75 | pre code.l { color: #FF9900 } /* Literal.Date */ 76 | pre code.n { color: #000088 } /* Name */ 77 | pre code.nx { color: #000088 } /* Name.Other */ 78 | pre code.py { color: #9966FF } /* Name.Property */ 79 | pre code.p { color: #000000 } /* Punctuation */ 80 | pre code.x { color: #FF0066 } /* Other */ 81 | 82 | /* Chacon's additions to make command line look more like a command line */ 83 | pre[data-code-language="console"] { 84 | background: #ddd; 85 | padding: 10px; 86 | } 87 | pre[data-code-language="console"] code.go { 88 | color: #555; 89 | font-size: 1.0em; 90 | } 91 | pre[data-code-language="console"] code.gp { 92 | color: #009900; 93 | font-weight: bold; 94 | } 95 | -------------------------------------------------------------------------------- /theme/mobi/mobi.xsl: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /theme/pdf/pdf.css: -------------------------------------------------------------------------------- 1 | /* syntax highlighting and coloring text in general */ 2 | 3 | /* Pygments with manni theme */ 4 | pre code.hll { background-color: #ffffcc } 5 | pre code.c { color: #0099FF; font-style: italic } /* Comment */ 6 | pre code.err { color: #AA0000 } /* Error */ 7 | pre code.k { color: #006699; font-weight: bold } /* Keyword */ 8 | pre code.o { color: #555555 } /* Operator */ 9 | pre code.cm { color: #35586C; font-style: italic } /* Comment.Multiline */ 10 | pre code.cp { color: #009999 } /* Comment.Preproc */ 11 | pre code.c1 { color: #35586C; font-style: italic } /* Comment.Single */ 12 | pre code.cs { color: #35586C; font-weight: bold; font-style: italic } /* Comment.Special */ 13 | pre code.gd { background-color: #FFCCCC } /* Generic.Deleted */ 14 | pre code.ge { font-style: italic } /* Generic.Emph */ 15 | pre code.gr { color: #FF0000 } /* Generic.Error */ 16 | pre code.gh { color: #003300; font-weight: bold } /* Generic.Heading */ 17 | pre code.gi { background-color: #CCFFCC } /* Generic.Inserted */ 18 | 19 | /* Overriding default manni style of #AAAAAA gray for Generic Output with #000000 black, which is better suited to ORM terminal output */ 20 | pre code.go { color: #000000 } /* Generic.Output */ 21 | 22 | pre code.gp { color: #000099; font-weight: bold } /* Generic.Prompt */ 23 | pre code.gs { font-weight: bold } /* Generic.Strong */ 24 | pre code.gu { color: #003300; font-weight: bold } /* Generic.Subheading */ 25 | pre code.gt { color: #99CC66 } /* Generic.Traceback */ 26 | pre code.kc { color: #006699; font-weight: bold } /* Keyword.Constant */ 27 | pre code.kd { color: #006699; font-weight: bold } /* Keyword.Declaration */ 28 | pre code.kn { color: #006699; font-weight: bold } /* Keyword.Namespace */ 29 | pre code.kp { color: #006699 } /* Keyword.Pseudo */ 30 | pre code.kr { color: #006699; font-weight: bold } /* Keyword.Reserved */ 31 | pre code.kt { color: #007788; font-weight: bold } /* Keyword.Type */ 32 | pre code.m { color: #FF6600 } /* Literal.Number */ 33 | pre code.s { color: #CC3300 } /* Literal.String */ 34 | pre code.na { color: #330099 } /* Name.Attribute */ 35 | pre code.nb { color: #336666 } /* Name.Builtin */ 36 | pre code.nc { color: #00AA88; font-weight: bold } /* Name.Class */ 37 | pre code.no { color: #336600 } /* Name.Constant */ 38 | pre code.nd { color: #9999FF } /* Name.Decorator */ 39 | pre code.ni { color: #999999; font-weight: bold } /* Name.Entity */ 40 | pre code.ne { color: #CC0000; font-weight: bold } /* Name.Exception */ 41 | pre code.nf { color: #CC00FF } /* Name.Function */ 42 | pre code.nl { color: #9999FF } /* Name.Label */ 43 | pre code.nn { color: #00CCFF; font-weight: bold } /* Name.Namespace */ 44 | pre code.nt { color: #330099; font-weight: bold } /* Name.Tag */ 45 | pre code.nv { color: #003333 } /* Name.Variable */ 46 | pre code.ow { color: #000000; font-weight: bold } /* Operator.Word */ 47 | pre code.w { color: #bbbbbb } /* Text.Whitespace */ 48 | pre code.mf { color: #FF6600 } /* Literal.Number.Float */ 49 | pre code.mh { color: #FF6600 } /* Literal.Number.Hex */ 50 | pre code.mi { color: #FF6600 } /* Literal.Number.Integer */ 51 | pre code.mo { color: #FF6600 } /* Literal.Number.Oct */ 52 | pre code.sb { color: #CC3300 } /* Literal.String.Backtick */ 53 | pre code.sc { color: #CC3300 } /* Literal.String.Char */ 54 | pre code.sd { color: #CC3300; font-style: italic } /* Literal.String.Doc */ 55 | pre code.s2 { color: #CC3300 } /* Literal.String.Double */ 56 | pre code.se { color: #CC3300; font-weight: bold } /* Literal.String.Escape */ 57 | pre code.sh { color: #CC3300 } /* Literal.String.Heredoc */ 58 | pre code.si { color: #AA0000 } /* Literal.String.Interpol */ 59 | pre code.sx { color: #CC3300 } /* Literal.String.Other */ 60 | pre code.sr { color: #33AAAA } /* Literal.String.Regex */ 61 | pre code.s1 { color: #CC3300 } /* Literal.String.Single */ 62 | 63 | /* Overriding manni default yellow #FFCC33 with brown #AA6600, which is easier to read */ 64 | pre code.ss { color: #AA6600 } /* Literal.String.Symbol */ 65 | 66 | pre code.bp { color: #336666 } /* Name.Builtin.Pseudo */ 67 | pre code.vc { color: #003333 } /* Name.Variable.Class */ 68 | pre code.vg { color: #003333 } /* Name.Variable.Global */ 69 | pre code.vi { color: #003333 } /* Name.Variable.Instance */ 70 | pre code.il { color: #FF6600 } /* Literal.Number.Integer.Long */ 71 | 72 | /* Sanders's additions to manni */ 73 | pre code.g { color: #005500 } /* Generic */ 74 | pre code.l { color: #CC6600 } /* Literal */ 75 | pre code.l { color: #FF9900 } /* Literal.Date */ 76 | pre code.n { color: #000088 } /* Name */ 77 | pre code.nx { color: #000088 } /* Name.Other */ 78 | pre code.py { color: #9966FF } /* Name.Property */ 79 | pre code.p { color: #000000 } /* Punctuation */ 80 | pre code.x { color: #FF0066 } /* Other */ 81 | 82 | /* Chacon's additions to make command line look more like a command line */ 83 | pre[data-code-language="console"] { 84 | background: #ddd; 85 | padding: 10px; 86 | } 87 | pre[data-code-language="console"] code.go { 88 | color: #555; 89 | font-size: 1.0em; 90 | } 91 | pre[data-code-language="console"] code.gp { 92 | color: #009900; 93 | font-weight: bold; 94 | } 95 | -------------------------------------------------------------------------------- /theme/pdf/pdf.xsl: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /theme/pdf/pdf.xsl~: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | --------------------------------------------------------------------------------