I have a git repository. I want to create a branch for release snapshots. Would work like this:
- Currently working in my usual branch, named “foo”.
- Create a branch (one time), named “release”.
- Work for a bit on foo, committing changes etc.
- Ready to cut a release of the app, push all changes from foo to release.
- Repeat steps 3 & 4 from now on.
The purpose of “release” is to hold the state of the code for the last public release. If I discovered a bug a week after release, I could pull out that snap shot, patch and re-release.
Is there some other mechanism of doing this? I’m coming from subversion and wincvs, so any advice would be great.
Thanks
Another way of doing this is through tagging. Work in any branch you like and when you are ready to release just tag the current head.
This can then be referenced at any later point to make changes from that point
Note: When doing a push to your remote tags will not be pushed by default. You need to use the –tags option to push the newly created tag so other users can download it later.