jgellar / pcox

Penalized Cox regression models
1 stars 0 forks source link

git problems #6

Closed jgellar closed 10 years ago

jgellar commented 10 years ago

So this is a "me" issue, but I was hoping one of you could advise me what to do. I've been working on pcox out of RStudio since I started it, and have synced everything to github so that I can commit/push changes directly from RStudio. Today I was working on some code, when I noticed that the "git" tab in the upper-right "quadrant" of the workspace was gone. I went to Tools -> Version Control -> Project Setup, and under "Version control system", the only option listed in the drop-down menu is "(None)".

Do you know what does this mean that "git" is no longer available? More importantly, do you know how I can "reattach" git, and re-sync to this repo, without ruining the structure we've already got in place? I searched around a bit online and couldn't find anything helpful.

fabian-s commented 10 years ago

Can you open a shell, switch to your pcox directory and do git status? What does it say?

should look something like:

fabians@wap27:~$ cd fda/pcox
fabians@wap27:~/fda/pcox$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    lit/

nothing added to commit but untracked files present (use "git add" to track)

If that still works, it's just your git-GUI in RStudio that's broken, and you can just use git via the shell.

If you get fatal: Not a git repository, something/somebody most likely deleted the .git-folder in your pcox directory. What you could do then is

  1. check out the github repository to a new location
  2. copy your local pcox-files files into that new location
  3. commit/push the changes that git then shows you.

no guarantees though, I don't know git that well, be very careful!

jgellar commented 10 years ago

I got a similar message from git status, so I can use the shell. I'd rather get the GUI working though... it's really convenient. I'll look into it, thanks.