From f8cbe109f9915ad51a85401fc4f53d866d7a61fd Mon Sep 17 00:00:00 2001 From: Juliano Krindges Date: Fri, 4 Oct 2019 09:35:40 -0300 Subject: [PATCH 01/10] =?UTF-8?q?traduzido=20um=20dos=20t=C3=B3picos=20do?= =?UTF-8?q?=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduzido o tópico (Eu quero copiar um arquivo de um determinado commit para meu diretório de trabalho atual.) mantendo alguns termos referentes ao Git em inglês para facilitar a familiarização com os comandos. --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b1bfbab..3544791 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Future Ben, you are welcome! * [I want to view the changes that were made in a given file.](#i-want-to-view-the-changes-that-were-made-in-a-given-file) * [I want to view the contents of a file in a given commit.](#i-want-to-view-the-contents-of-a-file-in-a-given-commit) * [I want to open the contents of a file in a given commit in my editor.](#i-want-to-open-the-contents-of-a-file-in-a-given-commit-in-my-editor) -* [I want to copy a file from a given commit into my current working tree.](#i-want-to-copy-a-file-from-a-given-commit-into-my-current-working-tree) +* [Eu quero copiar um arquivo de um determinado commit para meu diretório de trabalho atual.](#Eu-quero-copiar-um-arquivo-de-um-determinado-commit-para-meu-diretório-de-trabalho-atual.) * [I want to copy the last commit from another branch into my branch.](#i-want-to-copy-the-last-commit-from-another-branch-into-my-branch) * [I want to copy an earlier commit from the current branch to the `head`.](#i-want-to-copy-an-earlier-commit-from-the-current-branch-to-the-head) * [I want to update the files in the current commit.](#i-want-to-update-the-files-in-the-current-commit) @@ -221,16 +221,17 @@ git show my-feature:README.md | subl git show 19e771:README.md | less ``` -### I want to copy a file from a given commit into my current working tree. +### Eu quero copiar um arquivo de um determinado commit para meu diretório de trabalho atual. -Normally, the `checkout` command will update the entire working tree to point to a given commit. However, you can use the `--` modifier to copy (or checkout) a single file from the given commit into your working tree: +Normalmente, o comando `checkout` vai atualizar todo seu diretório para o ponto desse determinado commit. Contudo, você pode usar o modificador `--` para copiar (ou fazer checkout) de um único arquivo do commit para seu diretório atual: ```sh git checkout my-feature -# While staying on the `my-feature` branch, copy the `README.md` file from -# the `master` branch into the current working tree. This will overwrite the -# current version of `README.md` in your working tree. +# Em quanto você estiver no galho (branch) `my-feature`, copie o arquivo `README.md` +# do galho (branch) `master`, para o seu diretório de trabalho atual. Isto vai +# sobreescrever a versão atual do `README.md` do seu diretório de trabalho. + git checkout master -- README.md ``` From 805308168be1d1690633d047ba96b2c1ef931fda Mon Sep 17 00:00:00 2001 From: Juliano Krindges Date: Fri, 4 Oct 2019 09:56:22 -0300 Subject: [PATCH 02/10] =?UTF-8?q?pequena=20altera=C3=A7=C3=A3o=20para=20li?= =?UTF-8?q?nkar=20o=20t=C3=B3pico=20corretanente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3544791..a3f048c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Future Ben, you are welcome! * [I want to view the changes that were made in a given file.](#i-want-to-view-the-changes-that-were-made-in-a-given-file) * [I want to view the contents of a file in a given commit.](#i-want-to-view-the-contents-of-a-file-in-a-given-commit) * [I want to open the contents of a file in a given commit in my editor.](#i-want-to-open-the-contents-of-a-file-in-a-given-commit-in-my-editor) -* [Eu quero copiar um arquivo de um determinado commit para meu diretório de trabalho atual.](#Eu-quero-copiar-um-arquivo-de-um-determinado-commit-para-meu-diretório-de-trabalho-atual.) +* [Eu quero copiar um arquivo de um determinado commit para meu diretório de trabalho atual.](#eu-quero-copiar-um-arquivo-de-um-determinado-commit-para-meu-diretorio-de-trabalho-atual) * [I want to copy the last commit from another branch into my branch.](#i-want-to-copy-the-last-commit-from-another-branch-into-my-branch) * [I want to copy an earlier commit from the current branch to the `head`.](#i-want-to-copy-an-earlier-commit-from-the-current-branch-to-the-head) * [I want to update the files in the current commit.](#i-want-to-update-the-files-in-the-current-commit) @@ -221,7 +221,7 @@ git show my-feature:README.md | subl git show 19e771:README.md | less ``` -### Eu quero copiar um arquivo de um determinado commit para meu diretório de trabalho atual. +### Eu quero copiar um arquivo de um determinado commit para meu diretorio de trabalho atual. Normalmente, o comando `checkout` vai atualizar todo seu diretório para o ponto desse determinado commit. Contudo, você pode usar o modificador `--` para copiar (ou fazer checkout) de um único arquivo do commit para seu diretório atual: From 667362635df23c304b1167c8bed2d492efa387ca Mon Sep 17 00:00:00 2001 From: Juliano Krindges Date: Fri, 4 Oct 2019 10:06:14 -0300 Subject: [PATCH 03/10] =?UTF-8?q?tradu=C3=A7=C3=A3o=20do=20cabe=C3=A7alho?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit traduzi tentando deixar um tom mais impessoal, mas mantendo o sentido da versão em Inglês --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3f048c..b8cf633 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# git Cheat Sheet +# git Dicas by [Ben Nadel](https://www.bennadel.com) for _future Ben Nadel_ -The [`git` API is so vast](https://git-scm.com/docs) and so esoteric, I can barely manage to keep a fraction of one-percent of it in my head. As such, I wanted to outline a few of the commands that I commonly (and sometimes uncommonly) reach for. This way, when I inevitably get stuck and my brain fails me, I have something that I can refer back to. +A [API do `git` é tão vasta](https://git-scm.com/docs) e tão abstrata, que dificilmente poderá se manter uma fração de tudo em mente. Com isso, este é um esboço de alguns poucos comandos que normalmente são usados. Desta maneira, sempre que inevitavelmente a memória falhar, a uma fonte para se referenciar. Future Ben, you are welcome! From b31b3dd7bbcaf456d9bbb8c949ce69ffa1c0a99f Mon Sep 17 00:00:00 2001 From: David Elias <32375682+CenourinhaBR@users.noreply.github.com> Date: Fri, 4 Oct 2019 15:55:06 -0300 Subject: [PATCH 04/10] =?UTF-8?q?Traduzido=20a=20Introdu=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Acionado o idioma PT BR --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1bfbab..39da3fb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# git Cheat Sheet +# Folha de Dicas para Git -by [Ben Nadel](https://www.bennadel.com) for _future Ben Nadel_ +Por [Ben Nadel](https://www.bennadel.com) o futuro Ben Nadel_ -The [`git` API is so vast](https://git-scm.com/docs) and so esoteric, I can barely manage to keep a fraction of one-percent of it in my head. As such, I wanted to outline a few of the commands that I commonly (and sometimes uncommonly) reach for. This way, when I inevitably get stuck and my brain fails me, I have something that I can refer back to. +A API [git` é tão vasta] (https://git-scm.com/docs) e é tão esotérica que mal consigo manter uma fração de um por cento dela na minha cabeça. Como tal, eu queria esboçar alguns dos comandos que eu normalmente (e às vezes de maneira incomum) alcanço. Dessa forma, quando inevitavelmente fico preso e meu cérebro me falha, tenho algo a que posso me referir. -Future Ben, you are welcome! +Futuro Ben, de nada! ## Table of Contents From 25475ece1ff8a73312dd3e9bfdb59523f4bb41bc Mon Sep 17 00:00:00 2001 From: Fernando Santos Date: Fri, 4 Oct 2019 18:13:11 -0300 Subject: [PATCH 05/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index edab8cb..42cbee2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Git Dicas -Por [Ben Nadel](https://www.bennadel.com) o futuro Ben Nadel_ +Por [Ben Nadel](https://www.bennadel.com) o futuro Ben Nadel. A [API do `git` é tão vasta](https://git-scm.com/docs) e tão abstrata, que dificilmente poderá se manter uma fração de tudo em mente. Com isso, este é um esboço de alguns poucos comandos que normalmente são usados. Desta maneira, sempre que inevitavelmente a memória falhar, a uma fonte para se referenciar. From 243617eedd99be99c5c576ad704b9fa420ab485a Mon Sep 17 00:00:00 2001 From: silvasobrinho Date: Sat, 5 Oct 2019 17:23:46 -0300 Subject: [PATCH 06/10] =?UTF-8?q?Traduzi=20um=20dos=20t=C3=B3picos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduzi um dos topicos e acicionei o mesmo no cabeçalho traduzido. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 42cbee2..12b3c97 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Futuro Ben, de nada! * [I want to revert the merge of my feature branch into `master`.](#i-want-to-revert-the-merge-of-my-feature-branch-into-master) * [I want to extract changes that I accidentally made to `master`.](#i-want-to-extract-changes-that-i-accidentally-made-to-master) * [I want to undo the changes that I've made to my branch.](#i-want-to-undo-the-changes-that-ive-made-to-my-branch) -* [I want to remove unpublished changes from my branch.](#i-want-to-remove-unpublished-changes-from-my-branch) +* [Eu quero remover modificações não puplicadas no meu branch.](#Eu-quero-remover-modificações-não-puplicadas-no-meu-branch) * [I want to see which branches have already been merged into `master`.](#i-want-to-see-which-branches-have-already-been-merged-into-master) * [I want to see which branches have not yet been merged into `master`.](#i-want-to-see-which-branches-have-not-yet-been-merged-into-master) * [I want to delete my feature branch.](#i-want-to-delete-my-feature-branch) @@ -386,20 +386,20 @@ git reset --hard If you call `git reset` without the `--hard` option, it will reset the staging to match the `head` of the branch, but it will leave your file system in place. As such, you will be left with "unstaged changes" that can be modified and re-committed. -### I want to remove unpublished changes from my branch. +### Eu quero remover modificações não puplicadas no meu branch. -If you've committed changes to the local copy of a remote (ie, published) branch, but you want to undo those changes, you can `reset` the local branch to match the remote branch: +Se você fez um commit local de um branch remoto (publicado), mas quer reverter essas alterações, você pode `redefinir` a copia local para corresponder com o branch remoto: ```sh git checkout my-feature -# Update the remote copy of the `my-feature` branch in order to make sure that -# you are working with the most up-to-date remote content. +# Atualize a copia remota do branch `my-feature` para garantir que você está +# trabalhando com a versão mais atualizada do conteúdo remoto. git fetch origin my-feature -# Now, reset the local copy of `my-feature` to match the published copy. This -# will update your index and your local file system to match the published -# version of `my-feature`. +# Agora, redefina a cópia local de `my-feature` para corresponder com a cópia publicada. +# Isso vai atualizar seu index e seu sistema de arquivo local para corresponder com a versão publicada +# do `my-feature`. git reset --hard origin/my-feature ``` From 236da7d44ec9507d399a4af08798ab557a6bec2a Mon Sep 17 00:00:00 2001 From: Silvano RM <15691851+silvanorm@users.noreply.github.com> Date: Sat, 5 Oct 2019 19:37:21 -0300 Subject: [PATCH 07/10] =?UTF-8?q?Traduzindo=20o=20primeiro=20t=C3=B3pico.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit E também o Table of Contents e Use Cases. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 42cbee2..345eef2 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ A [API do `git` é tão vasta](https://git-scm.com/docs) e tão abstrata, que di Futuro Ben, de nada! -## Table of Contents +## Índice de Conteúdo -* [I want to show the status of the current branch.](#i-want-to-show-the-status-of-the-current-branch) +* [Eu quero mostrar o status do branch atual.](#eu-quero-mostrar-o-status-do-branch-atual) * [I want to create a new branch that is based on the current branch.](#i-want-to-create-a-new-branch-that-is-based-on-the-current-branch) * [I want to checkout the previous branch that I was on.](#i-want-to-checkout-the-previous-branch-that-i-was-on) * [I want to list the files that have been modified in the current working tree.](#i-want-to-list-the-files-that-have-been-modified-in-the-current-working-tree) @@ -40,11 +40,11 @@ Futuro Ben, de nada! * [I want to temporarily set-aside my feature work.](#i-want-to-temporarily-set-aside-my-feature-work) * [I want to keep my changes during conflict resolution.](#i-want-to-keep-my-changes-during-conflict-resolution) -## Use Cases +## Casos de Uso -### I want to show the status of the current branch. +### Eu quero mostrar o status do branch atual. -The `status` command shows differences between the working tree, the index, and `head` commit. +O comando `status` mostra as diferenças entre o diretório de trabalho, a área de preparação e o repositório. ```sh git status From 2b787c5cd3e1681d663d18a5aa74ae5a7fbf5414 Mon Sep 17 00:00:00 2001 From: silvasobrinho Date: Sat, 5 Oct 2019 21:11:13 -0300 Subject: [PATCH 08/10] =?UTF-8?q?Traduzido=20um=20t=C3=B3pico?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduzido um topico e adicionado ao index. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12b3c97..d4b9f98 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Futuro Ben, de nada! ## Table of Contents -* [I want to show the status of the current branch.](#i-want-to-show-the-status-of-the-current-branch) +* [Eu quero mostrar o status do branch atual.](#Eu-quero-mostrar-o-status-do-branch-atual) * [I want to create a new branch that is based on the current branch.](#i-want-to-create-a-new-branch-that-is-based-on-the-current-branch) * [I want to checkout the previous branch that I was on.](#i-want-to-checkout-the-previous-branch-that-i-was-on) * [I want to list the files that have been modified in the current working tree.](#i-want-to-list-the-files-that-have-been-modified-in-the-current-working-tree) @@ -42,9 +42,9 @@ Futuro Ben, de nada! ## Use Cases -### I want to show the status of the current branch. +### Eu quero mostrar o status do branch atual. -The `status` command shows differences between the working tree, the index, and `head` commit. +O comando `status` mostra as diferenças entre a arvore de trabalho (Pastas, arquivos e subpastas), o index e o commit `head` (último commit do branch). ```sh git status From 2f3062541b04327b3a00137c44269cbc2f8fdcf4 Mon Sep 17 00:00:00 2001 From: silvasobrinho Date: Sat, 5 Oct 2019 21:31:01 -0300 Subject: [PATCH 09/10] Traduzido mais um topico MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Traduzi mais um topico e adicionei no cabeçalho. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d4b9f98..bd18321 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Futuro Ben, de nada! ## Table of Contents * [Eu quero mostrar o status do branch atual.](#Eu-quero-mostrar-o-status-do-branch-atual) -* [I want to create a new branch that is based on the current branch.](#i-want-to-create-a-new-branch-that-is-based-on-the-current-branch) +* [Eu quero criar um novo branch baseado no branch atual.](#Eu-quero-criar-um-novo-branch-baseado-no-branch-atual) * [I want to checkout the previous branch that I was on.](#i-want-to-checkout-the-previous-branch-that-i-was-on) * [I want to list the files that have been modified in the current working tree.](#i-want-to-list-the-files-that-have-been-modified-in-the-current-working-tree) * [I want to view the changes that were made in a given commit.](#i-want-to-view-the-changes-that-were-made-in-a-given-commit) @@ -50,14 +50,14 @@ O comando `status` mostra as diferenças entre a arvore de trabalho (Pastas, arq git status ``` -### I want to create a new branch that is based on the current branch. +### Eu quero criar um novo branch baseado no branch atual. -In general, you want to implement new features in short-lived "feature branches" so that changes can be isolated. You can use the `checkout` command to create a new branch based on the current branch: +Em geral, quando você quer implementar novos recursos em um “branch para recursos” de curta duração onde as modificações podem ser isoladas. Você pode usar o comando `checkout` para criar um novo branch baseado no seu branch atual: ```sh git checkout master -# Creates a new branch, `my-feature`, based on `master`. +# Criar um novo branch, `my-feature`, baseado no `master`. git checkout -b my-feature ``` From d08ddf451ca47f3c6832439f10e3528e776a5205 Mon Sep 17 00:00:00 2001 From: Marcelo Wis Date: Mon, 7 Oct 2019 00:03:04 -0300 Subject: [PATCH 10/10] =?UTF-8?q?Tradu=C3=A7=C3=A3o=20de=20t=C3=B3picos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 42cbee2..b97188d 100644 --- a/README.md +++ b/README.md @@ -403,9 +403,9 @@ git fetch origin my-feature git reset --hard origin/my-feature ``` -### I want to see which branches have already been merged into `master`. +### Quero ver quais branches já foram mescladas no `master`. -From any branch, you can locate the merged-in branches (that can be safely deleted) by using the `--merged` modifier: +De qualquer branch, você pode localizar as branches mescladas (que podem ser excluídas com segurança) usando o modificador `--merged`: ```sh git checkout master @@ -415,9 +415,9 @@ git checkout master git branch --merged ``` -### I want to see which branches have not yet been merged into `master`. +### Quero ver quais branchs ainda não foram mescladas no `master`. -From any branch, you can locate the unmerged branches by using the `--no-merged` modifier: +Em qualquer branch, você pode localizar as branches não unidas usando o modificador `--no-merged`: ```sh git checkout master @@ -427,10 +427,9 @@ git checkout master git branch --no-merged ``` -### I want to delete my feature branch. - -After you're merged your feature branch into `master`, you can delete your feature branch using the `branch` command: +### Eu quero excluir minha branch. +Depois de mesclar sua branch no `master`, você pode excluir sua branch usando o comando` branch`: ```sh # Merge your `my-feature` branch into `master` creating a "merge commit." git checkout master @@ -442,7 +441,7 @@ git merge --no-ff my-feature git branch -d my-feature ``` -If you want to abandon a feature branch, you can use the `-D` modifier to force-delete it even if it has not yet been merged into `master`: +Se você deseja abandonar uma branch, pode usar o modificador `-D` para excluí-lo à força, mesmo que ainda não tenha sido mesclado no` master`: ```sh git checkout master