DEV Community

Cover image for From Local VM to AWS: My Journey Mastering Git and Nginx
Daniel Inyang
Daniel Inyang

Posted on

From Local VM to AWS: My Journey Mastering Git and Nginx

In the world of DevOps, understanding the flow of code—from a developer’s keyboard to a live server—is the most critical skill you can have. This week, I took a hands-on approach to mastering this "code-to-cloud" journey.

Here is a breakdown of how I used Git, GitHub, and AWS to build a reliable development workflow.


1. Why Git is the Heart of Development

Before diving into the cloud, I started with the basics of Version Control. Git is more than just a "save" button; it’s a time machine for your code.

By practicing locally on a Virtual Machine (VM), I mastered the core essentials:

  • Initialization: Transforming a regular folder into a tracked repository.
  • The Staging Area: Learning to "bundle" specific changes before committing them.
  • Logging: Using git log to audit history and see exactly who changed what and when.

2. Safe Experimentation via Branching

One of my biggest "aha!" moments was working with branches. In a professional setting, you never want to experiment directly on the main (production) branch.

I practiced creating secondary branches to test new features. Once I was satisfied, I merged them back into the main branch. This process taught me:

  • How to keep the "production" code stable.
  • How to resolve merge conflicts when two branches have different ideas about the same line of code.

3. Taking it to the Cloud: AWS EC2 & Nginx

Once the code was versioned and ready, it was time to move it to the real world. I migrated my repository from my local VM to an AWS EC2 instance.

To make the website accessible to the public, I set up an Nginx web server. This involved:

  1. Installing Nginx on the Linux instance.
  2. Moving my website files into the /var/www/html directory.
  3. Configuring permissions so the server could "serve" the content to visitors.

The Verdict: Why This Matters

This exercise wasn't just about learning commands like git commit or sudo apt install nginx. It was about understanding the DevOps lifecycle.

By using Git, I ensured my work was safe and collaborative. By using AWS and Nginx, I learned how to make that work available to the world. Whether you are working alone or in a team of hundreds, these tools provide the structure needed to build and deploy software reliably.

What's next? I’m looking forward to automating this entire process so that every time I "push" my code, the server updates itself automatically!

Till next time, always stay positive 👍

P.S. This post is part of the DevOps Micro Internship (DMI) Cohort-2 by Pravin Mishra. You can start your DevOps journey by joining this
Discord community ( https://lnkd.in/e4wTfknn ).

Top comments (0)