Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Mayur Pande
PLUS
Mayur Pande
Courses Plus Student 11,711 Points

[SOLVED] If I merge a branch will it effect the develop branch GIT

I have been following nvie's git branching model.

Using a stable develop branch of master and creating feature branches of the develop branch.

So I was creating a feature branch "admin_panel" that branches off "develop" branch but then realised I had to sort out the design of the site.

So I then create a new feature branch "adjust_layout_design" that again branches off "develop" branch. I then finished the branch merged it back into develop. Created a release branch merged that back into master and then pushed the changes to git hub and deleted the "adjust_layout_design" and "release-3.2.2" branch.

This is all good. However now when I checkout my "admin_panel" branch, it still has the same old layout as expected.

But where I am worrying is, when I complete my "admin_panel" feature branch and merge it back into "develop" branch. Will it override the styles and layout? As this is typically not what I want!

Karolin Rafalski
Karolin Rafalski
11,368 Points

What you want to do is git pull <origin*> develop in your admin_panel branch first. Make sure there are no conflicts, fix up any bugs that might have been introduced and once that's in the clear, then you would push your admin_panel branch up into your master.

If that makes you nervous, you can make a new branch off of your admin_panel and git pull your develop branch into that, work on your merge there and if that works out, merge it into to your original admin panel and then into your develop branch.

*where <*origin> is the alias of your git remote, whatever that is.

Hope this helps!

1 Answer

Mayur Pande
PLUS
Mayur Pande
Courses Plus Student 11,711 Points

solved it! simply just merged the "develop branch" into the "admin_panel" branch.