3

I'm a Git novice, but I've managed to create a local repo on my PC of my Firebase project and to push it to a cloud server.

I now want to pull that down onto a second machine, my laptop, but I can't figure out how to do this.

Git won't pull the repo down to my Firebase working directory on the laptop because it says it isn't empty. This is because I have run "Firebase init" on that folder. But if I don't do that then surely it won't work!

Can anyone tell me the correct install sequence for putting my repo onto my laptop so that I can continue development there and two people can work on the system at a time?

shyammakwana.me
  • 5,562
  • 2
  • 29
  • 50
Ads
  • 43
  • 1
  • 6
  • check documentation of `git clone` – shyammakwana.me Nov 10 '17 at 04:01
  • When more people are working, work on different branches. – shyammakwana.me Nov 10 '17 at 04:01
  • @shyammakwana.me I am not using git clone directly. I am using Google Cloud Source Repositories so the command is "Google source repos clone" not "git clone". However, I read the git clone documentation and I can't see anything that discusses my problem. Any suggestions would be welcome. – Ads Nov 11 '17 at 11:38
  • `github` in question was misleading. Note that `git` and `github` both are different. – shyammakwana.me Nov 11 '17 at 12:16

1 Answers1

0

As mentioned in comments, If you are using google cloud repo refer this link : https://cloud.google.com/source-repositories/docs/quickstart

Once repo is cloned you can use normal git commands. So you can create new branch and work simultaneously.

shyammakwana.me
  • 5,562
  • 2
  • 29
  • 50
  • Thanks again for your comment, but I'm still really confused. Forget the branching and simultaneous working for the time being. I'm blocked at a much earlier stage. I CAN successfully use google cloud repo to make a local clone, BUT the problem is that the resulting folder isn't initialised to work as a Firebase Dev folder because it doesn't contain all the necessary standard Firebase files (about 9,000 files) Alternatively, I CAN successfully create a Firebase Dev folder containing all the standard files BUT then I'm prevented from cloning the repo into that folder because it's not empty. – Ads Nov 11 '17 at 12:35
  • ... so I've already read they quickstart article before and can follow it successfully. My problem is not in using git, it's in using git and Firebase TOGETHER. – Ads Nov 11 '17 at 12:38
  • If firebase files are missing then it's not in repo, it means you have missed something while pushing code first time. Or firebase files are ignored by gitignore. Only these 2 cases are possible. – shyammakwana.me Nov 11 '17 at 13:02
  • I added a gitignore because I didn't think all those files need to be in the repo as there are many Firebase samples online done that way. I thought I'd be able to recombine my authored files with the standard ones later, but I'm struggling to do so. What should I have done? – Ads Nov 11 '17 at 13:13
  • remove files from gitignore which you have customized. Or libraries that you want to include. In demo you have seen they are ignoring files, means you they must be using some tool (npm or composer kind of) to get repos downloaded. – shyammakwana.me Nov 12 '17 at 06:41
  • My gitignore is correct. The problem is simply down to how to reconstruct it all on another machine. I'm using a popular set of tools. I'm trying to find the standard, correct way to use them together. Are "npm or composer" the correct thing? – Ads Nov 12 '17 at 09:41