Sathish Kumar
Sathish Kumar

Reputation: 2536

Build Approaches for patches using Git

I am new to Git and I have to setup the build process for my account

For full builds I can do git clone

However for 'patch builds' I need to 'pull' the last known good code + code changed for that patch

Example

a.c  v1.0 - full build
a.c  v1.1 - extract v1.0 (last known good code) + extract delta (v1.1 in this case)
a.c  v1.2 - extract **till** v1.1 (last known good code) + extract delta (v1.2)

What are the best build approaches using Git to deploy build and deploy 'patches'?

Suggestions and links will be very useful.

Upvotes: 0

Views: 103

Answers (1)

nwinkler
nwinkler

Reputation: 54457

I find the Git Flow model good for working with releases and providing patches. You work with a stable master branch and all other work is done in branches. Hot fixes (I guess similar to your 'patches') are part of the model, allowing you to use a stable release (as per a Git tag) and then providing a fix for that release.

Here's another list with a comparison of various branching model: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

I'm not entirely sure about your question with regards to the 'extract delta', but I guess the use of Git branches and tags is really what you're looking for. You would create tags for v1.0, v1.1, etc. and then use branches based off these tags for applying the patches.

Upvotes: 1

Related Questions