Reputation: 3999
I have a question about git's work flow. I've found some guides, but maybe you guys can clarify this for me.
Alright so the normal workflow that we are using in our department/project is:
So where I am having trouble is understanding on how to work on a branch that is dependant on another branch. To clarify:
file A has information for issues 1 and 2. Say I work on issue 1, and push that branch to be merged with dev. How do I work on issue 2, then once dev accepts the pull request from issue 1, update the code for issue 2 and then push to dev as a seperate issue.
I know that is a bit confusing so please let me know if I need to clarify.
I'm not sure if this is similar to what I am talking about :How to handle dependencies when using git topic branch workflow?
Upvotes: 0
Views: 63
Reputation:
In this example, let's say that you are working on HTML in one branch (feature/html
), and the CSS in another branch (feature/css
). Additionally, you mentioned that there is a dev
branch and a master
branch. Let's say that you push two commits to feature/html
but you don't merge those changes up to dev
.
If you want to work on the feature/css
branch with the changes that you have committed into feature/html
, you would simple merge the changes from feature/html
into feature/css
. You would do this with the following command:
$ git checkout feature/css # If you aren't already in the feature/css branch
$ git merge feature/html
Upvotes: 1