Ayrad
Ayrad

Reputation: 4056

does it make sense to use a local git repository in xcode while using dropbox?

I am the only programmer on this project and I would like to work on two different computers so I'm storing the project in dropbox. Should I check "Create local git repository"? What are the impacts?

enter image description here

Upvotes: 1

Views: 970

Answers (3)

g19fanatic
g19fanatic

Reputation: 10931

When you're the only person with access and only accessing it from one computer at a time, working directly off of this 'local repository' would work just fine.

When there is a situation where possibly more than one person would be able to access it at one time, be sure to follow git's most common practices. use this 'centralized' storage location as a location that you can git clone when you're starting on a new computer and use git pull and git push to update changes to the repository. This way everything can be synchronized between multiple 'separate' locations as well as dealing with conflicts when they come up.

EDIT

Check out this other dropbox+git question to get some usage tips. Lots of good info here.

Upvotes: 0

Romain
Romain

Reputation: 12819

Creating the local git repository means you will be able to version-control your source code, which I would consider a good thing. Now, having a git repository in a DropBox is dangerous in case the DropBox folder is shared, if two people change stuff at the same time in that shared git repository, you will end up in a DropBox conflict nightmare.

Assuming your DropBox folder is only visible to you, and you will not work on both computers at the same time (seems unlikely), it is absolutely fine to have the local git repository in the DropBox, though it will increase the space consumed off your DropBox account (that's pretty much the only side-effect, that and bandwidth usage for synchronization).

Upvotes: 3

Kjuly
Kjuly

Reputation: 35131

It doesn't matter whether you check or not.
If you checked it, the XCode will create a local git repository at Dropbox fold for you. You can manage your project by your both two computer.
If not, you need to enter Dropbox fold and create a local git repository by yourself:

$ cd pathTo/Dropbox
$ git init

Upvotes: 0

Related Questions