Skip to content

Commit

Permalink
Merge branch 'master' into add_flag_index_ID_translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Roshanjossey authored Oct 26, 2018
2 parents f4afc45 + 97267e0 commit 4e3f60c
Show file tree
Hide file tree
Showing 30 changed files with 2,217 additions and 204 deletions.
1,716 changes: 1,665 additions & 51 deletions Contributors.md
100644 → 100755

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Reading articles & watching tutorials can help, but what's better than actually
[🇮🇹](translations/README.it.md)
[🇹🇭](translations/README.th.md)
[🏴](translations/README.gl.md)
[🇳🇵](translations/README.np.md)
[🇵🇰](translations/README.ur.md)
[:bangladesh:](translations/README.bn.md)
[🇲🇩 🇷🇴](translations/README.ro.md)
Expand All @@ -62,7 +63,7 @@ If you don't have git on your machine, [install it]( https://help.github.com/art

## Fork this repository

Fork this repo by clicking on the fork button on the top of this page.
Fork this repository by clicking on the fork button on the top of this page.
This will create a copy of this repository in your account.

## Clone the repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ This document is dedicated to all the blog posts, helpful sites, tips and tricks
4. [Git and GitHub tutorial translated to many languages](https://github.com/Roshanjossey/first-contributions)
5. [Merge Conflicts](https://www.git-tower.com/learn/git/ebook/en/command-line/advanced-topics/merge-conflicts)
6. [Resolving Merge Conflicts](https://githowto.com/resolving_conflicts)
7. [Official Git cheat sheet in many languages](https://services.github.com/on-demand/resources/cheatsheets)
8. [Git cheat sheet from Tower](https://www.git-tower.com/learn/cheat-sheets/git)
9. [Common Git Problems](https://www.codementor.io/citizen428/git-tutorial-10-common-git-problems-and-how-to-fix-them-aajv0katd)
10. [Git Rebase](https://blog.gitprime.com/git-rebase-an-illustrated-guide/)
11. [Beginner's Guide to Rebasing and Squashing](https://github.com/servo/servo/wiki/Beginner%27s-guide-to-rebasing-and-squashing)
12. [Git Cheatsheet that shows correlations between commands and files](http://ndpsoftware.com/git-cheatsheet.html)
13. [How to contribute](https://opensource.guide/how-to-contribute/)
14. [Getting started with Open Source](https://github.com/OpenSourceHelpCommunity/Getting-Started-With-Contributing-to-Open-Sources)
15. [How to contribute](https://github.com/freeCodeCamp/how-to-contribute-to-open-source)
16. [Atlassians Git Tutorials](https://www.atlassian.com/git)
17. [Pull request reviews](https://help.github.com/articles/about-pull-request-reviews/)
18. [Another Interactive tutorial for git](https://learngitbranching.js.org/)
19. [Git commandline cheat-sheet](https://gist.github.com/davfre/8313299)
7. [Basics of Git - The Simple Quick Start Guide](https://blog.praveen.science/basics-of-git-the-quick-start-guide/)
8. [Git Standards followed in our way of Spotify Agile Methodology](https://blog.praveen.science/git-standards-followed-in-our-way-of-spotify-agile-methodolgy/)
9. [Git Shortcuts](https://blog.praveen.science/git-shortcuts/)
10. [Official Git cheat sheet in many languages](https://services.github.com/on-demand/resources/cheatsheets)
11. [Git cheat sheet from Tower](https://www.git-tower.com/learn/cheat-sheets/git)
12. [Common Git Problems](https://www.codementor.io/citizen428/git-tutorial-10-common-git-problems-and-how-to-fix-them-aajv0katd)
13. [Git Rebase](https://blog.gitprime.com/git-rebase-an-illustrated-guide/)
14. [Beginner's Guide to Rebasing and Squashing](https://github.com/servo/servo/wiki/Beginner%27s-guide-to-rebasing-and-squashing)
15. [Git Cheatsheet that shows correlations between commands and files](http://ndpsoftware.com/git-cheatsheet.html)
16. [How to contribute](https://opensource.guide/how-to-contribute/)
17. [Getting started with Open Source](https://github.com/OpenSourceHelpCommunity/Getting-Started-With-Contributing-to-Open-Sources)
18. [How to contribute](https://github.com/freeCodeCamp/how-to-contribute-to-open-source)
19. [Atlassians Git Tutorials](https://www.atlassian.com/git)
20. [Pull request reviews](https://help.github.com/articles/about-pull-request-reviews/)
21. [Another Interactive tutorial for git](https://learngitbranching.js.org/)
22. [Git commandline cheat-sheet](https://gist.github.com/davfre/8313299)
23. [Programming Books](https://github.com/EbookFoundation/free-programming-books)
24. [E-Book of professional tip and secrets](https://goalkicker.com/GitBook/GitProfessionalTipsSecrets.pdf)
25. [tutorial about simple rules of become git professional](https://medium.freecodecamp.org/follow-these-simple-rules-and-youll-become-a-git-and-github-master-e1045057468f)

Keep adding more links, that you find helpful.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Keeping your fork synced with this repository

First, the flow for a full sync should be understood. In this schema, there are 3 different repos: my public repo on Github `github.com/Roshanjossey/first-contributions/`, your fork of the repo on GitHub `github.com/Your-Name/first-contributions/` and your local machine's repo from which you are suppose to work. This kind of cooperation is typical for open source projects and called `Triangle Workflows`.
First, the flow for a full sync should be understood, which is important. In this schema, there are 3 different repos: my public repo on Github `github.com/Roshanjossey/first-contributions/`, your fork of the repo on GitHub `github.com/Your-Name/first-contributions/` and your local machine's repo from which you are suppose to work. This kind of cooperation is typical for open source projects and called `Triangle Workflows`.

<img style="float;" src="../../assets/triangle_workflow.png" alt="triangle workflow" />

To keep your two repos up-to-date with my public repo, our first move is to fetch and merge the public repo with your local machine's repo.
To keep your two repos up-to-date with my public repo, so first we have to fetch and merge the public repo with your local machine's repo.
Our second move will be to push your local repo to your GitHub fork. As you've seen earlier, it's only from your fork that you can ask for a "pull request". So your GitHub fork is the last repo to be updated.

Now, let's see how to do it:
Expand Down Expand Up @@ -37,4 +37,4 @@ git push origin master
```
Notice here you're pushing to the remote named `origin`.

At this point, all your repositories are up-to-date. Well done! You should do this, everytime your GitHub repo tells you that you are a few commits behind.
So by now or at this point, all your repositories are up-to-date. Well done! You should do this, everytime your GitHub repo tells you that you are a few commits behind.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# What is a merge conflict?

When you try to merge another branch into your current working branch, you are taking changes from another context and combine them with your current working files.
If two people changed the same lines in that same file, or if one person decided to delete it while the other person decided to modify it, Git simply cannot know what is correct. Git will then mark the file as having a conflict - which you'll have to solve before you can continue your work.
When you try to merge another branch into your current working branch, you are taking changes from another context and combining them with your current working files.
If two people have changed the same lines in the same file, or if one person decided to delete it while the other person decided to modify it, Git cannot identify which is the correct version. Git will then mark the file as having a conflict - which you'll have to resolve before you can continue your work.

# How to resolve a merge conflict?

When faced with a merge conflict, git will mark the problematic area in the file by enclosing it in “<<<<<<<< HEAD” and “>>>>>>>>>>[other branch name]

The contents after the first marker originate from your current working branch. After the angle brackets, Git tells us where (from which branch) the changes came from. A line with "=======" separates the two conflicting changes.
Our job is now to clean up these lines: when we're done, the file should look exactly as we want it to look. It can be necessary to consult the teammate who wrote the conflicting changes to decide which code is finally correct. Maybe it's yours, maybe it's his - or maybe a mixture between the two.
Our job is now to clean up these lines: when we're done, the file should look exactly as we want it to look. It is advisable to consult the teammate who wrote the conflicting changes to decide which version should be final. It could be either on of yours - or maybe a mixture between the two.

e.g. :
```
Expand All @@ -23,10 +23,10 @@ e.g. :
`=======`: Indicates the break point used for comparison. Breaks up changes that user has committed (above) to changes coming from merge (below) to visually see the differences.
`>>>>>>>`: Indicates the end of the lines that had a merge conflict.

You resolve a conflict by editing the file to manually merge the parts of the file that git had trouble merging. This may mean discarding either your changes or someone else's or doing a mix of the two. You will also need to delete the '<<<<<<<', '=======', and '>>>>>>>' in the file.
You resolve a conflict by editing the file and then manually merging the parts of the file that git had trouble merging. This may mean discarding either your changes or someone else's or going ahead with a mix of the two. You will also need to delete the '<<<<<<<', '=======', and '>>>>>>>' in the file.


Once you have resolved the conflict do `git add`. Do not forget to run the tests that you have to make sure you have resolved the conflict correctly.
Once you have resolved the conflict do a `git add`. Do not forget to run the tests, as you have to make sure that you have resolved the conflict.

You can also download different plugins depending on the IDE you are using for an easier way to resolve merge conflicts.

Expand Down
51 changes: 43 additions & 8 deletions additional-material/translations/additional-material.pt_br.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
# Informações adicionais
# Informações Adicionais

Nós estamos assumindo que você já terminou o tutorial básico antes de vir aqui. As informações adicionais te darão algumas informações sobre técnicas avançadas de Git.
Nós imaginamos que você já tenha terminado o tutorial básico antes de vir aqui. As informações adicionais te darão algumas informações sobre técnicas mais avançadas de Git.

### [Removendo o Branch do seu repositório](removing-branch-from-your-repository.pt_br.md)
Esse documento fornece informações sobre como deletar o Branch do seu repositório.
> Só siga esses passos depois que seu Pull Request for mesclado.
### [Emendando um commit](../git_workflow_scenarios/amending-a-commit.md)
Esse documento provê informações sobre como emendar um commit no repositório remoto.
> Use isso quando você precisar ajustar um commit que você tenha feito.
### [Mantendo o seu Fork sincronizado com este repositório](keeping-your-fork-synced-with-this-repository.pt_br.md)
Esse documento fornece informações sobre como manter seu Fork atualizado com o repositório base. Isso é importante, já que esperamos que você e muitos outros contribuam com este projeto.
> Só siga esses passos se seu Fork não tiver nenhuma alteração.
### [Configurando o git](../git_workflow_scenarios/configuring-git.md)
Esse documento provê informações sobre como configurar detalhes de usuário e outras opções do git.
> Use isso para melhor controlar as suas configurações do git.
### [Mantendo o seu fork em sincronia com o repositório](../git_workflow_scenarios/keeping-your-fork-synced-with-this-repository.md)
Esse documento provê informações sobre como manter o seu fork atualizado com o repositório base. Isso é importante, já que se espera que você e muitas outras pessoas contribuem com o projeto.
> Siga esses passos se o seu fork não possui as mesmas alterações do repositório pai.
### [Movendo um Commit para um Branch diferente](../git_workflow_scenarios/moving-a-commit-to-a-different-branch.md)
Esse documento provê informações sobre como mover um Commit para outro Branch.
> Siga esses passos para mover um commit para outro branch.
### [Removendo um arquivo](../git_workflow_scenarios/removing-a-file.md)
Esse documento provê informações sobre como remover um arquivo do seu repositório local.
> Siga esses passos para aprender como remover um arquivo do seu repositório local.
### [Removendo um Branch do seu repositório](../git_workflow_scenarios/removing-branch-from-your-repository.md)
Esse documento provê informações sobre como deletar um Branch do seu repositório.
> Apenas siga esses passos após o seu pull request ter sido mesclado.
### [Resolvendo conflitos de Merge](../git_workflow_scenarios/resolving-merge-conflicts.md)
Esse documento provê informações sobre como resolver conflitos de Merge.
> Siga esses passos para resolver conflitos de Merge irritantes.
### [Revertendo um commit](../git_workflow_scenarios/reverting-a-commit.md)
Esse documento provê informações sobre como reverter um commit feito no repositório remoto. Isso é muito útil quando você precisa desfazer um commit que tenha sido publicado no GitHub.
> Siga esses passos se você quiser reverter um commit.
### [Comprimir Commits juntos](../git_workflow_scenarios/squashing-commits.md)
Esse documento provê informações sobre como esmagar commits juntos em um só realizando um rebase.
> Use esses passos se você quiser realizar um PR em um projeto open source e a pessoa que realizou o review pedir para você mesclar todos os commits em um só, com uma mensagem de commit informativa.
### [Desfazendo um commit local](../git_workflow_scenarios/undoing-a-commit.md)
Esse documento provê informações sobre como desfazer um commit no seu repositório local. Isso é o que você precisa fazer quando você sente que fez alguma besteira no seu repositório e deseja desfazer.
> Take these steps if you want to undo/reset a local commit.
### [Links úteis](../git_workflow_scenarios/Useful-links-for-further-learning.md)
Esse documento é dedicado a todos os blog posts, sites úteis, dicas e truques que fazem a nossa vida mais simples. Seja você um expert ou um iniciante, essa pagina deve servir como um index para todos esses links úteis para ajudar qualquer um que seja novo no mundo de projetos open-source ou alguém que queira prender mais a respeito.
52 changes: 52 additions & 0 deletions additional-material/translations/amending-a-commit.pt_br.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Corrigindo um Commit

E se você fizer o commit de uma alteração para o seu repositório remoto, e posteriormente acabar percebendo que ele possui um erro na mensagem do commit, ou você se esqueceu de adicionar uma linha de código no seu commit mais recente?
Como você editaria isso? É isso que esse tutorial cobre.

## Alterando uma mensagem de commit recente após ter dado push para o Github

Para fazer isto sem abrir um arquivo:
* Digite o comando ```git commit --amend -m "seguido da sua nova mensagem de commit"```
* Execute ```git push origin <nome-da-branch>``` para fazer o commit das mudanças para o repositório.

Nota: Se você digitar apenas ```git commit --amend```, seu editor de texto abrirá te pedindo para editar a mensagem de commit.
Adicionar a flag ``-m`` previne isso.

## Fazendo modificações em um único commit

E se nós nos esquecermos de fazer uma pequena mudança em um arquivo, como adicionar uma única palavra, mas nós já demos push no commit para o nosso repositório remoto?

Para ilustrar, aqui está um log dos meus commits:
```
g56123f arquivo bot criado
a2235d atualizado contributor.md
a5da0d arquivo bot modificado
```

Supomos que eu esqueci de adicionar uma palavra no arquivo bot.

Há 2 modos de resolver esse problema. O primeiro é fazer um novo commit que contém a mudança, dessa forma:

```
g56123f arquivo bot criado
a2235d atualizado contributor.md
a5da0d arquivo bot modificado
b0ca8f adicionada palavra no arquivo bot
```

O segundo modo é corrigir o commit a5da0d, adicionar essa nova palavra e dar push para o Github como um único commit.
Essa ação soa melhor, já que é apenas uma pequena alteração.

Para fazer isso, nós faríamos o seguinte:
* Modificar o arquivo. Nesse caso, modificarei o arquivo bot para incluir a palavra que eu esqueci anteriormente.
* Em seguida, adicionar o arquivo para a área de preparação (*staging area*) com o comando ```git add <nome-do-arquivo>```

Normalmente, após adicionar arquivos na área de preparação, a próxima coisa que nós fazemos é entrar com o comando ```git commit -m "nossa mensagem de commit"```, certo?
Mas, como o que nós queremos fazer aqui é corrigir o commit anterior, nós ao invés disso iremos rodar:

* ```git commit --amend```
Isso irá inicializar o editor de texto para que possamos editar a mensagem. Você decide se irá deixar a mensagem como ela estava antes, ou editá-la.
* Sair do editor salvando as alterações
* Dar push nas suas alterações com o comando ```git push origin <nome-da-branch>```

Dessa forma, ambas as alterações agora estarão em um único commit.
8 changes: 4 additions & 4 deletions github-desktop-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you're using a version of GitHub desktop before 1.0, [refer this tutorial](gi

## Fork this repository

Fork this repo by clicking on the fork button on the top of this page.
Fork this repo by clicking on the fork button on the top right of this page.
This will create of copy of this repository in your account.

## Clone the repository
Expand Down Expand Up @@ -119,9 +119,9 @@ Now let's get you started with contributing to other projects. We've compiled a

## Tutorials Using Other Tools

|<a href="README.md"><img alt="Command Line" src="http://cdn.osxdaily.com/wp-content/uploads/2014/08/terminal-icon-osx-150x150.png" width="100"></a>|<a href="github-windows-vs2017-tutorial.md"><img alt="Visual Studio 2017" src="https://www.visualstudio.com/wp-content/uploads/2017/11/microsoft-visual-studio.svg" width="100"></a>|<a href="gitkraken-tutorial.md"><img alt="GitKraken" src="/assets/gk-icon.png" width="100"></a>|
|---|---|---|
|[Command Line](README.md)|[Visual Studio 2017](github-windows-vs2017-tutorial.md)|[GitKraken](gitkraken-tutorial.md)|
|<a href="README.md"><img alt="Command Line" src="http://cdn.osxdaily.com/wp-content/uploads/2014/08/terminal-icon-osx-150x150.png" width="100"></a>|<a href="github-windows-vs2017-tutorial.md"><img alt="Visual Studio 2017" src="https://www.visualstudio.com/wp-content/uploads/2017/11/microsoft-visual-studio.svg" width="100"></a>|<a href="gitkraken-tutorial.md"><img alt="GitKraken" src="/assets/gk-icon.png" width="100"></a>|<a href="github-windows-vs-code-tutorial.md"><img alt="VS Code" src="https://upload.wikimedia.org/wikipedia/commons/2/2d/Visual_Studio_Code_1.18_icon.svg" width=100></a>|
|---|---|---|---|
|[Command Line](README.md)|[Visual Studio 2017](github-windows-vs2017-tutorial.md)|[GitKraken](gitkraken-tutorial.md)|[Visual Studio Code](github-windows-vs-code-tutorial.md)|

## Self-Promotion

Expand Down
Loading

0 comments on commit 4e3f60c

Please sign in to comment.