When it comes to code files, and related, for example: images that are in the application, audio file, etc...; the best practice is that all this is versioned into one version controller.
Currently, perhaps, the most used is the Git, but you’ll still find Mercurial, still within the DVCS, and still the SVN, TFVC, within the CVCS.
To know the difference between CVCS and DVCS see these links:
https://stackoverflow.com/questions/111031/comparison-between-centralized-and-distributed-version-control-systems
https://en.wikipedia.org/wiki/Version_control#Distributed_revision_control
Some of these are products, for example TFVC, already others have implementations, for example for SVN there are several client plug-ins for access.
The most recommended currently is Git, a popularity gained by Github.com, so much so that Microsoft has even implemented on Azure Devops, on the vertical today called Azure Repos, in a new project you can choose between Git and TFVC, and Microsoft’s own recommendation is Git.
Therefore, ideally you should choose one of these versioners and use them. If you choose the on-premise version, you should backup, for example, Azure Devops Server has the option to back up. Azure Devops Services, which is a cloud service, is not needed! Just like Github.com.
The interesting thing about using Git is that you’ll be able to switch services, without any loss, you can test Github.com or Azure Devops and in the future migrate to any other Git Channel service, as they will all be compatible.
A bad practice is to use the services you mentioned, One Drive or Dropbox, as they are not suitable for code versioning.
and why not use gitlab? https://about.gitlab.com/pricing/#self-managed
– HudsonPH
you can also create a backup routine with the cron to backup only files that are not in your ". gitignore". in this case it will be necessary to understand a little shell script.
– Giovana Morais