Git and GitHub in an IDE: From a Commit to a Pull Request

What a commit, a local repository and GitHub are. Add a test case to the team’s repository with IDE buttons: Clone, a new branch, Commit, Push, a Pull Request, review, Merge and Update Project.

About the product

Alex, QA Lead

Hi! Our team keeps test cases not in a spreadsheet but in a Git repository on GitHub, next to the code. That way you can see who changed what and when, and every change goes through review. Your task is to add a new test case: a sign-in lockout after three wrong passwords.

Quick reference

Git and GitHub

Git is a version control system on your computer: it keeps the history of file changes. GitHub is the team’s shared base: the remote repository (origin) that holds the version of the project for everyone, where Pull Requests and reviews happen.

Commit and local repository

A commit is a snapshot of changes with a description, the author, the time and a hash. It lands in the local repository on your computer first: teammates can’t see it until you push.

Branches in the IDE

The current branch name is in the top bar. Click it: New Branch… creates a branch (with Checkout branch ticked it switches to it right away), and choosing a branch and Checkout switches to an existing one.

Commit in the IDE

The Commit window lists changed files (they are blue). A tick next to a file is the staging area (git add): only ticked files get into the commit. Write the description in the Commit Message field and click Commit or Commit and Push….

Push and Update Project

Push (↗) sends the branch’s commits to GitHub; the IDE creates a new branch there by itself. Update Project (↙) downloads new commits from GitHub into the current branch, like git pull. Git doesn’t go online by itself.

Pull Request and review

A PR is a request to merge a branch into main. It shows the commits and the changes line by line (Files changed), runs automated checks (CI), and teammates approve or request changes. Fixes are new commits to the same branch.

IDE and terminal

Get from VCS = git clone, New Branch = git switch -c, a tick = git add, Commit = git commit, Push = git push, Update Project = git pull. The Git → Console tab shows which commands the IDE ran.