Difference between revisions of "Git Repositories"

From Gcube Wiki
Jump to: navigation, search
(Reference)
(Add an existing Repository)
Line 29: Line 29:
  
 
== Add an existing Repository ==
 
== 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:
 
<source lang="bash">
 
<source lang="bash">
 
git remote add origin https://code-repo.d4science.org/gCubeSystem/myNewRepo.git
 
git remote add origin https://code-repo.d4science.org/gCubeSystem/myNewRepo.git
 
git push -u origin master
 
git push -u origin master
 
</source>
 
</source>

Revision as of 21:12, 10 May 2019

Reference

Git service URL:

Available organizations:

  • gCubeSystem

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

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 recomended that each repository has a README.md (in Markdown format) in the root folder and each significant subfolder. The README should briefly explain the component, 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