GCP DevOps Project
Sprint 01
Task 2 Clone the repo and setup our Editor
In this lesson, we’ll walk through cloning your GitHub repository locally, configuring your editor, creating a simple README.md
, and pushing changes back to GitHub. By the end, you’ll have a live repository ready for your GCP DevOps workflow.
Prerequisites
Ensure you have the following tools installed:
Tool | Purpose | Installation Guide |
---|---|---|
Git | Version control and repository cloning | Install Git |
Visual Studio Code | Code editor with integrated terminal & extensions | Download VS Code |
Note
You can use any code editor of your choice, but this guide uses VS Code for its built-in terminal and Markdown preview features.
1. Clone the GitHub Repository
Open your terminal and navigate to your workspace directory, for example:
cd ~/Desktop mkdir gcp-project cd gcp-project
On your GitHub repository page, click Code, copy the HTTPS URL, then run:
git clone https://github.com/learnwithraghu/gcp-devops-project.git
If the repo is empty, you’ll see:
warning: You appear to have cloned an empty repository.
Note
An empty repo warning simply means no files are in the remote yet.
List the contents and enter the repository folder:
ls -lrt cd gcp-devops-project
2. Open the Project in VS Code
Launch VS Code in the current directory:
code .
You should see the VS Code welcome screen:
Since the project folder is empty, open an integrated terminal (Terminal → New Terminal) and create a new README.md
file:
touch README.md
In the Explorer panel, open README.md
and add:
### This is a repo for our new GCP DevOps project
To preview the Markdown, click the Open Preview icon in the top-right of the editor.
3. Stage, Commit, and Push Changes
In the integrated terminal, run:
git add README.md
git commit -m "Add README for GCP DevOps project"
Confirm you’re on the main branch:
git branch
Push your commit to GitHub:
git push origin main
You should see:
Everything up-to-date
4. Verify on GitHub
Refresh your repository page on GitHub. You’ll now see the README.md
with your heading:
Summary
- Cloned the empty GitHub repository to your local machine.
- Opened and initialized the project in VS Code.
- Created and previewed a Markdown file.
- Committed and pushed changes back to GitHub.
References
Watch Video
Watch video content