Difference between revisions of "Get the MNE-CPP source code"

From MNE-CPP Wiki
Jump to: navigation, search
Line 5: Line 5:
 
## Go to the [https://github.com/mne-tools/mne-cpp MNE-CPP's Git Hub website].
 
## Go to the [https://github.com/mne-tools/mne-cpp 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.
 
## 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, download Git for [https://git-scm.com/download/win Windows] or [https://git-scm.com/download/mac Mac] and install it.
+
# If Git is not installed on your local machine
 +
#:* Download Git for [https://git-scm.com/download/win Windows] or [https://git-scm.com/download/mac Mac] and install it.
 +
#:* Open the console type in the following commands:
 
# Clone your forked (Git Hub) repository to your local machine. There are two ways to do this:
 
# 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 [https://tortoisegit.org/download/ TortoiseGit] (Windows) or [http://git-cola.github.io/ Git-Cola] (Windows, Linux, Mac). See below for a TortoiseGit guide:
 
#:* Option 1 (for newcomer users): Make use of a Git GUI client, such as [https://tortoisegit.org/download/ TortoiseGit] (Windows) or [http://git-cola.github.io/ Git-Cola] (Windows, Linux, Mac). See below for a TortoiseGit guide:
 
#:*:# Right click in the folder where you want to clone the repository to.
 
#:*:# Right click in the folder where you want to clone the repository to.
#:*:# Select ''Git Clone...'' and copy the Git Hub adress of the repository to the ''URL'' field. Hit ''Ok''.
+
#:*:# 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.
 
#:*:# A loading screen with a flying turtle should appear. Wait until the ''Close'' button is clickable, which indicates that the cloning process is finished.
#:* Option 2 (for more experienced users): Make use of the Git commands via the command console.
+
#:*:# 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'').
 
#:*:# 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 harddrive).
 
#:*:# Navigate to your folder where you want to clone the repository to (Use ''cd'' to navigate to a specific path on your harddrive).
 
#:*:# Type in the following command to clone the repository:
 
#:*:# Type in the following command to clone the repository:
#:*:#: <source lang=cpp>git clone https://github.com/mne-tools/mne-cpp.git</source>
+
#:*:#: <source lang=cpp>git clone https://github.com/<YourGitUserName>/mne-cpp.git</source> (where <YourGitUserName> represents your GitHub username)
 +
#:*:# 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 branch.
 +
#:*:#: <source lang=cpp>git pull https://github.com/mne-tools/mne-cpp.git master</source>
 
# You now have the latest MNE-CPP source code on your remote and local machine.
 
# You now have the latest MNE-CPP source code on your remote and local machine.

Revision as of 19:37, 25 January 2016

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:

  1. Fork the repository from the main repository (mne-tools/mne-cpp).
    1. Go to the Git Hub website and sign into your Git Hub account.
    2. Go to the MNE-CPP's Git Hub website.
    3. 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.
  2. If Git is not installed on your local machine
    • Download Git for Windows or Mac and install it.
    • Open the console type in the following commands:
  3. 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:
      1. Right click in the folder where you want to clone the repository to.
      2. 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.
      3. A loading screen with a flying turtle should appear. Wait until the Close button is clickable, which indicates that the cloning process is finished.
      4. Right click on the repository in your browser and select TortoiseGit -> Settings. On the left tree structure select Git -> Remote.
      5. 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.
      1. Open the Git command line tool (Git CMD).
      2. Navigate to your folder where you want to clone the repository to (Use cd to navigate to a specific path on your harddrive).
      3. Type in the following command to clone the repository:
        git clone https://github.com/<YourGitUserName>/mne-cpp.git
        (where <YourGitUserName> represents your GitHub username)
      4. 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 branch.
        git pull https://github.com/mne-tools/mne-cpp.git master
  4. You now have the latest MNE-CPP source code on your remote and local machine.