How do I keep GIT repositories inside Dropbox?

两盒软妹~` 提交于 2019-12-23 21:34:58

问题


So I've seen similar questions asked before, but I'm not thinking about pushing/pulling from a repo on Git's servers, this is just as a place to keep the repo locally on my machines. I'd still push/pull to GitHub.

I know it can technically live wherever I want it to, but can anyone think of a reason this might end badly?

I use Dropbox on a Mac, Windows system and a Linux server, if that makes a difference.


回答1:


Saving a git repository on DropBox etc is not a good idea, and in general, you should try to avoid having a live repository(one whose contents can change frequently) on dropbox. This is because the files within DropBox are synced to the DropBox servers, and can frequently result in corruption of local blobs, which in the worst case can make your repository unusable. For example, check :

  • https://stackoverflow.com/a/9030201/1860929
  • https://stackoverflow.com/a/5044399/1860929

Since you are already pushing to github, just clone the repository when you need it the next time.



来源:https://stackoverflow.com/questions/29983646/how-do-i-keep-git-repositories-inside-dropbox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!