Add a New File

** Git & GitHub in Practice: Push, Pull & Heal (Part 1 of 3)
Lesson Content
0% Complete

Add a New File

  1. Inside VS Code, create a new file:
    • Example: hello.txt or notes.md
  2. Add some content:
Hello, this is my first GitHub project!
👉 What students learn:
  • How to make changes locally (Working Directory)

 

Major Git Commands

1) git status : Shows the current state of files (modified, staged, etc.)
2) git add .   :  Stages all files (new, modified, deleted) for commit
3) git branch -M main : Setup direction to the remote “main” branch (when branch is already defined)
4) git commit -m : “Added files” Commit staged changes with message
5) git push: Push commits to remote
or
git push origin main Push to the main branch

Course Outline