Skip to content

Support multiple remotes for projects to support forking workflow #104

@amisevsk

Description

@amisevsk

Is your feature request related to a problem? Please describe.

It's not very common to work on git projects with a single remote; at the very least, a common flow is to have

origin: <your fork>
upstream: <upstream fork>

but it's further useful to add close collaborators' forks as remotes in your local copy as well.

It would be useful if the devfile supported assigning multiple remotes to a project.

Describe the solution you'd like

Option 1

Add remotes section

spec:
  projects:
    - name: project   
      git:
        location: "https://github.com/amisevsk/web-nodejs-sample.git"
      remotes:
        upstream: "https://github.com/che-samples/web-nodejs-sample.git"
        gh-collaborator: "https://github.com/gh-collaborator/web-nodejs-sample.git"        

Option 2

Support multiple locations instead of a plain string:

spec:
  projects:
    - name: project   
      git:
        location: # alt: 'remotes' ?
          origin: "https://github.com/amisevsk/web-nodejs-sample.git"
          upstream: "https://github.com/che-samples/web-nodejs-sample.git"
          gh-collaborator: "https://github.com/gh-collaborator/web-nodejs-sample.git"  
        primary: origin # optional; defines which fork should be checked out from      

Option 3

(added from #104 (comment) below)

spec:
  projects:
    - name: project   
      git:
        branch: foo
           remote: upstream # optional, defaults to origin
        remotes:
          origin: "https://github.com/amisevsk/web-nodejs-sample.git"
          upstream: "https://github.com/che-samples/web-nodejs-sample.git"
          gh-collaborator: "https://github.com/gh-collaborator/web-nodejs-sample.git"  

Additional context

Discussion in Eclipse Che issues: eclipse-che/che#17449

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions