I have a repository that directory stucture looks like below
-- Frontend
-- Frontend files
-- Backend
-- Backend files
The I am now looking to deploy the backend to Pythonanywhere. Pythonanywhere works as remote cloud console for deployment. I want to be able to store just the backend content without the frontend to save on memory. Do I have to break the repository into frontend and backend repos, or this there a .gitfocus command or function to only pay attention to changes in the backend folder.
As described in "Git push deployments on PythonAnywhere", if you want to git push your files in order to trigger a deployment, you will need to have indeed two repositories.
Even if you had two branches (one per folder), and pushed only one of them, those branches have (with your current repo) too much common history, and you would end up pushing the full history anyway.
Having separate repositories (grouped locally in a parent repo through submodules) is cleaner.