Joining an existing Git repository » History » Version 1

Version 1/2 - Next » - Current version
ROQUE, Damien, 01/24/2015 12:58 AM


Joining an existing Git repository

Initializing and synchronizing a Git repository

This documentation explains how to join an existing Git repository associated with a SourceForge project. For ease of use, we will assume in the following that the project identifier and the repository name are identical : my_project.

Optional: configuring Git user identity

If you are using Git for the first time, you should first consider setting user related parameters. If already used Git on your user session, you can skip this step.

git config --global user.name <name>
git config --global user.email <email>
git config --global push.default matching

Repository cloning

Create a new directory named after my_project and initialize a Git structure inside it.

git clone https://sourceforge.isae.fr/git/my_project

First commit and push to the remote repository

Create and add a dummy file to the repository (to be adapted to something useful).

echo "This is a test file" > file2.txt
git add file2.txt

Commit the changes locally and push the changes to the remote repository.

git commit -m "A new commit including a dummy file" 
git push

Updating changes from remote users

If you are collaborating with other users (or using several computers), you can update your local repository thanks to the following instruction.

git pull