<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Carvalho</title>
    <description>The latest articles on DEV Community by Daniel Carvalho (@rcarvalhodan).</description>
    <link>https://dev.to/rcarvalhodan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F249214%2F58d82778-7f62-4c1e-ab91-5cb2f8fcf4f2.jpeg</url>
      <title>DEV Community: Daniel Carvalho</title>
      <link>https://dev.to/rcarvalhodan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rcarvalhodan"/>
    <language>en</language>
    <item>
      <title>Git vs GitHub - Understanding the Difference</title>
      <dc:creator>Daniel Carvalho</dc:creator>
      <pubDate>Wed, 07 Oct 2020 00:57:29 +0000</pubDate>
      <link>https://dev.to/rcarvalhodan/git-vs-github-understanding-the-difference-29gb</link>
      <guid>https://dev.to/rcarvalhodan/git-vs-github-understanding-the-difference-29gb</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Git and GitHub have an important role not only to open source but in the daily lives of several developers and companies. However, do you know what Git is? Do you understand what is GitHub?&lt;br&gt;
Do you know what differentiates one tool from another? If your answer is no to any of these questions, don't worry because you're not alone.&lt;/p&gt;

&lt;p&gt;In this post you will learn what Git is and what GitHub is, some of the features that each one offers and the relationship between them.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Git?
&lt;/h1&gt;

&lt;p&gt;Created by &lt;a href="https://en.wikipedia.org/wiki/Linus_Torvalds" rel="noopener noreferrer"&gt;Linus Torvalds&lt;/a&gt;, the father of Linux, to the development of the Linux kernel and maintained since 2005 by &lt;a href="https://pt.wikipedia.org/wiki/Junio_Hamano" rel="noopener noreferrer"&gt;Junio Hamano&lt;/a&gt;, Git is a Distributed Version Control System (DVCS) that allows you to observe and control the changes in your code. It is a very popular DVCS and used in many projects because it is multiplatform, free, efficient and easy to use.&lt;/p&gt;

&lt;p&gt;A version control system like Git allows you to track, review and manage the versions of your projects and even reverse errors that could happen during development, such as deleting some important part or breaking some functionality during the implementation of a new feature.&lt;/p&gt;

&lt;p&gt;We say that Git is distributed basically because it allows that multiple people, regardless of their geographic location, to have a clone (a copy) of the main repository locally, with all the commits history. This way you can make your changes, upload to the main repository and all other collaborators will have access when they update their copies of the repository.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpfsy53og7joijh0do994.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpfsy53og7joijh0do994.png" title="Repositories Distributed Architecture" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Some of the Git's features are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Branch: the branching model is the crown jewel of Git. This feature enables you to create an isolated environment from the main one and experiment in any way you may find better without compromise the main repository. After you confirm that your solution works, just merge it with the main branch (since 01/10/2020 the master branch was renamed as main branch by &lt;a href="https://github.com/github/renaming" rel="noopener noreferrer"&gt;default&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Stash: do you need to change branches but don't wanna make a commit yet? Then, use stash to store all the changes you made, switch context and return later at the same point where you left off;&lt;/li&gt;
&lt;li&gt;Staging Area: it's a middle area in the Git workflow. It allows you to control which files will be added to a commit;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9n91auxr7acby56ko6b6.png" title="Git workflow: Working Directory -&amp;gt; git add -&amp;gt; Staging Area -&amp;gt; git commit -&amp;gt; Repository" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Bisect: the bisect command uses binary search within the commit history to look for which commit a bug was inserted into the project;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  And where does GitHub enters in all that?
&lt;/h1&gt;

&lt;p&gt;I'm glad you asked, GitHub is a platform created in 2008 and purchased by Microsoft for the small amount of &lt;a href="https://news.microsoft.com/2018/06/04/microsoft-to-acquire-github-for-7-5-billion/" rel="noopener noreferrer"&gt;7.5 billion dollars in 2018&lt;/a&gt;, it gives you a way to manage and host your git repositories in the cloud. But that's it, Git doesn't need GitHub, but GitHub needs Git. You may keep all your projects with git local if you prefer, GitHub acts only as an alternative to keep a backup of your project with Git outside of your machine, in addition to making it easier to collaborate and share your project with others.&lt;/p&gt;

&lt;p&gt;There are other platforms that compete with GitHub like &lt;a href="https://about.gitlab.com/" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt; and &lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;Bitbucket&lt;/a&gt; that also allow you to save your project with git in the cloud. However, GitHub is simply more popular, as basically all devs have an account on the website to manage their projects.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff8v21n2bj5bhontsp50f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ff8v21n2bj5bhontsp50f.png" title="Cloud-based platforms to host Git repositories: Gitlab, GitHub, Bitbucket" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
GitHub has a range of features, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hosting your code in the cloud;&lt;/li&gt;
&lt;li&gt;Visualization of the commit history;&lt;/li&gt;
&lt;li&gt;Pull Requests: basically these are requests to include code in the main project, they allow a review of what will be added and comments;&lt;/li&gt;
&lt;li&gt;Issues: collaborators and users may identify bugs or request features through Issues that are available for discussion and monitoring on GitHub;&lt;/li&gt;
&lt;li&gt;Continuous Integration/Continuous Delivery (CI/CD) flow with GitHub actions;&lt;/li&gt;
&lt;li&gt;Documenting your project through GitHub Wiki;&lt;/li&gt;
&lt;li&gt;Create static pages directly from your GitHub repository with GitHub Pages;&lt;/li&gt;
&lt;li&gt;Centralization and availability of the project allowing a simpler more distributed collaboration process, i.e, anyone can view, clone and make contributions to a project on GitHub (you can also limit who can contribute and view the project by making it private).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
    <item>
      <title>Git vs GitHub - Entendendo a Diferença</title>
      <dc:creator>Daniel Carvalho</dc:creator>
      <pubDate>Tue, 06 Oct 2020 21:05:54 +0000</pubDate>
      <link>https://dev.to/rcarvalhodan/git-vs-github-entendo-a-diferenca-3al</link>
      <guid>https://dev.to/rcarvalhodan/git-vs-github-entendo-a-diferenca-3al</guid>
      <description>&lt;h1&gt;
  
  
  Introdução
&lt;/h1&gt;

&lt;p&gt;O Git e GitHub tem um papel importantíssimo não apenas para o open source, mas para o dia a dia de vários desenvolvedores e empresas. Mas você sabe o que é o Git? Entende o que é o GitHub? Sabe o que diferencia uma ferramenta da outra? Caso a resposta seja não para alguma dessas perguntas, não se preocupe pois você não está sozinho.&lt;/p&gt;

&lt;p&gt;Nesse artigo você vai aprender o que é Git e o que é GitHub, alguns dos recursos que cada uma dessas ferramentas oferece e qual a relação entre elas.&lt;/p&gt;

&lt;h1&gt;
  
  
  O que é Git?
&lt;/h1&gt;

&lt;p&gt;Criado por &lt;a href="https://pt.wikipedia.org/wiki/Linus_Torvalds"&gt;Linus Torvalds&lt;/a&gt;, o pai do Linux, para o desenvolvimento do kernel Linux e mantido desde 2005 por &lt;a href="https://pt.wikipedia.org/wiki/Junio_Hamano"&gt;Junio Hamano&lt;/a&gt;, o Git é um Sistema Controlador de Versões Distribuído (Distributed Version Control System - DVCS) que te permite observar e controlar as mudanças no seu código. É um DVCS bem popular e usado em muitos projetos por ser multiplataforma, gratuito, eficiente e fácil de usar.&lt;/p&gt;

&lt;p&gt;Um sistema controlador de versões como o Git te permite acompanhar, revisar e gerenciar as versões dos seus projetos e até mesmo reverter erros que podem occorer durante o desenvolvimento, como deletar alguma parte importante ou quebrar alguma funcionalidade durante a implementação de um novo recurso.&lt;/p&gt;

&lt;p&gt;Dizemos que o Git é distribuído basicamente porque ele permite que múltiplas pessoas, independente da sua localização geográfica, tenham um clone (uma cópia) do repositório principal de forma local, com todo o histórico de commits. Dessa forma você pode fazer suas alterações, enviar pro repositório principal e todos os outros colaboradores vão ter acesso quando atualizarem suas cópias do repositório.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wPXbK1zB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mjo7edsmsb28macihbdf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wPXbK1zB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mjo7edsmsb28macihbdf.png" alt="Alt Text" title="Arquitetura Distribuída de Repositórios Git"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alguns dos recursos do Git são:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Branch: o modelo de ramificação ou Branch é a joia da coroa do Git. Esse recurso te permite criar um ambiente isolado do ambiente principal e experimentar do modo que você achar melhor sem comprometer o repositório principal. Após você confirmar que a solução funciona,  basta fazer o merge com a branch main (desde 01/10/2020 a branch master passou a ser chamada de branch main por &lt;a href="https://sempreupdate.com.br/github-substituira-master-por-main-a-partir-do-proximo-mes/"&gt;padrão&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Stash: precisa trocar de branch mas não quer fazer um commit ainda? Use o stash para armazenar todas as alterações feitas, troque de contexto e retorne em outro momento do ponto em que parou;&lt;/li&gt;
&lt;li&gt;Staging Area: é uma área intermediária no fluxo de trabalho com o Git. Ela te permite controlar quais arquivos vão ser adicionados a um commit;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lTwExfG4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5mk1en5283n0jp6t9kb9.png" alt="Alt Text" title="Fluxo de trabalho com Git"&gt;
&lt;/li&gt;
&lt;li&gt;Bisect: o comando bisect usa busca binária dentro do histórico de commits para procurar em qual commit um bug foi inserido no projeto;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  E onde entra o GitHub nisso?
&lt;/h1&gt;

&lt;p&gt;Fico feliz que você perguntou, o GitHub é uma plataforma criada em 2008 e comprada pela Microsoft pela pequena quantia de &lt;a href="https://g1.globo.com/economia/tecnologia/noticia/microsoft-compra-github-por-us-75-bilhoes.ghtml"&gt;7.5 bilhões de doláres em 2018&lt;/a&gt;, ele te permite gerenciar e hospedar seus repositórios com git na nuvem. Porém é só isso, o git não precisa do GitHub, mas o GitHub precisa do git. Você pode manter todos os seu projetos com git local se preferir, o GitHub age apenas como uma alternativa para manter um backup do seu projeto com git fora da sua máquina, além de tornar mais fácil a colaboração e o compartilhamento do seu projeto com outras pessoas.&lt;/p&gt;

&lt;p&gt;Existem outras plataformas concorrentes do GitHub como o &lt;a href="https://about.gitlab.com/"&gt;GitLab&lt;/a&gt; e o &lt;a href="https://bitbucket.org/"&gt;Bitbucket&lt;/a&gt; que também permitem que você salve seus projetos com git na nuvem. Entrentanto o GitHub é simplesmente mais popular, pois basicamente todos os devs possuem uma conta no site para gerenciar seus projetos.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kh0HfBZc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fg7ojk3jdf6bo1d1ab76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kh0HfBZc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fg7ojk3jdf6bo1d1ab76.png" alt="Alt Text" title="Plataformas baseadas em nuvem para armazenamento de repositórios git: GitLab, GitHub, Bitbucket"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;O GitHub tem uma gama de recursos, como:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hospedagem do seu código na nuvem;&lt;/li&gt;
&lt;li&gt;Visualização do histórico de commits;&lt;/li&gt;
&lt;li&gt;Pull Requests: são basicamente solicitações de inclusão de código no projeto principal, elas permitem revisão do que vai ser adicionado e comentários;&lt;/li&gt;
&lt;li&gt;Issues: colaboradores e usuários podem identificar bugs ou solicitar features através de Issues que ficam disponíveis para discussão e acompanhamento no GitHub;&lt;/li&gt;
&lt;li&gt;Fluxo de Integração Continua/Entrega Contínua (Continuous Integration/Continuous Delivery - CI/CD) com as GitHub Actions;&lt;/li&gt;
&lt;li&gt;Documentação do seu projeto através do GitHub Wiki;&lt;/li&gt;
&lt;li&gt;Criar páginas estáticas diretamente do seu repositório no GitHub com o GitHub Pages;&lt;/li&gt;
&lt;li&gt;Centralização e disponibilização do projeto permitindo um processo de colaboração mais simples e distribuído, i.e, qualquer pessoa pode ver, clonar e fazer contribuições para um projeto no GitHub (você também pode limitar quem pode ver e contribuir para o projeto tornando o repositório privado).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
