Git: Version Control For Test Engineers

February 27, 2023

As a QA Engineer, here are some of the most common Git commands that you may find useful:

  1. git clone: This command is used to make a copy of a remote repository on your local machine.
    Example: git clone https://github.com/username/repository.git

  2. git pull: This command is used to fetch and merge changes from the remote repository into your local repository.
    Example: git pull origin master

  3. git add: This command is used to add changes to the staging area before committing them to the repository.
    Example: git add filename.txt

  4. git commit: This command is used to save changes to the local repository with a descriptive message explaining the changes made.
    Example: git commit -m "Added new feature to the login page"

  5. git push: This command is used to push changes from your local repository to the remote repository.
    Example: git push origin master

  6. git status: This command is used to show the current status of the local repository, including any changes that have been made.

  7. git log: This command is used to view the commit history of the repository.

  8. git branch: This command is used to list, create, or delete branches.
    Example:

git branch
git branch new-branch
git branch -d old-branch
  1. git merge: This command is used to merge changes from one branch to another.
git checkout target-branch
git merge source-branch
  1. git diff: This command is used to view the differences between two versions of a file or between two branches.


git diff branch-1..branch-2

These are some of the most commonly used Git commands for QA Engineers. Learning these commands can help you work more efficiently with version control, collaborate more effectively with other developers, and troubleshoot issues that arise during the development process.


Profile picture

Written by Dmitry Yarygin Test Engineer and a Digital Nomad.
Follow me on Medium
Personal WebSite

© 2023 Dmitry Yarygin