Olá pessoal!

Digamos que você está escrevendo sua monografia/dissertação/tese/artigo, etc.. claro que você não quer correr o risco de perde-la não é mesmo? O que você faz? Backup! Mas aposto que você já teve também a vontade de restaurar o seu trabalho para uma estrutura/conteúdo que você tinha há algum tempo atrás ou quem sabe recuperar aquele texto que você sobrescreveu… Que tal resolver os dois problemas de uma vez só?

Recentemente tive a idéia de utilizar um sistema para controle de versão para fazer esse trabalho dos meus “documentos”, em geral códigos e textos, não demorou muito para eu descobrir que alguns colegas do lab já usavam isso há algum tempo… O.o Eu já conhecia o Svn, más comecei a utilizar o Git porquê já existe uma infraestrutura aqui suportando o Git, a primeira vista me parece bem seguro (é distribuído) e prático, além do mais diversos projetos open source o utilizam. Vale a pena dar uma olhada. Segue abaixo um tuto que gostei.

Abs.
John.

 

Git is a distributed version control system (dvcs) written in C. A version control system allows the creation of a history for a collection of files and includes the functionality to revert the collection of files to another state. Another state might be a different collection of files or different content in the files.

You may, for example, change the collection of files to a state from 2 days ago or you may switch between states for experimental features and production issues.

The collection of files is usually called “source code”. In a distributed version control system everyone has a complete copy of the source code (including the complete history of the source code) and can perform version control operations against this local copy. The use of a dvcs does not require a central code repository.

If you make changes to the source code you mark them as relevant for the version control (add them to the index / staging) and then add them to the repository (commit).

Git maintains all versions. Therefore you can revert to any point in your source code history using Git.

Git performs commits to your local repository and you can synchronize your repository with other (remote) repositories. Git allows you to clone repositories, e.g. create an exact copy of a repository including the complete history of the source code. Owners of repositories can synchronize changes via push (transferring changes to a remote repository) or pull (getting changes from a remote repository).

Git supports branching, e.g. you can have different versions of your source code. If you want to develop a new feature, you may open a branch in your source code and make the changes in this branch without affecting the main line of your code.

Continue reading at Vogella.de