0

What do I have to do to get around this "already up-to-date" error:

I created a new local repo and tried to pull the remote master branch. It stumbled over my new .gitignore and errored out. I deleted the .gitignore (to be replaced with the repo's), but now I can't pull that branch.

User@BRD-09-DEC10 /c/path/to/local (master) $ git pull stage master [email protected] password: remote: Counting objects: 1211, done. remote: Compressing objects: 100% (1191/1191), done. remote: Total 1211 (delta 81), reused 0 (delta 0) Receiving objects: 100% (1211/1211), 83.05 MiB | 491 KiB/s, done. Resolving deltas: 100% (81/81), done. From ssh://website.com/path/to/repo * branch master -> FETCH_HEAD error: Untracked working tree file '.gitignore' would be overwritten by merge. User@BRD-09-DEC10 /c/path/to/local (master) $ ls -al total 5 drwxr-xr-x 4 User Administ 0 Jan 9 11:35 . drwxr-xr-x 17 User Administ 4096 Jan 9 11:32 .. drwxr-xr-x 7 User Administ 4096 Jan 9 11:38 .git -rw-r--r-- 1 User Administ 19 Jan 9 11:35 .gitignore drwxr-xr-x 3 User Administ 0 Jan 9 11:35 nbproject User@BRD-09-DEC10 /c/path/to/local (master) $ rm .gitignore User@BRD-09-DEC10 /c/path/to/local (master) $ git merge stage/master fatal: 'stage/master' does not point to a commit User@BRD-09-DEC10 /c/path/to/local (master) $ git pull stage master [email protected]'s password: From ssh://website.com/path/to/repo * branch master -> FETCH_HEAD Already up-to-date. 

I was hoping that I get this because the remote branch is already stored locally (it took a while to git the first time), but if that's the case, then I guess I don't know how to merge that branch.

This happens periodically - any idea why?

1 Answer 1

1

The pull seems to be successfull. Check with

git status 

If this is the case

git checkout -- .gitignore 

should bring the file back (the version from remote repository

Sign up to request clarification or add additional context in comments.

4 Comments

At no point were any files available in /c/path/to/local. This makes me think that the pull was not successful, no?
What is the output of git status?
#on branch master nothing to commit ..which may be odd because at that point I was on a brand new repo and had not yet made a commit
Do the output of git log (in your local branch) and git log stage/master differ? Is there any file still missing in your working copy?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.