Git Commands ---------------------------------- .. admonition:: Overview :class: Overview * **Time:** 20 min #. Learn how to use Git for version control. #. Understand basic Git commands. Git is a version control system that allows you to track changes in your code and collaborate with others. Here are some basic Git commands: .. list-table:: Basic Git Commands :header-rows: 1 * - Command - Description * - ``git init`` - Initialize a new Git repository. * - ``git add `` - Stage changes for commit. * - ``git commit -m "message"`` - Commit staged changes with a message. * - ``git status`` - Show the status of the working directory and staging area. * - ``git clone `` - Clone an existing repository. * - ``git push`` - Push changes to a remote repository. * - ``git pull`` - Fetch and merge changes from a remote repository. * - ``git branch`` - List, create, or delete branches. * - ``git checkout `` - Switch to a different branch. * - ``git log`` - Show the commit history of the repository. .. admonition:: Key Points :class: hint * Git is a powerful tool for version control and collaboration. * Always commit your changes with clear messages. * Use branches to work on features or fixes independently. * Regularly push your changes to a remote repository to keep your work backed up and share it with others.