Get the MNE-CPP source code
From MNE-CPP Wiki
This page will show you how to find the latest MNE-CPP source code, install necessary development tools and fork/copy the code to your own Git Hub account:
- Fork the repository from the main repository (mne-tools/mne-cpp):
- Go to the Git Hub website and sign into your Git Hub account.
- Go to the MNE-CPP's Git Hub website.
- Click on the upper right Fork button. This will copy the main repository to your own Git Hub account. This is the code you can now work with, without breaking the project's main code.
- If Git is not installed on your local machine, please do the following:
- Clone your forked (Git Hub) repository to your local machine. There are two ways to do this:
- Option 1 (for newcomer users): Make use of a Git GUI client, such as TortoiseGit (Windows) or Git-Cola (Windows, Linux, Mac). See below for a TortoiseGit guide:
- Right click in the folder where you want to clone the repository to. Please note that the folder path should not contain any whitespaces. For example,C:/Git/ would be a good candidate to clone the repository to.
- Select Git Clone... and copy the Git Hub adress of your (forked) repository to the URL field. The URL should look something like this: https://github.com/<YourGitUserName>/mne-cpp.git (where <YourGitUserName> represents your GitHub username). Hit Ok.
- A loading screen with a flying turtle should appear. Wait until the Close button is clickable, which indicates that the cloning process is finished.
- Right click on the repository in your browser and select TortoiseGit -> Settings. On the left tree structure select Git -> Remote.
- Create a new remote repository which links to the MNE-CPP main repository. Choose a name different from "origin" which is already in use for your remote repository you cloned from. A suitable name would be "origin-mne-tools". Under URL put in https://github.com/mne-tools/mne-cpp.git and hit Add New/Save. Don't worry since you do not have admin rights to our main repository you won't be able to break/push something there. This remote repository can only be used to get the newest code updates.
- Option 2 (for more experienced users): Make use of the Git command console.
- Open the Git command line tool (Git CMD).
- Navigate to your folder where you want to clone the repository to (Use cd to navigate to a specific path on your hard drive). Please note that the folder path should not contain any whitespaces. For example, C:/Git/ would be a good candidate to clone the repository to.
- Type in the following command to clone the repository:
- (where <YourGitUserName> represents your GitHub username)
git clone https://github.com/<YourGitUserName>/mne-cpp.git
-
- Everytime you want to pull the newest changes made in the main MNE-CPP repository use the code below. Please make sure that you always pull from the right remote branch into the right local branch.
-
git pull https://github.com/mne-tools/mne-cpp.git master
-
- Option 1 (for newcomer users): Make use of a Git GUI client, such as TortoiseGit (Windows) or Git-Cola (Windows, Linux, Mac). See below for a TortoiseGit guide:
- You now have the latest MNE-CPP source code on your remote and local machine.