Skip to content

TheHandLab/TMSMultiLab

 
 

Repository files navigation

TMSMultiLab

A place to share resources, data and code for running a transcranial magnetic stimulation (TMS) research laboratory...

GitHub tutorial

If you've never used git or github before, you'll need some tutorials:

https://docs.github.com/en/get-started/start-your-journey/hello-world

If you're happy to get started, then there are three main ways you can use the repository.

1. Download the files you need

If you just want a few files, navigate to them and find the download button. Enjoy!

2. Set up a read-only copy of the TMSMultiLab repository

You can use git commands (or the github website) to clone the whole repository. This will set up all the TMSMultiLab files and directories on your local machine.

Later on, when you want to update your local version to the latest versions, you can run the code git pull from the TMSMultiLab directory on your local machine and it should do everything you need. Here's a quick guide to cloning the repository and the wiki:

Cloning the repository to your local machine

  1. install git on your local machine
  2. open a terminal
  3. navigate to the directory where you want the repository to be cloned (eg: MyFiles)
  4. type git clone https://github.com/TMSMultiLab/TMSMultiLab
  5. it is done - you now have all the code in MyFiles/TMSMultiLab

If you edit these files on your local machine, you will then need to stage, commit, and push them up to the main repository - this needs to be done as per below = 3. Developing the TMSMultiLab code & wiki

To ignore any local changes when trying to pull updated files from the repository, you can use git checkout Directory/File.ext to ignore local changes on each file, and overwrite this local file with the updated repository file.

If the main repository files change, you will need to fetch or pull the updates before using them.

Cloning the wiki to your local machine

see 1-3 above, then:

  1. type git clone https://github.com/TMSMultiLab/TMSMultiLab.wiki.git
  2. it is done - you now have all the wiki in MyFiles/TMSMultiLab.wiki

If the wiki files change, you will need to fetch or pull the updates before working on them.

3. Developing the TMSMultiLab code & wiki

If you're planning to make major changes to the code, or to contribute new material, you will most likely want to create your own fork of the TMSMultiLab repository. This allows you to work on the files without affecting anyone else's version of the repository. Once your changes have been completed, tested, and reviewed with other TMSMultiLab members, they can then be merged across into the main repository.

  1. Log in to github and browse to the TMSMultiLab repository
  2. Click on the Fork menu button, choose the account to which you want the repository to be forked, and include the main branch
  3. You can now edit your own complete version of the TMSMultiLab code and wiki. While you could do this on the github website, most likely you'll do this in a cloned version of your own (forked) remote repository on your local machine, like this:
    • git remote set-url "origin" git@github.com:[MyUserName]/TMSMultiLapo.git - this tells your local machine where to synch your files with
  4. As you develop your code, you should keep your local version(s) up-to-date with your (forked) github repository, by regularly pulling remote updates to your local machine, then pushing them back up to your repository when done, like this:
    • git pull - get all the latest updates from your repository
    • git status - check current status for any errors or updates
    • git add -A - add all the local changes to a list of those ready for synching
    • git commit -m 'latest updates to myfile.txt' - commit the changes to the repository, with a message
    • git push - push all the changes up
  5. Keep pulling and pushing regularly..!
  6. When you're ready to share the developments from your repository into the main TMSMultiLab repository, you'll need to do a Pull request

About

Resources, data and code to help you run a TMS laboratory

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • MATLAB 100.0%