Cloning Github repository - EBI-Metabolights/SAFERnmr GitHub Wiki

How to clone SAFER as a repository

Intended for those who don't usually work with Github. These are intended to be super specific instructions because Github is super useful but also a little confusing to get started with.**

There are two ways you could do this:

The 'safer' way

  1. Install Github Desktop. Set up Github through desktop. I have a Github directory in in my Documents folder, and usually mount my repositories there.

  2. In the Github Desktop App, you should see something like this in the top left corner:

    show example clone_1
  3. Click the Add button there

    show example clone_3
  4. Click 'Clone Repository'. Select URL:

    show example clone_4
     </details>
    
    show example clone_5
  5. Use the 'Choose' option to set your mounting folder to Documents/Github, or wherever you want to mount your repos on your machine. Then, enter the URL of SAFER (https://github.com/EBI-Metabolights/SAFER) into the field that says URL or username/repository, and you should see the Local Path field update. This means that Github Desktop will create a folder called SAFER in that location (e.g. Documents/Github in my case). This is where all your other cloned repositories will live by default. In the SAFER folder is where all the code for the package will go:

    show example clone_6
  6. Click the Clone button, and you should see the following:

    show example clone_7
  7. This means the files are being downloaded. Once that's done, you'll get this:

    show example clone_end
  8. The cool thing is, now Github Desktop will now update all of the files in the SAFER folder with the most recent release version whenever you open the app and click the Fetch origin button. Sometimes it will say Pull origin. There are probably differences in what these mean, but either is fine for our purposes.

  9. Take note of where this repo is mounted. You can find this information by right-clicking the Current Repository' button on the top left corner (where we started) and clicking Reveal in Finder` (on a Mac):

    show example clone_reveal_finder

which will open a Finder window in that location.

<details>

<summary>show example</summary>
 <img width="725" alt="clone_reveal_2" src="https://github.com/EBI-Metabolights/SAFER/assets/15824301/8e0e8048-2763-4de4-9e68-97c95b28eeb3">
</details>
  1. On a Mac, you can then use Cmd-Option-C to copy the filepath of the folder (e.g. /Users/mjudge/Documents/GitHub/SAFER in my case). This will be useful for pipeline setup later on, and we'll refer to it as path_to_SAFER_repo_clone

That's it! Feel free to get in touch if this doesn't work for you - and feel free to modify as you like, create forks, etc. if you want to develop off of what we've done.

The quick-and-dirty way

(seriously, not recommended, but if you can't be bothered with Github, it's possible) Beware: you won't receive any updates to the code.

  1. Go to the SAFER Github page.

  2. Click the Green Code button, then select Download ZIP:

    show example image
  3. (Move if you want) and Expand it locally:

    show example image
  4. Copy the file location and use that as path_to_SAFER_repo_clone in the setup process

But, really: it's not the best option.

⚠️ **GitHub.com Fallback** ⚠️