Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do releases and control versions in Bitbucket

I would like to have releases of my project from development environment which stores in Bitbucket. Final version of the project of stage 1 is running on a server and few developers locally working. Now I need to keep working on that project for adding new features or making new release. I use "master" branch to save all files of the project.

From my search:

Advantages of multiple branches

  • Only one repository is enough to manage
  • Comparison (diff) between branches possible directly from that one repo
  • You can pull any of those branches from that one repo to any other downstream repos which might need it

Do I need to clone my project to keep working or do I need to create another branch to put all modified files? What are the reasons that not to push all to "master" branch?

Are any of my statements incorrect?

like image 972
varman Avatar asked Jan 28 '23 20:01

varman


1 Answers

you probablly want to have a look at gitflow, it's a popular branching strategy. Some Git tools have native support for gitflow as well. If nothing else, have a look at it and then think about your own branching strategy.

But in the simplest scenario, master branch is used to track released versions of your code, develop branch is a branch where developers merge their features into, and individual developers make their own feature branches to do their development....

so normally you'd branch off develop into a feature branch.... write code, add files, etc. You can pull develop into your feature branch at any stage if you want to keep in synch. Then when ready the developer merges into develop (via pull request ideally). Once develop has a set of features that you want to release, then you synch with master.

Gitflow specifies more branches that are very useful, like release branches and hotfixes.

see https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow for a more indepth look

like image 78
Keith Nicholas Avatar answered Feb 07 '23 09:02

Keith Nicholas