4

So I made some changes to my file and now when I check my status it says :

   On branch master
Your branch and 'origin/master' have diverged,
and have 1 and 80 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean

So I try to pull and it says

error: unable to create file docs/com/teamname/tutortrader/C:\nppdf32Log\debuglog.txt (Invalid argument)

I've tried to git rm -f docs/com/teamname/tutortrader/C:\nppdf32Log\debuglog.txt but it just says that this file doesn't exist. I've also tried rm -f C:\nppdf32Log\debuglog.txt, but that doesn't exist either.

Mr Rubix
  • 1,492
  • 14
  • 27
Imran Ali
  • 104
  • 13
  • 2
    Looks like one of those 80 remote commits contains a file called "C:\nppdf32Log\debuglog.txt" in the directory "docs/com/teamname/tutortrader". If that's the case, you'll need to fix that before pulling. It may be easiest to get the person who committed that file to fix it. – Paul Hicks Mar 28 '16 at 21:42
  • 1
    @KeepCalmAndCarryOn Git status is the first thing on page, – Imran Ali Mar 28 '16 at 21:43
  • 1
    As Paul says -- your repo contains a file with a name that can't be created on Windows. Get a collaborator to fix it for you, or delete it from the repo through the web interface. – Charles Duffy Mar 28 '16 at 21:44
  • @PaulHicks Thanks, I thought the git rm -f would do the trick but guess not. That fixed the problem – Imran Ali Mar 28 '16 at 21:46
  • 2
    `git rm -f` would only work if that file existed in your *local* copy. It's not local, it's in the repo. – Charles Duffy Mar 28 '16 at 21:46

2 Answers2

5

Some kind person (presumably on Linux or Mac) has added a file to your repo called C:\nppdf32Log\debuglog.txt. This is an invalid filename on Windows. You need to get them to rename this file or you won't be able to clone this repo on Windows any more.

c.f. how do I clone files with colons in the filename

Community
  • 1
  • 1
Ewan Mellor
  • 6,747
  • 1
  • 24
  • 39
2

In the github interface with a file open, look at the top-right-hand side. You'll see buttons labeled "Raw", "Blame" and "History". To their right -- if you have write access to the repo -- there will also be a garbage can. Clicking on that will commit a change deleting that file from the repository.

Do so for the offending file, and you'll again be able to check this out on Windows.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441