Control Versions

Version control is a system that records changes to files over time, allowing you to manage the evolution of projects efficiently.

  1. Verify the status actually in your computer:

    git status
  2. Compares the changes between different versions of a file and the staging area:

    git diff {file}
  1. Displays a log of all commits made to the repository.

    git log
  1. Displays the changes made to a specific commit.

    git show {commit}
  2. Shows who made each change to a specific line in a file.

    git blame {file}
  3. Helps to find the exact confirmation where an error was entered.

    git bisect
  4. Change the active branch to the specified commit and update your working directory with the files of that version. ⚠Be careful!⚠ This command overwrites uncommitted changes.

    git checkout {hash}
  5. Displays a log of all commits made to the repository, including commits that are no longer referenced by any branch. This can be useful for recovering lost commits.

    git reflog