Ngit pushes but does not create patch event.

I created this repository: https://gitworkshop.dev/r/naddr1qqxhxar9deekgetk94ekjar9qyxhwumn8ghj7mn0wvhxcmmvqgsthdwa5rs42euhnuz5xsrmmssr84hshwes7uj392vpeldj7z0zw3crqsqqqaueuju446

The commits are properly pushed to the git server (GitHub) but i do not see any new kind 1617 events being created.

And i've been getting the following output in my console:

```bash

git push

nostr: fetching...

✔ wss://nostr-pub.wellorder.net/ no new events

✔ wss://nos.lol/ no new events

✔ wss://relay.fountain.fm/ no new events

✘ wss://relay.nostr.band/ timeout

✘ wss://relay.snort.social/ timeout

✔ wss://relay.primal.net/ no new events

✔ wss://purplepag.es/ no new events

✔ wss://relay.stens.dev/ no new events

✔ wss://relay.damus.io/ no new events nostr: no updates

WARNING: git@github.com:ArjenStens/stensdev-site.git refs/heads/main is 0 ahead 1 behind nostr

To nostr://npub1hw6amg8p24ne08c9gdq8hhpqx0t0pwanpae9z25crn7m9uy7yarse465gr/stensdev-site

e22c0bf..463298b main -> main

```

This warning in particular has me a bit confused, it only started to appear after i re-initialized the repo (`ngit init`) to see if that was the issue: `WARNING: git@github.com:ArjenStens/stensdev-site.git refs/heads/main is 0 ahead 1 behind nostr`

I checked for events with the following query but got none(author = my npub):

```json

{

"ids": null,

"authors": [

"bbb5dda0e15567979f0543407bdc2033d6f0bbb30f72512a981cfdb2f09e2747"

],

"kinds": [

1617

],

"#e": null,

"#p": null,

"#a": null,

"since": 1726038000,

"until": 1726272000,

"limit": null

}

```

I feel like i might just be missing something?

Reply to this note

Please Login to reply.

Discussion

It does still work as expected on other repo's, i think my local state is somehow messed up.

Here you are pushing the main branch rather than a PR branch so instead of pushing a patch event it will push a state announcement event (30618).

The warning indicates that at the time (before your push) github was a commit behind the state on nostr. Maybe you force pushed the previous commit directly to github, or more likely their was some sort of error during your last push after it issued the updated state event but before the push to github competed.

Probably the lack of status updates during pushes made you think it was hanging so you exited early. I've added these in son they will be available in v1.5

If any project maintainers comes across this warning when doing a `git fetch`. The easiest thing to do is to add a other commit and push it. It will update the nostr state and the git server. Another way is to add the git server as a remote and push directly to that.

If the warning is `n ahead` it means that someone has pushes commits to the git server and not to nostr. To prevent you inadvertently overiting those commits and lose them forever you can't push conflicting commits. You'll need to add the git server as a remote, pull the commits, which commit you want to be the head and for push to the git served remote and the nostr remote.

That last point is I think what might have happened to me, I probably killed the process before a nostr commit happened and then made another commit. Interesting edge case...

You're right, I couldn't zoom out enough on the issue to see that (it was getting late hahah). Thank you for pointing that out!