I'm looking for advice on what a good branching strategy looks like when using mostly open source code. Most of my dev experience is with writing and working with custom made code and only using open source libraries so I'm a bit out of my dept here.
The aim is to use an open source application and make mostly minor and a few major changes to the code for our companies usage. We may also want to push bug fixes upstream sometimes.
My key concern is how to handle version updates. Whats the best way to merge our custom changes into the main code once an update is available without creating multiple repos? This will happen a couple of times each year, we aim to be no more than 1 version behind the latest version.
My current plan is to create a new branch to pull the new version into, do a diff between this and the current dev branch and then merge the code in a third branch until merges are complete and stable. This will now become the new trunk and the old one tagged as an older version. Any changes that need to be pushed upstream will be added to the first branch.
Suggestion and improvements welcome.