search_index.json 12 KB

123456
  1. [
  2. ["index.html", "dealing with gin 1 Dealing with Gin", " dealing with gin Julien Colomb and Keisuke Sehara 1 Dealing with Gin Introduction to how to deal with gin (web interface, command-line, and probably WinGIN GUI). This book covers multiple topics, see the table of content to navigate it. "],
  3. ["intro.html", "2 Intro 2.1 Play with Sandbox", " 2 Intro 2.1 Play with Sandbox To avoid accidentally deleting your precious data, it is better that we have a repository that you can mess up. And here it is: larkumlab/GinSandbox You can add, edit, and move any documents, make commits, clone or fork, make issues etc. Have fun! "],
  4. ["web-interface.html", "3 Web interface 3.1 Cannot see a repository? 3.2 Dashboard: how to use 3.3 Browsing a repository 3.4 Downloading files 3.5 Uploading and editing files", " 3 Web interface 3.1 Cannot see a repository? So often, you try to visit a repository, and find something like below: 404 page The solutions are: Sign in to Gin Check that the repository exists Make sure you have access to the repository 3.1.1 Sign in to Gin It happens when you are not signed in to Gin. Click on the “Sign in” button at the top-right corner of the page: Sign-in button (If you have not yet got registered to Gin, then do it first from the “Register” button on the right. 3.1.2 Check that the repository exists If the situation persists, go visit your dashboard, and find the name of the repository from the list. If you click on it, the repository page should show up. 3.1.3 Make sure you have access to the repository If you don’t find the repository in your dashboard, then it is possible that you don’t have access to the repository at all. Ask somebody who has access rights to the repository for adding you as a Collaborator. 3.2 Dashboard: how to use When you simply sign in to Gin, without selecting any specific repository, you fill find a page like below (note that this is just an example): Dashboard overview This is called the “dashboard”, and here you can see most of your activity on Gin. The dashboard may be divided into several areas: Activity area: shows what you did with your repositories Collaborative repository area: lists up the shared repositories you have access to Private repository area: lists up your own repositories 3.2.1 Activity Activity area This shows your recent activity on Gin, e.g. your recent commits to your repositories issues and comments reported to your repositories 3.2.2 Collaborative repositories Collaborative repository area This area lists up the repositories owned by others and those you have access to. Normally, most of your repositories will show up here, as they are owned and managed by @larkumlab. 3.2.3 Private repositories Private repository area This area lists up the repositories owned by yourself. In many cases, these are visible only to you unless you add a Collaborator to one of them. 3.3 Browsing a repository If you visit the repository page, it looks like below: A typical repository page From here, you can browse what is in the repository including: overview of the repository file contents 3.3.1 Overview of the repository On top of the page, you will find the header consisting of <owner name>/<repository name>: Repository name This represents the identifier of the repository so that you can specify a single repository inside https://gin.g-node.org. Down to the bottom, you may find some document: README file This represents the (hopefully) detailed description of the repository about what it is or what it contains. In fact, this description comes from the README.md file in the root directory of the repository. The name of the file comes from a tradition of programmers community to contain the “read-me-first” file in the top directory of any code. You can add or edit it by adding / editing the README.md file. Even inside the sub-directories of the repositories, the description will automatically show up if you add and edit a README.md file in it. 3.3.2 Browsing files In the middle, you can find a list of files and directories in the repository: File list By clicking on individual file/directory entry, you can browse its contents. For example, you can see the contents of a sub-directory by clicking on it: Directory view Contents of normal files may be visible, as long as your browser supports it. For example, you can browse to web-interface/images/dashboard.png, and you can have a glimpse of the original image file: If you write the documents in the Markdown format (and I recommend to do so whenever possible), you can see the formatted-view of the document: Other text-based files (CSV, TSV etc.) may be seen in its raw format. Binary files (Excel, Word, Spike2 etc.) will not be visible, so you must download it to see the contents. 3.3.2.1 A small side note On the left columns of the files list, you can see some information like below: Commit description Sadly it is not about the description to the file itself but describes the commit that updated this file most recently. In the case of the image above, the directory “web-interface” was updated by the commit with the commit ID being b42b7633f7, and with the commit message update dashboard.md. 3.4 Downloading files Although the files may be browsable on the web interface, you might want to interact with them on your desktop, using one of your favorite programs. It is possible to download files individually from the web interface. Note that this “individual download” feature differs from what Git-people call “cloning of the repository”. Git-clone involves downloading of the whole repository, whereas this individual download concerns only with the current single file. 3.4.1 Download button When you open a single file, you will see buttons on the top-right of the file: Location of buttons These buttons represent the actions that you can execute on this specific file, including: Obtaining the link to this specific version of the file (Permalink) Browsing different versions of this file (History) Downloading the file (Download) Editing the file (the pencil symbol; it may not be available in the case of read-only repositories, or Gin does not have a way to edit the file e.g. PDF) Deleting the file from the repository (the trash-can simbol; may not be available) For downloading the file, click on the “download” button: Download button Then your browser will start downloading the file. 3.5 Uploading and editing files 3.5.1 Overview The Gin web-interface, with all its buttons, allows you to create and edit text-based files, or upload files, set of files or folders. In all case, one needs to set the target for these files and commit new changes. 3.5.2 Create a new text-based file TODO 3.5.3 Edit a text-based file TODO 3.5.4 Uploading a set of files When you click on the “Upload file” button, the file upload view will appear: File-upload view The dotted region in the middle of the page is the upload area: The upload area You can add the files to be uploaded by either: Clicking on the area: the file chooser dialog will appear so that you can select files from it. Drag and drop individual files or a directory containing a set of files. In the latter case, you can upload the whole directory structure easily. In either case, the upload process will start immediately, and you will see the progress on the area: Progress of upload You can specify the directory to be uploaded from the directory selector. After completion of the upload processes for all files, you can proceed to finish the commit process. Note, by using this upload view, you can only upload 100 files at once, with each file being less than 10 GB in size. If you want to upload more files at once, or upload larger files, you will have to use the command-line interface or WinGIN. 3.5.5 Location of buttons for uploading When the web interface shows a list of files in a repository, you can see blue buttons in the middle, above the file list. Note that, if you don’t have the “write” permission to the repository, these buttons will not appear. If you still want to create or upload files, contact the person responsible for the repository to add you as a Collaborator. Where you can find the buttons for file-creation / upload There, you have two types of buttons: “Upload file” button: used to upload a set of files. “New file” button: used to create a new file in the repository. Two buttons for new files 3.5.6 Specifying the directory to be uploaded 3.5.6.1 Targeting a (new) subdirectory On top of the view, an empty text field will show up: Directory selector This is for specifying the directory to upload the file(s). For instance: Enter the name of the subdirectory (within the repository) in this field: A subdirectory is specified Gin will automatically create a new directory with the given name (in case it does not exist) as you commit uploads: Created subdirectory Inside the subdirectory, you will find the uploaded file(s): The uploaded file in the sub-directory 3.5.6.2 Specifying a directory path You can also specify the path to the directory of interest, by connecting a hierarchy of directories by a / (slash): TODO 3.5.7 Committing new files TODO "],
  5. ["using-application-made-for-git.html", "4 Using application made for git 4.1 generalities 4.2 Git GUI 4.3 Using Rstudio with GIN", " 4 Using application made for git 4.1 generalities Several application are meant to deal with git commands without having to use the terminal. They usually do not deal with git annex commands, so only small files (< 50MB) can be pushed via their interface. If most of your files are below that limit, one can use these application for routine work, and use either the command line (with gin update .) or the browser interface from time to time to upload big files. Most of them have a way to push to external servers like GitHub, gitlab, or bitbucket. They are usually to ways to make this connection: via https or via ssh. The ssh version is more secure, but you need to set up keys for each computer you are using, and add these keys to the server. Gin can be used as a git server and usual git commands will work normally, but GIN has no https connection: one needs to use ssh. One finds easily walkthrough to set up ssh connections for different application. Some examples will be given in the next chapters. In addition, you need to set some configuration for git to push to a git server. This is often best done via the command lines: git config --global user.name "FIRST_NAME LAST_NAME" git config --global user.email "MY_NAME@example.com" 4.2 Git GUI The git gui command comes with the normal Git bundle. Git GUI can be used to visualize: modifications in the repository files in the staging area the commit message 4.3 Using Rstudio with GIN Rstudio is a very nice application that was created to write and run R code. It now also has the possibilities to run python code and create reproducible reports in Rmarkdown (there are also specific tools to deal with citations in these reports). It also has git functionalities, allowing to commit (save a new version of your repository locally), pull(download changes existant on the server but absent of your local folder) and push (save all new versions present locally to the server version). You need first to make sure git is installed and found by Rstudio: go the menu tools > global options > git browse to the git.exe if Rstudio did not find it automatically (a git.exe is installed together with the gin-cli, but you can also install another via https://git-scm.com/downloads. Find a walkthrough on how to set up ssh here: https://happygitwithr.com/ssh-keys.html. What you are asked to do on github will be done on GIN (https://gin.g-node.org/user/settings/ssh). You can now download new repositories using file > new project... >>version control >> git insert the ssh link you get on the gin repository page (for this repo git@gin.g-node.org:/larkumlab/Dealing_with_Gin.git) and decide the folder name and where to save it on your machine. I put all my repositories in a special gin folder in my document folder, but this is up to you to organise your files. You can then make changes, on the right part of the Rstudio window, you can access a git tab, where changed files are listed. You can then use the buttons of the tab to commit changes, pull, or push commits to GIN. Git advices: make small commits give commits a meaningfull comment which will allow you to spot changes easily in the history tab if you are working on different machines, do not forget to pull changes when you start working, and push before you go. "]
  6. ]