How to create empty commits to test CI & CD or anything else?

Sometimes we need to make empty commits on some testing branch so that we can trigger various kinds of things like Jenkins build etc. So, here the way to make an empty commit which will trigger a push event on GitHub/GitLab, etc. This is more convenient than adding spaces to your README.md file.

git commit --allow-empty -m "Trigger Jenkins Build"

Share this

Join

Search articles

Search titles, tags and article content.

    You've successfully subscribed to Developer Insider
    Your account is ready. Welcome to Developer Insider
    Welcome back! You've successfully signed in
    Success! Your account is fully activated, you now have access to all content.