octokit / rest.js

GitHub REST API client for JavaScript

Home Page:https://octokit.github.io/rest.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to create an empty commit?

jisaacks opened this issue · comments

I just want to create a commit using Octokit, add a commit message, and put this commit on a remote branch.

Basically I want to simulate this:

git checkout -b myBranch origin/myBranch
git commit --allow-empty -m "my commit message"
git push origin myBranch:myBranch

But obviously I want to keep my local working tree intact and not have to check out a branch locally.

Can this be done?

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀