Skip to content

Git

  • Git is a distributed version control system.

Some Git Comments

  • git --version - Show the version of Git.
  • git init - Initialize a git repository.
  • git status - Show the status of the working directory.
  • git add filename - Add a file to the staging area.
  • git add . - Add all files to the staging area.
  • git commit -m "message" - Commit the changes to the repository.
  • git log - Show the commit history in detail and multiple lines.
  • git log --oneline - Show the commit history in one line.
  • git diff - Show the changes between the working directory and the staging area.
  • git reset --hard HEAD - Reset the working directory to the last commit.