Github and Dropbox conflict risk?

2019-09-16 19:33发布

I have a dev folder with all my projects. Some of these are on github and some are not. I also use Dropbox (with symlinks) to keep my data synchronised across several computers.

For example if I add something to my Documents folder on one PC I can then see it in the corresponding folder on another PC.

My question is: If I do the same with my dev folder (so the dev folder is synced by Dropbox on both PCs) will it cause problems with my pushing to github?

3条回答
Animai°情兽
2楼-- · 2019-09-16 19:38

I had the same question and now my answer is "simply move your repository out of Dropbox".

As you can see, Using Git and Dropbox together effectively? is not the same question, but if you just search the key word "GitHub", you will see the debate about your confusing. And maybe you will make your own desition.

查看更多
叛逆
3楼-- · 2019-09-16 19:41

I'm not sure exactly how you could "prove" that is ok. But, I have used exactly this development model with no issues. I personally, don't use symlinks in my dropbox but that shouldn't affect anything. All of my git repos are on my Dropbox. I've been working this way for over a year across OXS, Windows, and Ubuntu. All of my commits and pushes have worked just fine.

Also, this may be a repeat of this question: Using Git and Dropbox together effectively?

[edit:]

Actually one thing was recently brought to my attention is that you might run into an issue with line endings across systems. This post from GitHub (with a link back to an SO question) explains how to deal with line endings.

查看更多
贪生不怕死
4楼-- · 2019-09-16 19:59

You don't ever want to mix code versioning strategies. Either all of your code lives in git (which is a good idea), or it all lives in Dropbox (which doesn't give you any history, hence a very bad idea).

When you add a source file to git, you should be forced to push it to Github so it can be pulled at a later date.

I get the feeling that you will run into issues when pushing the code - you'll be adding new files in through one source, but pulling through another - it'd turn into a headache more than a benefit.

查看更多
登录 后发表回答