Skip to main content

Command Palette

Search for a command to run...

🚀 My Git & GitHub Learning Journey Today

Published
•1 min read•View as Markdown

Today, I focused on understanding and practicing the basics of Git and GitHub, essential tools for version control and collaboration in software development. I watched an amazing tutorial that walked me through key commands, and here’s a summary of what I learned:

🔹 Initialize a Git project: -git init

🔹 Add changes:

  • Add all changes: git add .

  • Add a single file: git add<filename>

Commit changes with a message: - git commit -m ‘‘ your message‘‘

Push changes to GitHub:

  • To the master branch: - git push origin master

  • To a new branch: -git push origin new-branch

pull changes from GitHub: git pull origin master/new-branch

🔹 Branching:

  • Create and switch to a new branch: git checkout -b <new_branch>

check project status: git status

View commit history: git log

Travel back to a specific commit: git checkout <commit hash>

💡 Key Takeaways:

  • Git helps track changes, collaborate effectively, and manage code versions.

  • GitHub provides a platform to host and share code repositories.

  • Knowing basic commands like init, add, commit, push, and pull makes working with Git much smoother.

🎉 I’m excited to keep practicing these commands and exploring advanced Git features!