

In some situation, certain files should be kept in local, in this case the relative path of these files should be added to the.

NB 2: You might want to set a SSH the connection between your machine and your GitHub/GitLab repository in order to make your collaboration more fluid. NB 1: branches can also be seen as a way to contribute to an open-source projects, i.e their code is publically published on GitHub/GitLab. Resolve the conflicts (Use VSCode for example).When merging branches, some conflicts might occur, especially when two persons worked on the same file, in this case, you should NB2: It is also possible to push an existing folder into the github directory using: git remote add origin gitAdress git branch -M master git push -u origin master NB1: The four first steps are carried-out only once while the 5th and 6th are iterative (see next paragraph). Make all the necessary changes assigned to their commits.The following steps detail how you can do so: Github or GitLab are platforms that allow hosting your project and coordinate multi-party collaboration. In the next paragraph, you will find the graph summing up the relationships between the different stages. Once you have installed and configured git, you can create your first git project using the following command-lines: mkdir projectFolder cd projectFolder git init #initialize git on your project git status touch file.md # create new file open file.md # open the file and modify it git status # file untracked -> add it to git index git add file.md git commit -m "file.md modified. Your 1st repository Creating your first Git repo Mac: most versions of MacOs have already git installed.Īs mentioned before, git is a versioning and collaboration tool, hence it is important to know the people working on each file of the project, this is why you should configure your git using your name and your mail: git config -global user.name "Name" git config -global user.mail "mail"Ģ.Windows: download the Windows Git installer from the following website.

