Post

10 followers Follow
1
Avatar

Cannot tick the "stage" checkbox of modified files in the git pane

Hi RStudio team,
Many thanks for a fantastic IDE!
I have just started trying to use git with RStudio on 32-bit Windows and am not able to stage two very small files to be committed.
Previous posts suggested this was an issue with large projects, but the files I'm working with are only a few lines long.
How can I provide more useful information about this issue?
Cheers
David

Ian Pylvainen

20 comments

0
Avatar

David,

Are you still experiencing problems with this? From what we've seen, this is usually related to Windows sometimes being slower to fully index the project. I know you referenced this and I'm just curious if you are still seeing such slow responses. If so, then can you reproduce and export a network trace:

http://support.rstudio.org/help/kb/troubleshooting/how-to-export-a-network-request-log-from-rstudio

Josh

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

Hi,

I have the same problem and it's been going on for a while. I have 4 files. Two of them diff, stage, and commit just fine. The other two never say there's been any changes since I last did the diff (which was the first time) but there have been days worth of changes.

There an "M" icon by them on the right side of the status column (so I guess on some level it "knows" they've been modified?). However I can't tick the staged box and stage all doesn't help either.

Cheers

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

Jason,

Can you send a screenshot quick of what you're seeing? Also can you stage and un-stage these files using git from the command line?

Josh

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

Hi Josh,

I'm embarrassed to say that I haven't had time to learn how to use git on
the command line. I'm fresh out of a statistics grad program and it's my
first time working collaboratively.

I was on a Windows server so instead of the snipping tool it had some
recorder thingy from Microsoft that I used to produce the .mht file
attached. Should open with your browser.

Thanks,

Jason

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

Jason,

The screenshot didn't actually come through properly (I was using Chrome and not sure if that is a problem). Is there a way you can get a different format? Even if it is just a standard screen-capture and then copy to MS Paint and save as .png?

Josh

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

Sure. I recorded it on a server so instead of snipping tool Microsoft has
some fancier screenshot tool that makes that kind of file (it's combining
multiple screenshots). I'll follow up later today.

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

Dear Josh and all,
Apologies for not being very responsive - work is the curse of the thinking class :)

I'm attaching a zip of the directory containing the code in question, a logfile as requested, and a screenshot.

Interestingly, in creating the logfile, I had cause to edit .gitignore, and as the screenshot shows, I am able to select that for staging... curious :)

Hope that gives some useful clues.
David

Ian Pylvainen 0 votes
Comment actions Permalink
2
Avatar

I have the same problem ( using RStudio 0.97.551, Windows 7 64Bit, R3.0.1 64bit, Git 1.8.3.msysgit and Github 1.0.48.0).

I can ONLY stage files with an extension include in the .gitignore.
I can try to commit by pressing the 'Commit' button to take me to the commit dialogue, entering a commit message and then pressing 'Commit'. I get the following error..

On branch master

Changes not staged for commit:

(use "git add <file>..." to update what will be committed)

(use "git checkout -- <file>..." to discard changes in working directory)

#

modified: Scripts/Plotting/Plotting Mean Predicted Map.R

#
no changes added to commit (use "git add" and/or "git commit -a")

Ok, so if I go to Tools -> Shell then type git add . (the shell warned me I needed to include the '.' to stage everything) the file browser then refreshes and shows the changed file as staged. I can then go to the commit screen and commit the file with me message without any problems and then push this to my remote repo.

This seems to be an issue with RStudio not playing nice with git.exe. For some reason it won't issue the 'add' command and this includes if I run RStudio as an Administrator. (I ensured I pointed RStudio to the correct git.exe that is on my system path).

I am happy to provide further details.

Ian Pylvainen 2 votes
Comment actions Permalink
0
Avatar

Simon

Thanks for the suggestion. I have also been hit by the same problem, and it solved it for me.

Charles

Ian Pylvainen 0 votes
Comment actions Permalink
0
Avatar

I am experiencing the same issue (Rstudio 0.97.551, Windows XP 32 bit, R 3.0.1, Git 1.8.5.2.msysgit.0). Ian's proposed solution works, though it is a bit cumbersome. Has anybody found a permanent fix?

Jake Beaulieu 0 votes
Comment actions Permalink
1
Avatar

I have the same problem, but a little more information that might help narrow down the source. The symptom is that I can't check the box to stage (but can force staging from the Tools->Shell git command line). I don't think it's a large-project issue; though the project is large, my computer is on routinely and nothing has changed in weeks.

The interesting thing is that I could stage it one time (the first). It was created as a renamed version of another file in the git (so I could use this file as a skeleton). Upon creating the new file and saving it, I was able to stage it by clicking the stage checkbox (to add it to the git archive). After that, it registers all saved changes with an "M" icon, but I cannot click the "stage" checkbox again. I don't know if somehow creating the file from an existing git archive, or adding it to an exisiting git archive, caused the issue. I'm relatively new to git, but other files worked as well.

Also "ignored' the git.ignore file just to clean up the git window, if this is related.

Windows 7 64-bit, Rstudio 0.98.501; R 3.0.2; git 1.8.5.2.

Would be curious to hear any solutions (a writer thanks "Simon" for a solution but I don't see it).

Seth Wright 1 vote
Comment actions Permalink
0
Avatar

Has anything been resolved on this issue? I've just started working with github and RStudio. I cannot click the "staged" box. It knows I've made modifications but tells me I haven't made any when I try and commit.

Richard Feldman 0 votes
Comment actions Permalink
0
Avatar

What are the file names that you used?
I had a similar problem and realized that if there is a space in the file name the Rstudio git widget shows the file as modified, but doesn't allow you to stage it (whereas you can stage it using Git Bash or Git Gui). My fix was just to remove the space character in the file name and Rstudio allowed me to stage the file.
One quick note is that I noticed that Rstudio Git uses double quotes around the file name when there is a space within the file name. I suspect that somehow the double quotes prevent Git from find the file on the drive because it is looking for a file name with double quotes in it which doesn't physically exist.
Cheers,
Yoram

Yoram Gilboa 0 votes
Comment actions Permalink
0
Avatar

I have and have had the same problem for a long time. It seems to come and go randomly. For some reason I see a long list of responses by the OP below but not what he's responding to. What was the final solution? Apparently Simon had a workaround or something?

Jason Miller 0 votes
Comment actions Permalink
0
Avatar

Not an answer sadly but My files do have spaces but most are no longer in existence having been deleted. Did anyone identify the best way to deal with this?

Alan Couch 0 votes
Comment actions Permalink
0
Avatar

Hi Rstudio team, 

I have a similar issue on one of my rstudio server. Both servers where installed with the (apparently) same configuration.

juw@rstudio-opencpu:~$ sudo rstudio-server version
0.98.945
juw@rstudio-opencpu:~$ uname -a
Linux rstudio-opencpu 3.14-0.bpo.1-amd64 #1 SMP Debian 3.14.7-1~bpo70+1 (2014-06-21) x86_64 GNU/Linux

and

juw@rstudio:~$ sudo rstudio-server version
0.98.945
juw@rstudio:~$ uname -a
Linux rstudio 3.14-0.bpo.1-amd64 #1 SMP Debian 3.14.7-1~bpo70+1 (2014-06-21) x86_64 GNU/Linux

the instance "rstudio-opencpu" is problematic: I cannot check the stage box for deleted files. Running the git commit -a command through the shell works perfectly though.

I have tried to restart the server, but it did not solve the issue.

As you can see, there is no white space nor special character in the folder/file names.

What should we do?

Julie C Wojcicki 0 votes
Comment actions Permalink
0
Avatar

If there's a 0 byte index.lock file in your project .git folder, delete it.

(with heartfelt thanks to Darren O'Brien in the other thread)

Simone Grose 0 votes
Comment actions Permalink
0
Avatar

I fixed the problem by using GitHub desktop version. RStudio doesn't work no matter what I do.

 

Sili Fan 0 votes
Comment actions Permalink
0
Avatar

As Ian suggested in one of his posts, going to Tools -> Shell then typing: 

git add . 

worked for me. 

Philip Shirk 0 votes
Comment actions Permalink