Skip to content

Commit 48a4234

Browse files
djalmaoliveiraschacon
authored andcommitted
39_ to 54_ done
Signed-off-by: Scott Chacon <schacon@gmail.com>
1 parent b0b823e commit 48a4234

File tree

15 files changed

+428
-430
lines changed

15 files changed

+428
-430
lines changed
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
## Setting Up A Public Repository ##
1+
## Configurando um Repositório Público ##
22

3-
Assume your personal repository is in the directory ~/proj. We
4-
first create a new clone of the repository and tell git-daemon that it
5-
is meant to be public:
3+
Assuma que seu repositório pessoal está no diretório ~/proj. Primeiro
4+
criamos um novo clone do repositório e pedimos ao git-daemon que ele
5+
seja público:
66

77
$ git clone --bare ~/proj proj.git
88
$ touch proj.git/git-daemon-export-ok
99

10-
The resulting directory proj.git contains a "bare" git repository--it is
11-
just the contents of the ".git" directory, without any files checked out
12-
around it.
10+
O diretório resultante proj.git contém um repositório git "mínimo" -- ele
11+
é só o conteúdo do diretório ".git", sem qualquer arquivo dentro dele.
1312

14-
Next, copy proj.git to the server where you plan to host the
15-
public repository. You can use scp, rsync, or whatever is most
16-
convenient.
13+
Depois, copie o proj.git para o servidor onde você planeja hospedar o
14+
repositório público. Você pode usar scp, rsync, ou qualquer coisa mais
15+
conveniente.
1716

18-
### Exporting a git repository via the git protocol ###
17+
### Exportando um repositório git via protocolo git ###
1918

20-
This is the preferred method.
19+
Esse é o método preferido.
2120

22-
If someone else administers the server, they should tell you what
23-
directory to put the repository in, and what git:// URL it will appear
24-
at.
21+
Se alguém então administrar o servidor, ele deveráo pedir a você qual o
22+
diretório para colocar o repositório dentro, e qual URL git:// aparecerá nele.
2523

26-
Otherwise, all you need to do is start linkgit:git-daemon[1]; it will
27-
listen on port 9418. By default, it will allow access to any directory
28-
that looks like a git directory and contains the magic file
29-
git-daemon-export-ok. Passing some directory paths as git-daemon
30-
arguments will further restrict the exports to those paths.
24+
Se não fosse assim, tudo que você precisa para fazer isso é iniciar
25+
linkgit:git-daemon[1]; ele ouvirá a porta 9418. Por padrão, permitirá acessar
26+
qualquer diretório que se pareça com um diretório git e contém o arquivo mágico
27+
git-daemon-export-ok. Passando alguns caminhos de diretórios como argumentos
28+
para git-daemon restringirá mais ainda esses caminhos exportados.
3129

32-
You can also run git-daemon as an inetd service; see the
33-
linkgit:git-daemon[1] man page for details. (See especially the
34-
examples section.)
30+
Você pode também executar git-daemon como um serviço inetd; veja as páginas
31+
de manual do linkgit:git-daemon[1] para mais detalhes. (Veja especialmente a
32+
seção de exemplos.)
3533

36-
### Exporting a git repository via http ###
34+
### Exportando um repositório git via http ###
3735

38-
The git protocol gives better performance and reliability, but on a
39-
host with a web server set up, http exports may be simpler to set up.
36+
O protocolo git dá melhor desempenho e confiabilidade, mas sobre host com
37+
um servidor web configurado, exportar via http pode ser mais simples de
38+
configurar.
4039

41-
All you need to do is place the newly created bare git repository in
42-
a directory that is exported by the web server, and make some
43-
adjustments to give web clients some extra information they need:
40+
Tudo que você precisa fazer é colocar o recém criado repositório git
41+
mínimo no diretório que está exportado pelo web server, e fazer alguns
42+
ajustes para dar os clientes webs algumas informações extras que eles
43+
precisam:
4444

4545
$ mv proj.git /home/you/public_html/proj.git
4646
$ cd proj.git
4747
$ git --bare update-server-info
4848
$ chmod a+x hooks/post-update
4949

50-
(For an explanation of the last two lines, see
51-
linkgit:git-update-server-info[1] and linkgit:githooks[5].)
50+
(Para uma explicação das últimas duas linhas, veja
51+
linkgit:git-update-server-info[1] e linkgit:githooks[5].)
5252

53-
Advertise the URL of proj.git. Anybody else should then be able to
54-
clone or pull from that URL, for example with a command line like:
53+
Divulgue a URL do proj.git. Qualquer um então deveria ser capaz de clonar
54+
ou receber dessa URL, por exemplo com a linha de comando:
5555

5656
$ git clone http://yourserver.com/~you/proj.git

text/39_SCM_Migration/0_Scm_Migration.markdown

100644100755
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
## SCM Migration ##
1+
## Migração de um SCM ##
22

3-
So you've made the decision to move away from your existing system
4-
and convert your whole project to Git. How can you do that easily?
3+
Então você tomou a decisão de mudar de seu sistema atual e converter todo o
4+
seu projeto para o Git. Como você pode fazer isso facilmente?
55

6-
### Importing Subversion ###
6+
### Importando do Subversion ###
77

8-
Git comes with a script called git-svn that has a clone command that
9-
will import a subversion repository into a new git repository. There
10-
is also a free tool on the GitHub service that will do this for you.
8+
Git vem com um script chamado git-svn que tem um comando clone que importará um
9+
repositório subversion dentro de um novo repositório git. Existe também uma
10+
ferramenta grátis no GitHub que pode fazer isso para você.
1111

1212
$ git-svn clone http://my-project.googlecode.com/svn/trunk new-project
1313

14-
This will give you a new Git repository with all the history of the
15-
original Subversion repo. This takes a pretty good amount of time, generally,
16-
since it starts with version 1 and checks out and commits locally every
17-
single revision one by one.
14+
Isso dará a você um novo repositório Git com todo o histórico do repositório
15+
original do Subversion. Isso levará um bom tempo, geralmente, desde o início com
16+
a versão 1 e checkouts e commits locais a cada simples revisão um por um.
1817

19-
### Importing Perforce ###
18+
### Importando do Perforce ###
2019

21-
In contrib/fast-import you will find the git-p4 script, which is a
22-
Python script that will import a Perforce repository for you.
20+
Em contrib/fast-import você encontrará o script git-p4, que é um script em Python
21+
que importará um repositório Perforce para você.
2322

2423
$ ~/git.git/contrib/fast-import/git-p4 clone //depot/project/main@all myproject
2524

2625

27-
### Importing Others ###
26+
### Importando Outros ###
2827

29-
These are other SCMs that listed high on the Git Survey, should find import
30-
docs for them. !!TODO!!
28+
Existem outros SCMs que são listados no Git Survey, deveria encontrar a
29+
documentação de importação deles. !!A FAZER!!
3130

3231
* CVS
3332
* Mercurial (hg)
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
## Graphical Git ##
1+
## Git Gráfico ##
22

3-
Git has a couple of fairly popular Graphial User Interfaces that can
4-
read and/or maniplulate Git repositories.
3+
Git tem algumas bastante populares GUIs (Graphial User Interfaces) que podem
4+
ler e/ou manipular repositórios Git.
55

66
### Bundled GUIs ###
77

8-
Git comes with two major GUI programs written in Tcl/Tk. Gitk is a
9-
repository browser and commit history visualization tool.
8+
Git vez com dois dos principais programas GUI escrito em Tcl/Tk. Gitk é uma
9+
ferramente de navegação de repositório e visualização do histórico de commits.
1010

1111
[gitk](http://www.kernel.org/pub/software/scm/git/docs/gitk.html)
1212

13-
linkgit:git-gui[1] is a tool that helps you visualize the index operations,
14-
like add, remove and commit. It won't do everything you can do on the
15-
command line, but for many of the basic operations, it's pretty good.
13+
linkgit:git-gui[1] é uma ferramenta que ajuda você a visualizar as operações no
14+
index, como add, remove e commit. Ele não fará tudo que pode fazer na linha de
15+
comando, mas para muitas operações básicas, ele é muito bom.
1616

1717
[git gui](http://www.kernel.org/pub/software/scm/git/docs/git-gui.html)
18-
19-
### Third Party Projects ###
2018

21-
For Mac users, there is
19+
### Terceira Parte Projects ###
20+
21+
Para usuários Mac exite
2222
[GitNub](http://github.com/Caged/gitnub/wikis)
2323

24-
For Linux or other Qt users, there is
24+
Para usuários Linux ou Qt existe
2525
[QGit](http://digilander.libero.it/mcostalba/)
26-
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
## Hosted Git ##
1+
## Hospedagem Git ##
22

33
github
44

5-
repoorcz
6-
5+
repoorcz
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
## Alternative Uses ##
1+
## Usos Alternativos ##
22

33
ContentDistribution
44

5-
TicGit
5+
TicGit

text/44_Scripting_and_Git/0_ Ruby_and_Git_grit.markdown

100644100755
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
## Scripting and Git ##
1+
## Scripting e Git ##
22

33

4-
### Ruby and Git ###
4+
### Ruby e Git ###
55

66
grit
77

88
jgit + jruby
99

1010

11-
### PHP and Git ###
11+
### PHP e Git ###
1212

1313

1414

15-
### Python and Git ###
15+
### Python e Git ###
1616

1717
pygit
1818

1919

20-
### Perl and Git ###
20+
### Perl e Git ###
2121

2222
perlgit
23-
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## Git and Editors ##
1+
## Git e Editors ##
22

3-
textmate
3+
textmate
44

55
eclipse
6-
7-
netbeans
6+
7+
netbeans
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Internals and Plumbing #
1+
# Internals and Plumbing #
22

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
1-
## How Git Stores Objects ##
1+
## Como o Git Armazena Objetos ##
22

3-
This chapter goes into detail about how Git physically stores objects.
3+
Esse capítulo mostra em detalhes como o Git fisicamente armazenda os objetos.
44

5-
All objects are stored as compressed contents by their sha values. They
6-
contain the object type, size and contents in a gzipped format.
5+
Todos os objetos são armazenados pela compressão do conteúdo de acordo com os
6+
seus valores sha. Eles contém o tipo de objeto, tamanho e conteúdo no formato
7+
gzip.
78

8-
There are two formats that Git keeps objects in - loose objects and
9-
packed objects.
9+
Existem dois formatos que o Git mantém os objetos - objetos loose e packed.
1010

11-
### Loose Objects ###
11+
### Objetos Loose ###
1212

13-
Loose objects are the simpler format. It is simply the compressed data stored
14-
in a single file on disk. Every object written to a seperate file.
13+
Objetos loose é o formato mais simples. Ele é simplesmente a compressão dos dados
14+
armazenados em um simples arquivo no disco. Cada objeto é escrito em um arquivo
15+
separado.
1516

16-
If the sha of your object is <code>ab04d884140f7b0cf8bbf86d6883869f16a46f65</code>,
17-
then the file will be stored in the following path:
17+
Se o sha do seu objeto é <code>ab04d884140f7b0cf8bbf86d6883869f16a46f65</code>,
18+
então o arquivo será armazenado com o seguinte caminho:
1819

1920
GIT_DIR/objects/ab/04d884140f7b0cf8bbf86d6883869f16a46f65
2021

21-
It pulls the first two characters off and uses that as the subdirectory, so that
22-
there are never too many objects in one directory. The actual file name is
23-
the remaining 38 characters.
22+
Ele retira os dois primeiros caracteres e usa-o como sub-diretório, para que
23+
nunca exista muitos objetos em um diretório. O nome do arquivo na verdade é o
24+
restante dos 38 caracteres.
2425

25-
The easiest way to describe exactly how the object data is stored is this Ruby
26-
implementation of object storage:
26+
A forma mais fácil de descrever exatamente como os dados do objeto são
27+
armazenados é essa implementação em Ruby do armazenamento do objeto:
2728

2829
ruby
2930
def put_raw_object(content, type)
3031
size = content.length.to_s
31-
32+
3233
header = "#{type} #{size}\0"
3334
store = header + content
34-
35+
3536
sha1 = Digest::SHA1.hexdigest(store)
3637
path = @git_dir + '/' + sha1[0...2] + '/' + sha1[2..40]
37-
38+
3839
if !File.exists?(path)
3940
content = Zlib::Deflate.deflate(store)
40-
41+
4142
FileUtils.mkdir_p(@directory+'/'+sha1[0...2])
4243
File.open(path, 'w') do |f|
4344
f.write content
@@ -46,32 +47,31 @@ implementation of object storage:
4647
return sha1
4748
end
4849

49-
### Packed Objects ###
50-
51-
The other format for object storage is the packfile. Since Git stores each
52-
version of each file as a seperate object, it can get pretty inefficient.
53-
Imagine having a file several thousand lines long and changing a single line.
54-
Git will store the second file in it's entirety, which is a great big waste
55-
of space.
56-
57-
In order to save that space, Git utilizes the packfile. This is a format
58-
where Git will only save the part that has changed in the second file, with
59-
a pointer to the file it is similar to.
60-
61-
When objects are written to disk, it is often in the loose format, since
62-
that format is less expensive to access. However, eventually you'll want
63-
to save the space by packing up the objects - this is done with the
64-
linkgit:git-gc[1] command. It will use a rather complicated heuristic to
65-
determine which files are likely most similar and base the deltas off that
66-
analysis. There can be multiple packfiles, they can be repacked if neccesary
67-
(linkgit:git-repack[1]) or unpacked back into loose files
68-
(linkgit:git-unpack-objects[1]) relatively easily.
69-
70-
Git will also write out an index file for each packfile that is much smaller
71-
and contains offsets into the packfile to more quickly find specific objects
72-
by sha.
73-
74-
The actual details of the packfile implementation are found in the Packfile
75-
chapter a little later on.
76-
77-
50+
### Objetos Packed ###
51+
52+
O outro formato para o armazenamento de objetos é o packfile. Desde que o Git
53+
armazena cada versão do arquivo em um objeto separado, isso pode ser bastante
54+
ineficiente.
55+
Imagine tendo um arquivo com milhares de linhas e então altera uma simples linha.
56+
Git armazenará o segundo arquivo inteiramente nele, que é um grande desperdício
57+
de espaço.
58+
59+
Segundo as regras para a economia de espaço, Git utiliza o packfile. Esse é um
60+
formato onde o Git somente gravará a parte que foi alterada no segundo arquivo,
61+
com um apontador para o arquivo original.
62+
63+
Quando os objetos são escritos no disco, frquentemente é no formato loose,
64+
desde que o formato seja menos dispendioso para acessar. Contudo, finalmente
65+
você irá querer economizar espaço através do empacotamento dos objetos - isso
66+
é feito com o comando linkgit:git-gc[1]. Ele usará uma heurística bastante
67+
complicada para determinar quais arquivos são provavelmente mais semelhantes e
68+
e basear os deltas dessa análise. Podem ser múltiplos packfiles, eles podem ser
69+
re-empacotados se necessário (linkgit:git-repack[1]) ou desempacotados de volta
70+
em arquivos loose (linkgit:git-unpack-objects[1]) com relativa facilidade.
71+
72+
Git também escreverá um arquivo index para cada packfile que é muito menor e
73+
contém o deslocamento dentro do packfile para rapidamente encontrar objetos
74+
específicos através do sha.
75+
76+
Os detalhes exatos da implementação do packfile são encontrados no capítulo
77+
Packfile um pouco mais tarde.

0 commit comments

Comments
 (0)