0

I've successfully implemented automatic file creation/update via Github V3 Rest API, however the only downside is that for each file I have a commit.

There is a possibility to do the same for multiple files, but unfortunately it involves some concepts I still haven't mastered and it will take me some time until I get there since I have more urgents stuff on my TODO list.

In the meanwhile, I can totally live with that or simply squash the last N commits, which I imagined should be relatively easy, since locally it's just a matter of

git reset --soft HEAD~N
git commit -m ".."

but I couldn't find anything on the docs or online

So my question is: how can I squash the last N commits, non interactively, using Github API?

Ps: I don't care if it's v3 or v4 as long as I get it done

E_net4
  • 27,810
  • 13
  • 101
  • 139
elect
  • 6,765
  • 10
  • 53
  • 119

1 Answers1

3

I did not see a squash feature directly through API.

You would need to:

Pretty convoluted, but it should work (entirely through script, without having to clone the repository).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250