bitbucket - doubt about workflow, branchs and merge

6

I and my team started working with git for version control (late I know), and we use bitbucket as a remote repository (because it allows free private repository).

Well, I have some doubts about the workflow.

The programmer is working on the master branch as it is the basis of the project in progress.

I'm working on the "front-end" branch, as I'm working on the styles for the responsive layout.

How should we always work with correct files?

I'm thinking, at the end of the day, to merge the "front-end" branch into the "master" branch, and then pull the master to my local base and the changes will apply to the "front-end" branch until finalize the project.

Is this correct?

    
asked by anonymous 21.01.2015 / 19:39

3 answers

3

Maybe this flow will help you.

Create the branch:

git branch frontend
git checkout frontend

But if you want someone else to contribute the changes to this branch as well. You can create a remote branch

git push origin frontend

to copy a remote branch locally

For your colleagues to contribute to a particular remote branch, they need to copy it locally.

git checkout -t origin/frontend

Then just give merge

git checkout master
git merge frontend

To avoid polluting your repository, it's a good practice to remove branches that are no longer needed. To do this, simply run the following command:

git push origin :frontend
    
21.01.2015 / 20:59
2

This is a workflow doubt with git, this is common to happen when you want to work with multiple branch's, I'm going to show git successful workflow.

Here has a good example of how to work in this way, I also indicate read about workflow with pull request, this can be a viable solution for you depending on your form of software delivery.

    
21.01.2015 / 20:20
1

In addition to the workflow options presented here, it may be interesting to also use some Continuous Integration system such as Jenkins, which can be configured to automate merges , builds and deploys of the application.

    
29.01.2015 / 19:24