Gede Apriana

Fullstack & ML Developer

Gede Apriana

Fullstack & ML Developer

HomepageProjectsBlogsConnect
Administrator

A Beginner’s Guide to Git and GitHub

Date

April 02, 2025

Read Time

3 minutes

cover

Learn the fundamentals of Git, version control, and how to collaborate using GitHub.


Getting Started with Git

Git helps developers track code changes and collaborate effectively.

Why Use Git?

• Keeps track of code changes.

• Enables collaboration between developers.

• Allows rolling back to previous versions.

Basic Git Commands

1. Initialize a Repository: git init

2. Add Files to Staging Area: git add .

3. Commit Changes: git commit -m "Initial commit"

4. Push to GitHub:

• git remote add origin https://github.com/user/repo.git

• git push -u origin main

These commands allow you to set up a repository and push code to GitHub.