Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My colleague and I work together on an iPhone app in Xcode. Now and then, we want to merge our work. Ideally, this should also work when we are offline and use a USB stick to exchange eachother's projects.

For the case the majority of the changes are non-conflicting, what way can I use to merge these two whole projects locally, and keeping the local GIT repository in sync with these merges?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
160 views
Welcome To Ask or Share your Answers For Others

1 Answer

This is what source control is for. You mention git, and that's a reasonable source control system to use. git is very good at branching and merging and makes it pretty easy. You should read the git book chapter on branching. It explains it pretty well.

There are a variety of ways you can do it, but if you both work on different computers, it seems like the easiest way is to have a git server that hosts the main repository. You can each branch and merge locally or from the server. You shouldn't need to share a memory stick, though you could theoretically keep a local git repository there and each have branches on it. But git was intended to be used by many people distributed in different places each making their own frequent branches and merging them back together.

I should add that you can start a git repository locally and later move it to a server if you don't have a server right now. You can also use something like github to store your project on a server without having your own server.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...