git

git pull does not refresh local branch from remote

I tried to pull remote branch to my local machine, but it did not get updated locally. Tyring to resolve this issue.

$git pull origin

$git branch -a

I was on master branch locally.

$git diff membership_module origin/membership_module

The above shows that local branch is different than the remote branch.I was expecting no changes in local and remote branches after a pull.

$git pull origin membership_module:membership_module

Now it shows error as non-fast-forward

Git commands

The Three States

Git Directory

The .git directory is where Git stores the metadata and object database for the repository

Working Directory

A copy of one version of the git project, taken from compressed database in the .git directory

Staging Area/Index

Technology: