0

I cloned a repo from BitBucket.

For a specific file, in the BitBucket interface, it shows the last commit as 4/14/17. When I use git log, it says the most recent commit was from 2/1/27 (the previous commit). If I attempt to checkout the file, it won't get the 4/14 commit.

Any idea how to get these changes?

Update:

git show [missing-commit] will give me the commit details, so my local git does know it's there.

However, git log /path/to/file while on the branch will show all of the commits except the one that's missing.

Amy Codes
  • 138
  • 1
  • 8
  • Are you looking at different branches? – eftshift0 Apr 17 '17 at 19:49
  • Try run something like `git log --decorate --graph --oneline --all`, which will show all commits on all branches. Then you can decipher what's happening. – gilez Apr 17 '17 at 20:10
  • @edmundo, yes it's the same branch. – Amy Codes Apr 17 '17 at 20:28
  • 2
    Did you try checking out the _remote_ branch instead? – eftshift0 Apr 17 '17 at 20:30
  • @gilez The commit that shows on BitBucket does not appear in git log, even as part of the graph. The commit hasn't been deleted as it still shows in the server. The repo state that the BB Interface is displaying is not in sync with what local git is able to clone/fetch/check out. – Amy Codes Apr 17 '17 at 20:31
  • @AmyCodes do you perhaps need to run a `git remote update` locally, to get your local version in synch with the remote? – gilez Apr 17 '17 at 20:32
  • @gilez I tried that and no luck there. If I show the commit itself, my local git can get the details, but it doesn't show up as part of the branch log. I've updated my question with that. – Amy Codes Apr 17 '17 at 22:17
  • @AmyCodes It really sounds like your local branch is not tracking the correct remote, or not at all (so you're on the wrong branch really). Perhaps something in this will help: http://stackoverflow.com/questions/520650/make-an-existing-git-branch-track-a-remote-branch . Otherwise I'm out of ideas. – gilez Apr 18 '17 at 20:01

0 Answers0