Everyday GitHub Commands

They can be used in any local terminal. I use Cmder.

Navigate to the plugin folder

cd wp-content/plugins/my-first-plugin

Initialize Git specifically in this folder

git init

Add all plugin files to the index

git add .

Making the first commit

git commit -m "Initial commit"

Specify the default branch as main

git branch -M main

Link a local folder to a repository created on GitHub

git remote add origin https://github.com/...

Pushing code to GitHub

git push -u origin main
14 November 2026

Indie developer and entrepreneur