4

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!

2
  • Seems redundant to have git and dropbox on top of each other. Why not set up your own git server, and push to it from both places? Commented Sep 7, 2010 at 14:58
  • 4
    "Setup my own git server?" Isnt that a bit easier said than done? Commented Sep 7, 2010 at 18:05

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Ok so its ok to think about placing my GradSchool folder (which contains the .git directory) inside of my dropbox folder and let dropbox sync everything behind the scenes?
Thats the idea - you may have problems if you commit from two different machines before Dropbox has a chance to sync. But if there is only one of you that shouldn't be a problem.
@NewImageUser: That's what I do. I like being able to code on either without having to worry about committing, pushing or pulling. Sometimes I need to switch machines with updates in a state that I just don't want memorialized by a commit--even if I can rebase it later.
3

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?

1 Comment

This is what I do. It makes more sense to me to keep your worktree out of your Dropbox folder, and use Dropbox as a remote.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.