![](https://msgtester.sk/wp-content/uploads/2022/10/job3.png)
Tosca tester
In this article, we provide an overview of the basic Git commands you need to know when working side-by-side with developers as an IT tester. They will enable you to work efficiently with the GIT repository, track code changes, and resolve conflicts. Git is a distributed version control system (DVCs) that is one of the best open-source tools for programmers. It enables project sharing and effective team collaboration. You can read more about what Git, GitHub, GitLab are in our last article. Although knowledge of Git is essential for developers and Automation Tester, manual testers often lack the knowledge to use it. That’s why we’re going to tell you more about Git commands now.
Before we get into using the individual commands, let’s explain the key terms associated with Git:
Repository type | Description |
Local repository | This repository is stored on your computer. All operations such as commit, branch creation and merge are performed locally. |
Remote repository | This repository is hosted on a server such as GitHub, GitLab or Bitbucket.
It is used to share your project with other team members and to back up your data. |
Git Flow is a way to organize and manage work on a project using Git. It is used to structure the work in a team, making it easier to manage different features, patches, and software releases. The main features of Git Flow are:
To get started with Git, the first step is to install it. Visit the official Git website at git-scm.com. On the main page you will find the option to download the installation file for your operating system (git download). The next step is to create an account on the repository server. You have various free options like github, gitlab, bitbucket, and so on. Each of these options has its own features, but they all support git. If you have your own account, you can already create your own repositories or clone existing ones, create branches, etc.
Now let’s look at a few basic commands:
If you want to work on an existing project, you can download (clone) it to your local computer. This command simply creates a copy of the remote repository on your local machine.
Git merge is used to merge changes from one branch into another, allowing integration of new features or bug fixes from different development lines. This process is crucial for updating the main development branch, resolving conflicts, ensuring continuous development, and managing of the repository history.
A Git commit is used to save the current changes in the working directory to the Git versioning system. Each commit creates a new record in the project history that captures the changes, their author, date, and description. In this way, commits allow you to keep a history of changes, document modifications, and track a project’s progress over time.
This command displays the commit history in the repository. You can get information about who made changes to the repository and when.
The git status command is used to display the current status of the repository. It provides an overview of which files are changed, which files are added to the staging area (ready to commit), and which files have not yet been tracked or are in a changed state. It also provides information about the current branch and whether there are any new updates in the repository from the remote repository.
The git stash command is used to temporarily store your current changed or untracked files in a “stash”. The main use of git stash is in situations where you have unfinished changes in a branch, but need to move on to another task or solve another problem. So instead of committing pending changes, it’s better to use git stash to temporarily save the changes.
Git rebase allows you to relocate or “move” a series of commits from one branch to another. For example, if you’re working on your own functionality on a branch and you want to add changes that have happened on the main branch in the meantime, you can use a rebase. Your changes are then placed above the changes from the main branch, making your change history nice and easy to read.
Here are some of the main features of git branch:
Git is a powerful tool that can make your work much more efficient, even if you’re a manual tester. Knowing the basics will allow you to better collaborate with developers and automation testers, leading to better software quality and a more efficient testing process. Don’t be afraid to experiment and learn new things – Git is the tool that lets you do that without worrying about losing your job or making changes. I wish you the best of luck with Git!
If you speak German and are IT tester or Automation Tester, take a look at our employee benefits and respond to job offers.