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 Basics Merging Basic Merging

I missed something in the Basic Merging tutorial.

i received an error message "error: Your local changes to the following files would be overwritten by checkout: README please commit your changes or stash them before you switch branches." Aborting adams-MacBook-Pro:my_really_cool_project vanhelzer$ git commit -a -m "talk about how cool treehouse students are" [master d422e23] talk about how cool treehouse students are adams-MacBook-Pro:my_really_cool_project vanhelzer$

i committed the README file but it should be foo_feature, not master (at least that's my understanding of it) Can someone direct me so I can get back on track with the tutorial?

Thanks in advance!

1 Answer

Kristopher Van Sant
PLUS
Kristopher Van Sant
Courses Plus Student 18,830 Points

Were you able to get back on track? Based off what you posted I'm guessing you didn't switch to the foo_feature branch when he did (1:56 in the video) and so you were still on master when you made the changes.

If you want to review what he did I tried to break it down based on where it is in the video...

1:56- switch to foo_feature branch

2:06- new change

2:15- commits change

2:23- switches back to master

2:25- merge foo_feature into master

It's definitely easy to get lost in git when you first learn it! Especially when following along with videos or tutorials, there's always a lot of going back and forth and moving pieces around. Hope you're able to find your way and keep moving forward!

Kristopher, I did some backtracking and was able to resolve my problem. at this point, I have melted my brain so I can't repeat the steps that I took lol. thanks for responding, i really appreciate the help!

Kristopher Van Sant
Kristopher Van Sant
Courses Plus Student 18,830 Points

Awesome! No probs :) Glad you were able to resolve your problem! And I totally understand, brain explosions are common for me when it comes to learning and understanding what's going on.