memote icon indicating copy to clipboard operation
memote copied to clipboard

Memote Git error

Open parsanayyara opened this issue 3 months ago • 5 comments

Hello,

I am trying to generate a memote report over a local git commit of a model and ran across this issue when trying to run

memote report history --location .

image

Followed the flowchart on https://memote.readthedocs.io/en/latest/flowchart.html but the error keeps showing up everytime I ran memote report. Could anyone help point out what the issue might be?

parsanayyara avatar Apr 05 '24 00:04 parsanayyara

It seems like your git repository does not contain the deployment branch "gh-pages". You can create it yourself with:

git checkout -b gh-pages

Did you start the repository with memote new or manually (git init)?

  • If you started it with memote new and still have this issue, could you paste your memote.ini here? There might be a bug with properly using the deployment branch.
  • If you started it with git init you may need other preparations for the repository that memote new performs (like generating a memote.ini and setting up the branches.)

Of course, if you only need a snapshot report, try:

memote report snapshot /path/to/model

carrascomj avatar Apr 05 '24 08:04 carrascomj

Hello, I resolved the previous error, but now am getting a new one related to the cookiecutter. image image

It looks to me like it could not find the 'master' branch; might be because the recent Git update that changes master to main?

parsanayyara avatar Apr 05 '24 09:04 parsanayyara

Yes, that seems to be the problem, that must be fixed for it to work.

carrascomj avatar Apr 05 '24 11:04 carrascomj

Is there any possible way around it that doesn't require modifying the code? Would it work if I rename main to master maybe?

parsanayyara avatar Apr 10 '24 05:04 parsanayyara

Is there any possible way around it that doesn't require modifying the code? Would it work if I rename main to master maybe?

We should change the cookiecutter to accept both master and main branches. Renaming the branch at this point won't help. You would have to manually perform the missing steps from the post generation hook.

Midnighter avatar Apr 11 '24 10:04 Midnighter