Difference between revisions of "Git Repositories"
Manuele.simi (Talk | contribs) (→Create a New Repository) |
Manuele.simi (Talk | contribs) (→Initialize an empty Repository) |
||
Line 11: | Line 11: | ||
== Initialize an empty Repository == | == Initialize an empty Repository == | ||
+ | If the repository belongs to a new project (i.e. it is not [[Import_from_SVN|imported]]), on the developer machine: | ||
<source lang="bash"> | <source lang="bash"> | ||
touch README.md | touch README.md | ||
Line 19: | Line 20: | ||
git push -u origin master | git push -u origin master | ||
</source> | </source> | ||
− | It is strongly | + | 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 == | == Add an existing Repository == |
Revision as of 04:37, 13 May 2019
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
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
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.