# 📖 Introduction to Git [EN]

<span style="font-weight: 400;">Git is a software used by developers to work together on a project and keep track of the most recent version of their projects. Git is often seen in combination with Github. Github is a website that adds some commands and features to Git. It also makes the use and interaction with Git more intuitive and visually nicer. Git can however also be used without using Github or any other hosted service at all.</span>

<span style="font-weight: 400;">The aim of Git is to keep track of code changes, especially when more than one developer works on the same project. Git works through</span> **repositories**<span style="font-weight: 400;">, namely folders, which are either local or remote. Developers work on their own local repositories and then share the last version of their work </span>**pushing**<span style="font-weight: 400;"> their work on the remote repository through a</span> **commit.**<span style="font-weight: 400;"> Commits are the way Git keeps track of changes. Every commit is like a checkpoint: at every commit Git saves the new version of the code, creating a code history. Through the history it is possible to access any previous version of the code. The remote repository contains the most updated version of the code and all developers can save it on their local machine by </span>**pulling** <span style="font-weight: 400;">it. Git takes care of merging all versions of the code avoiding conflicts. </span>

<span style="font-weight: 400;">A powerful feature of Git is the possibility of opening different branches. New branches are used so that the work on the main branch remains unaffected when making new tries. For example, if a developer wants to introduce a new feature but does not know yet if the code will work, they can open a new branch and work on it until the code works. It is possible to merge the branches in a later stage. </span>

<span style="font-weight: 400;">Git is very useful for developers but it can be somehow not intuitive to use, at least at the beginning. Therefore, as Prototype Fund we were happy to fund a project which built a game on how to use Github while playing a game. The project is called </span>**OhmyGit!**<span style="font-weight: 400;"> </span><span style="font-weight: 400;">The game can be found and downloaded here: </span>[<span style="font-weight: 400;">https://ohmygit.org/</span>](https://ohmygit.org/).<span style="font-weight: 400;"> This is the link to the demoweek and to a video which explains how the game works: </span>[<span style="font-weight: 400;">https://archive.demoweek.prototypefund.de/runde8/projects/01-oh-my-git.html</span>](https://archive.demoweek.prototypefund.de/runde8/projects/01-oh-my-git.html)

<span style="font-weight: 400;">There are many hosted services which make the use of Git and its features more intuitive. One of the most used ones is </span>[<span style="font-weight: 400;">Github</span>](https://github.com/)<span style="font-weight: 400;">. However, since 2018 Github is part of Microsoft and hence not open source anymore. There are several other open source platforms that can be used instead of Github. Some examples are </span>[<span style="font-weight: 400;">Gitlab</span>](https://about.gitlab.com/de-de/)<span style="font-weight: 400;">, </span>[<span style="font-weight: 400;">Gitolite</span>](https://gitolite.com/gitolite/index.html)<span style="font-weight: 400;">, </span>[<span style="font-weight: 400;">Gogs</span>](https://gogs.io/)<span style="font-weight: 400;">, </span>[<span style="font-weight: 400;">Bitbucket </span>](https://bitbucket.org/product/)<span style="font-weight: 400;">and </span>[<span style="font-weight: 400;">Codeberg</span>](https://codeberg.org/)<span style="font-weight: 400;">. Moreover, as said before, Git can also be used alone. </span>

<span style="font-weight: 400;">The Prototype Fund also funded an open source alternative called </span>**Gitea.**<span style="font-weight: 400;"> Here is a link to their website : </span>[<span style="font-weight: 400;">https://gitea.io/en-us/</span>](https://gitea.io/en-us/)<span style="font-weight: 400;">. </span>

<span style="font-weight: 400;">Main source for the content: [https://www.youtube.com/watch?v=DVRQoVRzMIY](https://www.youtube.com/watch?v=DVRQoVRzMIY)</span>