Difference between revisions of "Git Repositories"
Manuele.simi (Talk | contribs) (→Add an existing Repository) |
(Added a paragraph that adds some configuration settings recommendations) |
||
Line 9: | Line 9: | ||
https://code-repo.d4science.org/gCubeSystem/myNewRepo.git | https://code-repo.d4science.org/gCubeSystem/myNewRepo.git | ||
+ | |||
+ | = Configure the newly created repository = | ||
+ | In the same settings panel where you made the repository private: | ||
+ | |||
+ | - Set the wiki as enabled and remote, and give the URL of the remote wiki page | ||
+ | |||
+ | - Set the issues as enabled and remote, and give the URL of the dedicated redmine project (or the URL of the query that selects the specific category/sprint) | ||
+ | |||
+ | - Enable the pull requests | ||
+ | |||
+ | You can eventually force the use of pull requests from the ''Branches'' settings tab. | ||
== Initialize an empty Repository == | == Initialize an empty Repository == |
Revision as of 10:22, 6 June 2019
Contents
Create a New Repository
From the web interface, click on the New Repository button:
- Make sure the owner is the organization
- Create the repo as private
If the name of the repository is myNewRepo and it is created within the gCubeSystem organization, the repo URL is:
https://code-repo.d4science.org/gCubeSystem/myNewRepo.git
Configure the newly created repository
In the same settings panel where you made the repository private:
- Set the wiki as enabled and remote, and give the URL of the remote wiki page
- Set the issues as enabled and remote, and give the URL of the dedicated redmine project (or the URL of the query that selects the specific category/sprint)
- Enable the pull requests
You can eventually force the use of pull requests from the Branches settings tab.
Initialize an empty Repository
If the repository belongs to a new project (i.e. it is not imported), on the developer machine:
touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://code-repo.d4science.org/gCubeSystem/myNewRepo.git git push -u origin master
It is strongly recommended that each repository has a README.md (in Markdown format) in the root folder and each significant subfolder. The README should briefly explain the content of the repository, how to build it and link the related wiki documentation.
Add an existing Repository
On the developer machine, in the root folder of the repository, add the new remote to the configuration and then push the entire repository in the master branch:
git remote add origin https://code-repo.d4science.org/gCubeSystem/myNewRepo.git git push -u origin master
Back to the CI guide.