To push a single file at a time.
Eg: _clasp push app.js_
_clasp push_
Pushes all files at once
Similarly , for pull . I would like to pull certain files alone.
Also the difference between the local and drive files could not be found . Please include a command for that too .
Please file 1 feature request per GitHub issue.
clasp diff was proposed here #109. Please continue conversation in that thread.Ok thanks
I am working on a GAS project with other people. We use GitLab for code sharing and version control. We find it a major bottleneck to sharing development that we can only "clasp push" an entire project at once in order to test it in the /dev environment. Being able to push files individually would let us at least parcel out development by file.
While some GAS projects can be developed locally with e.g. gas-local, those using GAS in the context of Google Apps (e.g. Sheets) won't be able to test anything they are simultaneously building without clobbering the tested work of other devs.
Or am I doing something wrong?
I'm with @nk9 here. It would be a huge benefit to be able to push one file only. I'm working on a quite large project with many files and sometimes I mess with more than one file at once but only want to test changes on a specific file. Then I can't simply clasp push because it will push other files that I, still, don't want to push because its changes are not finished. Then I've have to copy&paste my file which feels awkward.
I was experiencing the same.
PRs or designs are welcome.
One barrier to this feature is that the underlying API used by clasp to push files only accepts the full list of files, and will delete any existing files that don't appear in the API request:
https://developers.google.com/apps-script/api/reference/rest/v1/projects/updateContent
Implementing selective push would at a minimum require that all existing files are pulled into a temporary location, the desired file is merged in, and then that set is pushed back up.
Yes, I somehow forgot that API limit.
We could cache the files as mentioned above, but that's not ideal.
Most helpful comment
I am working on a GAS project with other people. We use GitLab for code sharing and version control. We find it a major bottleneck to sharing development that we can only "clasp push" an entire project at once in order to test it in the
/devenvironment. Being able to push files individually would let us at least parcel out development by file.While some GAS projects can be developed locally with e.g. gas-local, those using GAS in the context of Google Apps (e.g. Sheets) won't be able to test anything they are simultaneously building without clobbering the tested work of other devs.
Or am I doing something wrong?