MeltingDog
MeltingDog

Reputation: 15404

Can't get new files from git branch - 'Already up-to-date'

I'm new to git and am struggling with this.

I need to grab some files from a Github branch (not even sure if this is the right terminology).

I tried:

git pull someones-project/feature/branch-123

and

git merge someones-project/feature/branch-123

and got Already up-to-date for both.

But it's not up-to-date. I can see files on Github that are missing from my local.

Can anyone point me in the right direction here?

Upvotes: 2

Views: 2126

Answers (2)

user14502929
user14502929

Reputation: 1

From https://github.com/iradukundairenee/mybrand

  • branch ft-contact -> FETCH_HEAD Already up to date.

Upvotes: -2

VonC
VonC

Reputation: 1323065

As mentioned here:

The message “Already up-to-date” means that all the changes from the branch you’re trying to merge have already been merged to the branch you’re currently on

So your master branch appears to already have the commits from someones-project/feature/branch-123

git branch it tells me I am in the correct one (someones-project/feature/branch-123)

In that case, the local branch someones-project/feature/branch-123 is already updated, and any subsequent git pull or merge will always report "already up-to-date".

As Tim Biegeleisen comments, a git pull should be either:

git pull # pulls from origin the same branch you are on

Or:

git pull origin feature/branch-123 # pull the branch from the remote 
                                   # and merges it into the current branch

Upvotes: 3

Related Questions