Jul 16, 2024
git clone <repo-link> to duplicate a repo from GitHub to your local machine.git status to check the current state of your repository.git add <file-name> to stage changes.git commit -m <message> to save changes with a message.git push origin main to upload local changes to the GitHub repo.git add), commit changes (git commit), and push them to GitHub (git push).git branch to list branches.git checkout -b <branch-name> to create and switch to a new branch.git merge <branch> to merge a branch into the current one.git branch -d <branch> to delete a branch.git checkout -b feature-branch), make changes, and commit them.git merge feature-branch), resolving any conflicts.git push origin main).git reset <file> to unstage a file.git reset HEAD~1 to undo the latest commit.git reset --hard <commit-hash> to revert to a specific commit, discarding all subsequent changes.