2025/07/02
As I continue building projects, I've come to rely heavily on Git for version control. Learning the right commands helps me move faster and keep my codebase clean and organized. Here are some of the most essential Git commands I use regularly:
git init — Initializes a new Git repository in your project folder.
git status — Shows the current state of the working directory and staged changes.
git add . — Stages all changes for the next commit.
git commit -m "message" — Commits staged changes with a message.
git branch — Lists all branches in your repository.
git checkout -b branch_name — Creates and switches to a new branch.
git checkout branch_name — Switches to an existing branch.
git merge branch_name — Merges another branch into the current branch.
git pull — Fetches and merges changes from the remote repository.
git push — Uploads local commits to the remote repository.
These commands form the foundation of how I manage changes and collaboration across projects. Simple, effective, and reliable.