Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Relatar um problema
description: Informe um erro no texto, na tradução ou nos arquivos gerados
labels: ["bug"]
body:
- type: checkboxes
attributes:
label: Não existe uma issue igual ou semelhante
description: Pesquise as issues existentes antes de registrar o problema.
options:
- label: Pesquisei as issues existentes
required: true

- type: dropdown
attributes:
label: Onde está o problema?
options:
- "Texto ou tradução"
- "Build ou arquivo gerado"
- "Texto e build"
- "Não sei"
validations:
required: true

- type: input
attributes:
label: Seção ou arquivo afetado
description: Informe o capítulo, a seção, a URL ou o nome do arquivo.
placeholder: "book/02-git-basics/sections/remotes.asc"
validations:
required: true

- type: textarea
attributes:
label: Descrição
description: Explique de forma clara o erro encontrado.
validations:
required: true

- type: textarea
attributes:
label: Resultado esperado
description: Diga como o texto ou o arquivo deveria aparecer.
validations:
required: true

- type: textarea
attributes:
label: Passos para reproduzir
description: Para problemas de build ou renderização, informe os comandos e o ambiente usados.
placeholder: |
1. Executei `...`
2. Abri `...`
3. O erro apresentado foi `...`
validations:
required: false

- type: textarea
attributes:
label: Contexto adicional
description: Inclua capturas de tela, logs ou referências relacionadas, se forem úteis.
validations:
required: false

- type: checkboxes
attributes:
label: O problema também existe na edição inglesa?
description: Compare com https://git-scm.com/book/en/v2 quando isso for aplicável.
options:
- label: Também encontrei o problema na edição inglesa
validations:
required: false
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
blank_issues_enabled: true
contact_links:
- name: Problema no texto original em inglês
url: https://github.com/progit/progit2/issues
about: Relate no repositório inglês os problemas que também existem na fonte original.

- name: Problema no site git-scm.com
url: https://github.com/git/git-scm.com/issues/
about: Relate nesse repositório os problemas específicos do site.

- name: Problema no programa Git
url: https://git-scm.com/community
about: Consulte os canais da comunidade para relatar problemas do próprio Git.

- name: Problema no Git for Windows
url: https://github.com/git-for-windows/git/issues
about: Relate nesse repositório os problemas específicos do Git for Windows.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement_idea.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Propor uma melhoria
description: Sugira uma melhoria para a tradução ou para o repositório pt-BR
labels: ["enhancement"]
body:
- type: textarea
attributes:
label: Visão geral da proposta
description: Descreva objetivamente a mudança sugerida.
validations:
required: true

- type: textarea
attributes:
label: Que problema isso resolve?
description: Explique por que a mudança seria útil para quem lê ou contribui.
validations:
required: true

- type: textarea
attributes:
label: Alternativas consideradas
description: Informe outras soluções avaliadas, se houver.
validations:
required: false

- type: dropdown
attributes:
label: Você gostaria de ajudar a implementar essa melhoria?
options:
- "Sim"
- "Talvez"
- "Não"
validations:
required: true
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
# Maintain dependencies for Ruby
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "daily" # Checks on Monday through Friday.

# Maintain GitHub Action runners
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily" # Checks on Monday through Friday.

# Set default reviewer and labels
reviewers:
- "ben"
labels:
- "dependabot"
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- Obrigado por contribuir! -->
<!-- Antes de uma reescrita extensa ou mudança estrutural, abra uma issue para discussão. -->
<!-- Marque as caixas com [X] ou [x]. -->

- [ ] Forneço meu trabalho sob a [licença do projeto](https://github.com/progit/progit2-pt-br/blob/master/LICENSE.asc).
- [ ] Concedo a [Ben Straub](https://github.com/ben) e [Scott Chacon](https://github.com/schacon) a licença necessária para futuras edições impressas.
- [ ] Revisei integralmente o texto em português, inclusive qualquer conteúdo produzido com apoio de tradução automática ou IA.
- [ ] Preservei âncoras, referências, comandos, código e a estrutura da edição inglesa.

## Alterações

-

## Contexto

<!--
Indique os arquivos ou seções alterados, a referência inglesa e as decisões terminológicas relevantes.
Use "Fixes #123" se este PR deve encerrar uma issue quando for mesclado.
-->

## Validação

- [ ] `bundle exec rake book:build_html`
- [ ] `bundle exec rake book:build`
- [ ] Outra (descreva):

## English summary

<!-- Summarize the scope and validation in two or three sentences. -->
12 changes: 4 additions & 8 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@ name: Pull Request Build

on:
pull_request:
branches: [ main, master ]
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Download bootstrap file
run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh
- name: Run bootstrap
run: sh bootstrap.sh
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.1
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Build book
run: bundle exec rake book:build_action
run: bundle exec rake book:build
34 changes: 15 additions & 19 deletions .github/workflows/release-on-merge.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,38 @@
name: Release on push to main
name: Release on push to master

on:
push:
branches: [ main, master ]
branches: [ master ]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: get bootstrap file
run: wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh
- name: run bootstrap
run: sh bootstrap.sh
- name: Compute tag name
id: compute-tag
run: |
echo Computing next tag number
LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3)
PATCH=$(($LASTPATCH+1))
echo "::set-output name=tagname::2.1.${PATCH}"
echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.1
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Build release assets
run: bundle exec rake book:build_action
run: bundle exec rake book:build

- name: Compute tag name
id: compute-tag
run: |
echo Computing next tag number
LASTPATCH=$(git describe --tags | cut -d- -f1 | cut -d. -f3)
PATCH=$(($LASTPATCH+1))
echo "tagname=2.1.${PATCH}" >> $GITHUB_OUTPUT

- name: Create release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.compute-tag.outputs.tagname }}
commit: ${{ steps.compute-tag.outputs.branch }}
artifacts: './progit.epub,./progit.mobi,./progit.pdf,./progit.html'
commit: master
artifacts: './progit.epub,./progit.fb2.zip,./progit.mobi,./progit.pdf,./progit.html'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ progit.html
progit.pdf
progit.pdfmarks
progit.epub
progit.fb2.zip
progit-kf8.epub
progit.mobi

contributors.txt
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Jean-Noël Avila <jn.avila@free.fr>
Scott Chacon <schacon@gmail.com>
4 changes: 2 additions & 2 deletions .tgitconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[bugtraq]
url = https://github.com/progit/progit2/issues/%BUGID%
logregex = "[Ii]ssues?:?(\\s*(,|and)?\\s*#?\\d+)+\n(\\d+)"
url = https://github.com/progit/progit2-pt-br/issues/%BUGID%
logregex = "(?:[Cc]lose[sd]?|[Ff]ix(?:e[sd])?|[Rr]esolve[sd]?):?\\s+(?:[Ii]ssues?\\s+#?|#)\\d+(?:(?:,|\\s+and)\\s+(?:[Ii]ssues?\\s+#?|#)\\d+)*\n(\\d+)"

[tgit]
icon = Pro.ico
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

21 changes: 12 additions & 9 deletions A-git-in-other-environments.asc
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
[#A-git-in-other-environments]
[[A-git-in-other-environments]]
[appendix]
== Git em Outros Ambientes
== Git in Other Environments

Se você leu o livro todo, você aprendeu bastante sobre como usar Git na linha de comando.
Você pode trabalhar com arquivos locais, conectar seu repositório a outros através de uma rede, e trabalhar efetivamente com outrem.
Mas a história não acaba aí: Git é geralmente utilizado como parte de um ecossistema maior, e o terminal nem sempre é a melhor forma de se trabalhar com esse ecossistema.
Agora vamos dar um olhada em alguns dos outros tipos de ambientes onde Git pode ser útil, e como outras aplicações (inclusive a sua) funcionam junto com Git.
If you read through the whole book, you've learned a lot about how to use Git at the command line.
You can work with local files, connect your repository to others over a network, and work effectively with others.
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.
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.

include::book/A-git-in-other-environments/sections/guis.asc[]

include::book/A-git-in-other-environments/sections/visualstudio.asc[]

include::book/A-git-in-other-environments/sections/eclipse.asc[]
include::book/A-git-in-other-environments/sections/visualstudiocode.asc[]

include::book/A-git-in-other-environments/sections/jetbrainsides.asc[]

include::book/A-git-in-other-environments/sections/sublimetext.asc[]

include::book/A-git-in-other-environments/sections/bash.asc[]

include::book/A-git-in-other-environments/sections/zsh.asc[]

include::book/A-git-in-other-environments/sections/powershell.asc[]

=== Resumo
=== Summary

Você aprendeu como aproveitar o potencial do Git dentro de ferramentas que você utiliza durante o seu trabalho cotidiando, e também como acessar repositórios Git a partir dos seus próprios programas.
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.
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
[#B-embedding-git]
[[B-embedding-git-in-your-applications]]
[appendix]
== Embedding Git in your Applications

If your application is for developers, chances are good that it could benefit from integration with source control.
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.

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.
If you need to integrate Git with your application, you have essentially two options: spawn a shell and call the `git` command-line program, or embed a Git library into your application.
Here we'll cover command-line integration and several of the most popular embeddable Git libraries.

include::book/B-embedding-git/sections/command-line.asc[]

include::book/B-embedding-git/sections/libgit2.asc[]

include::book/B-embedding-git/sections/jgit.asc[]

include::book/B-embedding-git/sections/go-git.asc[]

include::book/B-embedding-git/sections/dulwich.asc[]
Loading
Loading