Skip to main content

Git Commands

Some of the top-used Git commands and good version control practices are:

Top Used Git Commands:

  1. git clone: Clone a repository into a new directory.
  2. git init: Initialize a new Git repository.
  3. git add: Add file contents to the index (staging area) for the next commit.
  4. git commit: Record changes to the repository.
  5. git push: Update remote refs along with associated objects.
  6. git pull: Fetch from and integrate with another repository or a local branch.
  7. git checkout: Switch branches or restore working tree files.
  8. git branch: List, create, or delete branches.
  9. git merge: Join two or more development histories together.
  10. git status: Show the working tree status.