5

I'd like to use clasp to develop Apps Script projects locally. Clasp has a built-in clone method which fetches a project by ID and pulls the code into a local directory. This also creates a .clasp.json file with some project settings.

The problem is that my code is already in a Git repo, so I'm wondering what the best method of getting the code locally would be. Is there a difference between these two methods?

  • Clone with git and then edit .clasp.json to point to the correct project id
  • Clone with clasp and then git init a repo and manually set the remote URL

...or does it not matter?

1 Answer 1

5

The two methods would work in the same fashion. They will both work and there is no different between them.

However, this is a matter of taste and comfort rather than best-practice. In my opinion, the best method is the first one.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.