0

I have branch named BDD-tests and have several commits on that branch. One of the other developers pushed their changes on remote repo (on github) which changed a lot of the UI.

Now, I need to bring in the changes in my local branch (BDD-tests) and see the changes on my local app.

So, I went to the terminal and ran git pull, which is suppose to fetch the changes from the remote repo and merge it with my local branch?

I refreshed the local app, but I don't see any changes on the front end.

I went to the terminal and did 'git checkout master' and refreshed the web page (local app) and the UI changes from the other developer was there.

Am I missing something here?

I also, followed the following posts but still getting the same issue: http://blog.mikepearce.net/2010/05/18/the-difference-between-git-pull-git-fetch-and-git-clone-and-git-rebase/

git pull from master into the development branch

I could perhaps switch to my local master and do a pull which would resolve the issue but I don't want to work on the local master (because it's always a good practice to branch out)

Community
  • 1
  • 1
vijay pujar
  • 1,683
  • 4
  • 19
  • 32
  • What was the output from running `git pull`? In particular, did it complain that `There is no tracking information for the current branch`? – torek Feb 13 '14 at 12:20
  • Since I already committed all my changes locally, I didn't get any errors or anything. It pulled all the files which I could see on the terminal. – vijay pujar Feb 13 '14 at 12:24
  • Is it anything to do with way the application is built locally? is it pointing to master (that shouldn't be the case right?). If I pull the changes from the remote repo, it should reflect on the front end – vijay pujar Feb 13 '14 at 12:26
  • There is nowhere near enough information in the question for me to guess. Someone who is familiar with whatever this "local app" is, your web setup, and so on would be in a better starting place. – torek Feb 13 '14 at 12:31
  • as far as you are concerned, if I'm working on a local branch and do a 'git pull', I should get all the changes from remote repo and it should be reflected on the web app. Is it a fair conclusion? – vijay pujar Feb 13 '14 at 13:32

2 Answers2

1

You don't see the changes on the local branch because they weren't merged in. Since git checkout master shows the changes, it is likely that the other developer committed the changes on master or a different branch that was merged into master. And the changes were not merged into the remote branch that is being tracked by your local.

On your local branch you need to do git merge master or git rebase master to get the changes on your local branch.

git pull updates your local branches with changes from the remote branch that it is tracking. Since you didn't get an error when you pulled changes, your branch is tracking some other branch than where the other developer pushed the changes.

git branch -vv will show your local branches with the remote branch that they are tracking.

Schleis
  • 41,516
  • 7
  • 68
  • 87
-2

git pull worked fine,all updated changes in origin/master got updated enter image description here