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

Git workflow - changes to Master while on feature branch

In A Day in the Life of a Git project Tommy describes working on a feature branch, making a few commits there, then going back to Master to quickly fix a separate issue unrelated to the branch.

When he goes back to the feature branch will that changed file be updated? If the feature branch and the hotfix on Master both touch the same file what will the process be when he checks out the feature branch to resume work?

2 Answers

David Andrews
David Andrews
17,403 Points

Hey Mike

I had this exact same thought, I am guessing the changes wouldn't be reflected in the feature branch so you would have to either

  1. Make the change in the feature branch as well (if it was small enough)?
  2. Merge the master changes into the feature branch - dealing with conflicts as you would normally?

Not 100% sure which is the correct approach though.

Number 2 sounds plausible. Probably that.