views:

92

answers:

3

Assuming that project A is using git as its SCM. I clone their repo make changes suiting my needs, after that can i still pull updates from their repo and keep my changes?

+1  A: 

Yes. Conflicting changes will be merged, which is basically the point of a good DVCS.

Matthew Flaschen
+3  A: 

I tend to build a branch for my changes and periodically rebase it atop the upstream code.

Dustin
+4  A: 

A real nice way of doing this in git is to "rebase" your changes. What this does, instead of merging the updates from "their" repo into your changes, is it rewinds (undoes) all of your changes, puts their changes into your branch (so everything is nice and linear) and then "replays" your changes on top of theirs.

This results in your changes always basically being a series of "patches" on top of the repo you are following (instead of having your changes interleaved with their changes as you move back through the history).

Dan Moulding
maybe a good idea to document how this works, succinctly? Sure, it might be repetive, but for someone who's read the git docs and never seen this... would be useful to have it recorded somewhere.
Chris Kaminski
@darthcoder: http://stackoverflow.com/questions/804115/git-rebase-vs-git-merge and http://stackoverflow.com/questions/904353/unable-to-understand-git-branch-merge-and-rebase offer some kind of documentation on the "rebase" topic
VonC