I know there are a lot of posts about git workflows, but I couldn’t find exactly what I’m looking for: recommendations about best practices for the following workflow:
I have a web application that deployed via git. The application developers release updates via a public git repo. I also have my own changes that need to be applied. What would be the best way to handle this?
What I’ve been doing: I created a local deployment repo, cloned from upstream. This is served via gitolite, so it’s a bare repo. I have a clone of this repo, on which I apply changes, and push them back to the deployment repo. When changes are published to the upstream repo, I’ve been incorporating them into this clone, using the recommended command:
git fetch && git pull --rebase
I then push to the deployment repo. The problem is that I start getting a ton of merge conflicts on any files that I’ve changed. The same file will give me many conflicts during the rebase. I’m looking for an approach that can be more or less automated, but I don’t quite get git enough to understand what the problem is.
Can any git gurus offer some advice? Let me know if anything needs clarification. Thanks.
I don’t want to know and remember crappy, ugly, stupid, “original” Git-jargoon, so I’ll write recipe in the form of “needed actions”, task of translating it to command I leave for you
Preparation
Send your current workflow to dustbin
Actions
You’ll have conflicts only for changed by both sides (you and upstream) files on merge stage