Why I Finally Started Using GitHub for Deployment Instead of Local Files

 


After spending weeks pushing files manually to my VPS, I eventually realized something important:

The problem was not PowerShell.

The problem was my workflow.

As a non-coder learning through AI tools like Claude Code and Codex, my initial approach was simple:

  • Edit files locally
  • Upload them to VPS
  • Restart PM2
  • Refresh browser
  • Hope everything works

For small projects, this approach was surprisingly effective.

But as my applications became larger, with React frontends, Node.js backends, databases, and multiple services running together, I started facing problems that had nothing to do with coding.

The real challenge became managing files.

What Is a Deployment Pipeline?

When I first heard terms like CI/CD Pipeline or Deployment Pipeline, I thought they were concepts used only by large software companies.

In reality, a deployment pipeline is simply the path your code takes from development to production.

A very basic pipeline looks like this:

Developer writes code
↓
Code stored in GitHub
↓
Server pulls latest version
↓
Application builds
↓
Application restarts

That is it.

The goal is not complexity.

The goal is consistency.

The Problem With Local Files

When code exists only on your laptop, several problems appear quickly.

Imagine this situation:

  • You update three files.
  • Claude Code modifies two more.
  • Codex suggests another change.
  • You manually upload only some of them.
  • One file gets missed.

Now your VPS and local machine are no longer identical.

The server may be running code that does not exist on your laptop.

Or your laptop may contain code that never reached production.

At that point debugging becomes difficult.

You are no longer debugging code.

You are debugging file versions.

GitHub Became My Single Source of Truth

Once I started using GitHub properly, things became much simpler.

Instead of asking:

"Which version is on the server?"

I could simply check GitHub.

The repository became the official source of the project.

The workflow changed to:

Make changes
↓
Commit
↓
Push to GitHub
↓
Login to VPS
↓
git pull
↓
Build and restart

Now I always know exactly what version is running.

Why This Matters Even More With AI Coding Tools

One thing I discovered while using Claude Code and Codex is that both tools work much better when the project is stored in Git.

AI tools can:

  • Read project structure
  • Understand file history
  • Compare changes
  • Suggest commits
  • Generate pull requests
  • Review modifications

When files only exist locally, collaboration becomes harder.

When everything is stored in GitHub, both humans and AI tools can work from the same source.

Multiple Developers Can Work Simultaneously

Even though I mostly work alone, I finally understood why professional teams rely on Git.

Imagine:

Developer A works on authentication.

Developer B works on dashboard UI.

Developer C fixes backend APIs.

All of them can work simultaneously without overwriting each other's files.

GitHub keeps track of changes and combines them safely.

Without Git, this would quickly become chaotic.

The Biggest Benefit: Confidence

The biggest advantage was not speed.

The biggest advantage was confidence.

Earlier my deployment process looked like this:

Edit file
↓
Upload file
↓
Restart app
↓
Hope everything uploaded correctly

Now it looks like this:

Commit code
↓
Push to GitHub
↓
git pull on VPS
↓
Build
↓
Restart

The process feels predictable.

And predictable systems are easier to trust.

Do I Still Use Direct File Pushes?

Sometimes, yes.

For quick experiments or emergency fixes, directly pushing a single file can still be useful.

But for production applications, GitHub became my preferred workflow.

The larger the application becomes, the more valuable version control becomes.

What I Learned

At first, I thought GitHub was just a backup service.

Later I realized it is actually a communication system between:

  • Developers
  • AI coding tools
  • VPS servers
  • Production applications

Once I understood that, my deployments became simpler, more reliable, and much easier to manage.

And for someone learning software development through AI assistance rather than traditional programming, that was one of the most valuable lessons I learned.

Comments