Matthew
Matthew

Reputation: 11603

Unable to get latest on branch

I'm having an issue. I have switched to a branch some-feature. I do git pull origin some-feature and it says already up to date. I check a file I know has changed and the changes are not there. I check bit bitbucket and the changes are there.

I have tried git reset --hard HEAD followed by git clean --force and another pull but no luck. Why is git lying to me and what can I do to fix it?

Upvotes: 1

Views: 1030

Answers (1)

Aaron McDaid
Aaron McDaid

Reputation: 27123

Are you actually on the right branch?

git checkout some-feature

Otherwise, check git log origin/some-feature and make sure the commit you expected is at the top.

Finally, Are you sure that origin refers to bitbucket? Check the entry for bitbucket in .git/config

(Update: seems like the local branch some-feature wasn't set up to track origin/some-feature. See this answer for now to set up tracking.)

Upvotes: 2

Related Questions