Difference between revisions of "Git Repositories"

From Gcube Wiki
Jump to: navigation, search
(Created page with "= Reference = Git service URL: * https://code-repo.d4science.org/ Organizations: * gCubeSystem = Create a New Repository = From the web interface, click on the ''New Repos...")
 
(Create a New Repository)
Line 10: Line 10:
  
 
- Make sure the owner is the organization
 
- Make sure the owner is the organization
 +
 
- Create the repo as private
 
- Create the repo as private
 +
 +
If the name of the repository is ''NewRepo'' and it is created within the ''gCubeSystem'' organization, the repo URL is:
 +
 +
https://code-repo.d4science.org/gCubeSystem/myNewRepo.git
  
 
== Initialize an empty Repository ==
 
== Initialize an empty Repository ==
 +
<source lang="bash">
 +
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
 +
</source>
 +
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 ==
 
== Add an existing Repository ==
 +
<source lang="bash">
 +
git remote add origin https://code-repo.d4science.org/gCubeSystem/myNewRepo.git
 +
git push -u origin master
 +
</source>

Revision as of 21:09, 10 May 2019

Reference

Git service URL:

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 NewRepo 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

git remote add origin https://code-repo.d4science.org/gCubeSystem/myNewRepo.git
git push -u origin master