= 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.
= Working with GitHub Git and c4science Git =
This means you need to be identified with two different accounts. Git is somehow clever because it choose the right account based on the URL of the remote repository.
However it needs to be setup right.
For c4science, here is the procedure to be able to login:
* 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. You NEED to specify the password in c4science:
** click top right on your icon > select Settings >
** then on the left, select VCS password. Enter a password
* now you can enter the same password when asked when you push a repo
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 authentification, and this time you can enter the correct one.