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

Will Lam
Will Lam
7,027 Points

Git confusion: "Updates were rejected because the tip of your current branch is behind"

Hey guys,

Right now going through some stuff with One Month Rails' and facing an error where it says my "Updates were rejected because the tip of your current branch is behind".

https://www.evernote.com/shard/s51/sh/076ede95-bff8-4579-895e-d56b4d954ca7/8b4ebe394bddae1971bae0aa9bc4c9d4/deep/0/Nitrous.IO.png

I tried to git pull, but it says I have unmerged files

https://www.evernote.com/shard/s51/sh/076ede95-bff8-4579-895e-d56b4d954ca7/8b4ebe394bddae1971bae0aa9bc4c9d4/deep/0/Nitrous.IO.png

2 Answers

Patrick Cooney
Patrick Cooney
12,216 Points

stash your changes, pull down code, unstash changes, commit, push, boom. done.

Stefan Jansen
Stefan Jansen
8,974 Points

in your console just type git pull --ff-only.

This will fast-forward your local copy of the branch so it's the same as the remote.