2 Projects to 1 repository?


#1

Hello

Can I link 2 different project to 1 repository of 1 project?


#2

You can’t ‘link’ Glitch projects to any repo at the moment - we only support exporting to repos on demand. You are able to export to whichever repo you like, though. You’d need to handle merging of those multiple projects once exported, which might be tricky depending on whether you have any common files.


#3

I mean, when I have in my project in the package.json
“repository”: {
“url”: “Project_link”
},

What is that?


#4

take a look at https://docs.npmjs.com/files/package.json#repository


#5

That means. It does not work for glitch.com? Will it come somewhen?


#6

You can use https://api.glitch.com/project-name/git if you want


#7

I cant open this link.


#8

Git can. Per the article I linked you to: “It should not be a url to an html project page that you put in your browser. It’s for computers.”


#9

So, I should put that link in to my package.json?


#10

and also in the second project package.json?


#11

It gives me this error with “repository”: {
“url”: “https://api.glitch.com/name/git
},

parse error: Invalid numeric literal at line 33, column 7


#12

I’d check your code as it should work fine. The following works fine for me so just copy and paste it, replacing project-name:

"repository": {
   "type": "git",
   "url": "https://api.glitch.com/project-name/git"
}

#13

So, I need to set that to my both projects? Then it should work?


#14

Is it possible to open the repository? How can I save the project on it?


#15

Yes, though I’m not sure what you’re expecting to happen - it’s just a reference as explained in the article I linked you to.


#16

You can push and pull from it using git.

It automatically runs in the background of your Glitch project, you don’t need to do anything to save the project on it. Snapshots are taken as you make changes.