= About GIT =
== On https://c4science.ch/ ==
Now there is a new GIT Management tool on EPFL, https://c4science.ch/
Oli created the [[https://c4science.ch/project/view/567/ | BioImaging And Optics Platform Group]] there and has added all the projects currently under version control.
To add a project to **c4science** we need to
# Create a new repository following the conventions below.
# Change the permissions so that only the members of [[https://c4science.ch/project/view/569/ | ImageJ Tools]] can make changes
# Activate the repository
# Use the link to push to it from the local repo
{F164844, layout=right, float}
=== Conventions ===
Please follow these conventions when creating a repository containing code
|Type |Name |Short Name|
|------|-------|-------------|
| ActionBars | {name} ActionBar | ijab-... |
| Plugins | {name} Plugin | ijp-... |
| Macros | {name} Macro | ijm-... |
| Scripts | {name } Script | ijs-... |
| XTensions | {name} XT | xt-... |
| Python Projects | {name} Python | py-...|
- All things ImageJ are to be placed under the project [[https://c4science.ch/project/view/569/ | ImageJ Tools]]
- Imaris Related Projects Should be under [[https://c4science.ch/project/view/569/ | Imaris Tools]]
- Other tools, projects (Cell Profiler, Ilastik, ...) you should create a new project.
=== Creating a new repository
# From the main page, go to **[[https://c4science.ch/diffusion/edit/form/default/| Create A New Repository]]**
# Choose **GIT**
# Please fill in the fields as suggested by the **Conventions** Section above
# Don't forget to add the repository to the right project!
The new repository **is not yet active**. You need to first go to **Policies** and change them as follows:
- **Visible To**: All Users
- **Editable By**: Members of Project// (ImageJ Tools / Imaris Tools...)//
- **Can Push**: Members of Project// (ImageJ Tools / Imaris Tools...)//
Save and go back to **Basics** and **Activate the Repository** On the right hand menu
There is also a page detailing [[c4science/simplerepo| how to create a simple repository]]
=== Migrating a git.epfl.ch repository ===
There's a [[c4science/migration | short documentation]] on how to migrate a project initially on https://git.epfl.ch
= GitHub PTBIOP Account =
https://github.com/PTBIOP
Oli created an account for the BIOP on GitHub. That way our public work is more visible and more professional
Both Romain and Oli are administrators and can add more people and create repositories.
= C4Science VCS Password =
In order to push data to C4Science, you need to define a **Version Control System** Password (VCS)
1. Click top right on your icon > select `Settings` .
2. On the left bar, select `VCS password`. Enter a password.
3. Now you can enter the correct password when asked when you push a repo.
= Working with GitHub Git and c4sciencemultiple remotes for a given repo: Git =Hub & C4Science =
This means you need to be identified with two different accounts. Git is somehow clever because it chooses the right account based on the URL of the remote repository.
However it needs to be setup right.
For c4science,When you add a remote repository, specify your login. here is the procedure to be able to login:For instance
```
* when you add a remote repository, specify your login. For instance `git remote add origin https://chiarutt@c4science.ch/source/bacteriaworkflow.git/` where `chiarutt` is your login
* the first time you push on a repo, the password will be asked (if not, you have no issue, stop here). You NEED to specify the password in c4science beforehand:```
** click top right onwhere `chiarutt` is your icon > select `Settings`
** then on the left bar, select `**c4science login**
You will be promted for your **c4science VCS password`**. Enter aYou NEED to specify the password
* now you can enter the correct password when asked when you push a repo in c4science beforehand
NOTE: Don't forget to add your user name before `c4science`
If the password was wrongly entered, you can remove it from the OS password manager. In windows 10, it means : execute `Credential Manager` (search with the windows key), then go to Windows Credentials, find the credentials and delete it. Git will re-ask for authentication, and this time you can enter the correct password.