How Do I Share My Code on GitHub?

Share
How Do I Share My Code on GitHub?

You built something with Claude, ChatGPT, Cursor, or Bolt. Someone wants to see the code. Or a tutorial told you to "push your project to GitHub." Or you just want a safe copy before you change something that is currently working. GitHub sits at the centre of almost everything in the vibe coding world — deployment platforms pull from it, collaborators use it, developers expect it. Here is how to actually put your code there, step by step, with no terminal required.

A Quick Warning Before You Upload Anything

Before your code goes anywhere public, check it for secrets.

Search your files for anything that looks like an API key, a password, or a token. If you see a line like api_key = "sk-abc123xyz" replace the real value with a placeholder like api_key = "YOUR_API_KEY_HERE" before uploading. Real credentials in public repositories get found and abused within minutes — there are automated bots scanning GitHub for them right now.

If you are not sure whether your code contains sensitive information, ask your AI: "Can you check this code for any API keys, passwords, or tokens I should remove before making it public?" Do this before step one.

Create a GitHub Account

Go to github.com and sign up for a free account. Use an email address you actually check. Pick a username you are comfortable sharing publicly since it appears in all your repository URLs.

GitHub's free tier is genuinely generous — unlimited public and private repositories, no time limit, no credit card required.

Create a New Repository

A repository is just a project folder on GitHub — the home for one specific project.

Once logged in, click the green New button on your dashboard or go to github.com/new.

Give your repository a name — something short and descriptive like my-sales-script or portfolio-app. No spaces, use hyphens instead.

Choose Public if you want anyone to see it, Private if you only want it visible to you. You can change this later.

Tick the box that says "Add a README file." Ignore the other options — .gitignore and license are not needed right now.

Click Create Repository.

Upload Your Code

Inside your new repository, click the Add file button and select Upload files.

Drag your project files from your computer directly into the upload area. If your project is a single .py script, drag just that file. If it is a folder with multiple files, drag the whole folder.

Add a short commit message in the box below — something like "first upload" or "initial version." This is just a label for this saved snapshot. A good rule of thumb for future commits: save whenever something works that did not work before.

Click Commit changes.

Your code is now on GitHub.

Find Your Repository URL

Your repository now has a public URL in this format:

https://github.com/yourusername/your-repository-name

This is what you share when someone asks to see your code. It is also what you connect to Vercel or Netlify when you want to deploy — both platforms pull your code directly from GitHub to run it.

If your repository is private, only people you explicitly invite can see it.

Keeping It Up to Date

Every time you make significant changes and want to save a new version, go back to your repository, click the pencil icon on individual files to edit them directly, or use Add file to upload new versions. Add a short commit message describing what changed and click Commit.

Each commit is a saved snapshot in your project's history. If something breaks after a change, you can see exactly what was different and when — and ask your AI to help you roll it back.

The One Thing to Remember

Getting your code on GitHub takes about five minutes and requires no technical knowledge beyond a free account and a browser. Check for credentials before you upload. Create a repository, drag your files in, commit. The URL you get is your code's permanent shareable address — and the same URL that powers deployment on every major hosting platform.


Ready to go beyond storing your code and actually run it? → Snapdock

New here? This might help: What is GitHub and do I actually need it? →