Hamza Yerlikaya
Hamza Yerlikaya

Reputation: 49339

Tracking other peoples projects with git

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?

Upvotes: 3

Views: 140

Answers (3)

Dan Moulding
Dan Moulding

Reputation: 221031

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).

Upvotes: 5

Dustin
Dustin

Reputation: 91050

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

Upvotes: 3

Matthew Flaschen
Matthew Flaschen

Reputation: 285027

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

Upvotes: 1

Related Questions