Reputation: 137
I know there are similar questions - this one is the one mine is most like: Using Git and Dropbox together effectively?
My question is: I've started using Git to keep versions of my school information. Lets say, I have a GradSchool folder where I keep my resume.doc and SoP.doc. This folder is IN my dropbox folder, as I use dropbox a backup. Dropbox has "versioning" but it isnt that great, so I want to keep better track of versions of this. So
~: cd ~/Dropbox/GradSchool/
~/Dropbox/GradSchool/: git init
~/Dropbox/GradSchool/: git add .
~/Dropbox/GradSchool/: git commit -a
But now that means I have a .git folder that is being "pushed" to my dropbox every time it changes, along with the documents in the folder. If I change branches on my machine will dropbox now sync that version to its servers and my other machines?
Is this a wrong way of doing this? The different SO question linked above had a different workflow, but it also didnt keep the project files IN the dropbox folder for backup. It also mentioned creating a "bare" repo to push to. What is a "bare" repo? (in easy terms because I am new to this). Any help with how I should modify my workflow would be great!
Thanks!
Upvotes: 4
Views: 4105
Reputation: 1066
You could create two separate repo's, one inside your Dropbox, and the other on your local computer. Then you can work locally on your local repo, and when you are ready to put it on Dropbox you just use git push.
There is another answer you may be interested which shows you how to setup a "bare" repo.
Using Git and Dropbox together effectively?
Upvotes: 3
Reputation: 41236
I use Git & Dropbox for a lot of code that I want to keep easily accessible across multiple computers. Different content, but the same idea. I keep my .git folder in the Dropbox directory. Because everything is tightly compressed, it doesn't really take up much space. Unless the sync'ing bothers you, I'd say it's not a problem at all. It's never caused me any heartache and I have at least 4-5 projects stored this way.
Upvotes: 4