Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotations #15

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added doc/branching diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions doc/git commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
Guidelines to develop the ontology with Git and Github
==========================================================

## Settings up your account on Github

### Create an account

### Add a public ssh key

## Installing Git on your computer

https://git-scm.com/downloads


## Interacting with the repository remotely

In our collaborative work, we aim at developing the ontology in parallel.
Each participant has a local repository to make its development. The local
developments are then pushed to the remote repository to be available for all the partners.

The main operations are described in the following sections.

### Clone the repository

The current version is available on GitHub so we want to copy that repository locally
to make our changes.
We will ***clone the repository*** with the following command line:
```
git clone [email protected]:emmo-repo/domain-microstructure.git
```

This operation uses ssh protocols so you need to have stored your public ssh key in your profile.
It is possible to clone also with https but it is simpler with ssh.

After that operation, you have the copy of the default branch (*main* in our case)
but also all the branches.

### Transfer changes to the remote repository

Git aims at tracking the changes between version. For that reason, when you have made
some changes two operations are needed: tagging and committing. Tagging will consist
sygout marked this conversation as resolved.
Show resolved Hide resolved
in indicating which file is to be marked as changed (and so which changes will be recorded
in the repository). Committing will actually do the recording of the changes.

Tagging is done by: ```git add name_of_file```
sygout marked this conversation as resolved.
Show resolved Hide resolved

Commiting is done by: ```git commit -m "my description of the changes" ```

The command ```git status``` will give you an overview of the tracked files that
have been modified, the tagged files, and also of the files that are not tracked.
sygout marked this conversation as resolved.
Show resolved Hide resolved
It also indicates on which branch you are.

After the commit, your local repository has been updated. This update needs to
be transferred to the remote repository stored on GitHub. We need to push the changes
by:
```git push```

### Update your local repository

```git fetch``` The git fetch command downloads commits from the remote repository
into your local repository to see the changes.

```git pull``` The git pull command is used to fetch and download content from a remote repository
and immediately update the local repository to match that content.

To avoid merging issues, it is important to pull from the remote repository before
adding new changes.

### Branching

Significant modifications on the code are usually done in branches. When the new feature of
the branch is developed, the branch can be merged with the main branch.

<p align="center"><img src="branching diagram.png" width="600"></p>

The main commands are:

```git branch ``` to get the list of branches.

```git checkout name_of_branch ``` to change to an existing branch.

```git checkout -b name_of_branch ``` to create a new branch and change to it.

```git checkout -b name_of_branch ``` to create a new branch and change to it.


### Merging

```git merge name_of_branch``` to merge the branch with your current branch.

In case of conflicts between your changes and what has been changed since your latest
update from the remote repository, you will need to resolve the conflicts.
During merge, the files will be modified to contain both versions of the portions
of codes. You need then to select what to keep.

More details are available here:
https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts







19 changes: 19 additions & 0 deletions doc/thesaurus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Thesaurus of terms to include in Microstructure domain ontology
==================================================================

# Microstructure


# REV



# Grain



# Grain boundary




Loading