I think this isn't the right place to ask for this sort of help. Maybe stackoverflow instead?

What I'd do in this case is to rename the local dir holding the repository, then clone a new copy from Github. Assuming that works, compare all the files to make sure that you have all recent changes,
commit any that were missed, then throw away the damaged one.

Duncan Murdoch

On 05/07/2023 4:44 a.m., Chris Evans wrote:
I hope this is a legitimate question here.  I have a package of very
simple functions: https://github.com/cpsyctc/CECPfuns.  For the forseeable
future it's really only to stop me constantly having to rewrite
functions I use and it is only also used by probably two or three
colleagues who
also use R and are even less IT/programming/R competent than I am and
are very happy to use my functions.

I hadn't done any work on it for two years but came back to it yesterday
and added a function (getCIforQuantiles).  There were warnings about
things that are deprecated now in some of the older functions but
otherwise things seemed OK.  However, I got a pkgdown error and warning
after
pushing the updated package to github:

Annotations
1 error and 1 warning
pkgdown
Failed to get R 4.3.1: Failed to get R 4.3.1: Failed to download version
4.3.1: Error: Unexpected HTTP response: 404
r-lib/actions/setup-r@v1 is deprecated.
r-lib/actions/setup-r@v1 is deprecated. Please update your workflow to
use the 'v2' version. Also look at the examples at
https://github.com/r-lib/actions/tree/v2/examples because '@v2'
workflows are much simpler than 'v1' workflows.

So I tweaked
https://github.com/cpsyctc/CECPfuns/blob/main/.github/workflows/pkgdown.yaml
to change
     - uses: r-lib/actions/setup-r@v1
to
     - uses: r-lib/actions/setup-r@v2
rather optimistically hoping that might make the warning go away.

Today I did some work on the new function (trivial, correcting one
"!is.na(" to the correct "is.na(" !!!).  More importantly, I created the
test-getCIforQuantiles.R file for testthat to test the sanity checks and
add three simple output checks.

I built the source package locally, committed the changes and tried to
push the update to github (inside Rstudio) but I get:

  >>> /usr/bin/git push origin HEAD:refs/heads/main
To https://github.com/cpsyctc/CECPfuns.git
   ! [rejected]        HEAD -> main (fetch first)
error: failed to push some refs to 'https://github.com/cpsyctc/CECPfuns.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

OK.  So I try to pull thinking that made sense and that the change to
pkgdown.yaml on github that I made yesterday is the offending change.

However, when I pull (in Rstudio again) I get this:

  >>> /usr/bin/git pull
fatal: pack has 6 unresolved deltas
fatal: fetch-pack: invalid index-pack output

I have never felt on top of the complexities of git and github but I'm
clearly way out of my depth.  I am hoping someone here can see what
I need to do to get things back in synch and be able to get back to
developing the package.


______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to