Skip to contentমূল লেখায় যান

Topic 02 · DevOps & Cloudটপিক 02 · DevOps & Cloud

Git Basics

Your test code, your test plans, and your team's pipeline files live in Git. To test a branch, read what a change did, or name the exact version that has a bug, you need a few Git ideas and a short list of commands. This page gives you both, and a practice run on your own laptop.

10 min read10 মিনিটে পড়া যায় · 7 sections7টি সেকশন · 17 sources17টি সোর্স · updated Nov 2026আপডেট: Nov 2026

Branches, merges and a conflictব্রাঞ্চ, মার্জ আর একটা কনফ্লিক্ট

Watch a branch pointer move, a merge happen and a conflict stop it.একটা ব্রাঞ্চ pointer সরতে দেখুন, মার্জ হতে দেখুন, আর কনফ্লিক্টে তা থেমে যেতে দেখুন।

3 min3 মিনিট8 steps8টি ধাপ
  • Parents of main tipmain-এর মাথার parent1
your laptop · localআপনার ল্যাপটপ · লোকালeach commit moves mainপ্রতি commit-এ main সরেC1C1C2C2originoriginremoteরিমোটHEAD → mainHEAD → mainrun: git commitrun: git commit

You’ll learnআপনি শিখবেন

  • A branch is a pointer that movesব্রাঞ্চ হলো সরে যাওয়া একটা pointer✓
  • What HEAD showsHEAD কী দেখায়
  • Fast-forward or merge commitFast-forward না merge commit
  • Why a conflict pauses a mergeকেন কনফ্লিক্টে মার্জ থামে
  • Why a push is rejectedকেন push reject হয়

What it is

The major difference between Git and any other version control system (VCS) is the way that Git thinks about its data Source 1সোর্স 1. It thinks of its data as a series of snapshots of a miniature filesystem: each time you commit, Git takes a picture of what all your files look like at that moment Source 1সোর্স 1. A merge joins two or more development histories together Source 2সোর্স 2.

Nearly every operation is local. Most operations need only local files and resources, and the entire history of the project is on your local disk Source 1সোর্স 1.

Everything is checksummed. Git refers to each stored item by its checksum, a SHA-1 hash: a 40-character string of hexadecimal characters Source 1সোর্স 1.

A file in a Git project is in one of three states Source 1সোর্স 1:

StateMeaning
ModifiedYou changed the file, but you have not committed it yet
StagedYou marked the modified file to go into your next commit
CommittedThe data is safely stored in your local database

The three states match the three sections of a Git project Source 1সোর্স 1:

  • The working tree is a single checkout of one version of the project. Its files are placed on disk for you to use or modify Source 1সোর্স 1.
  • The staging area is a file, generally in your Git directory, that stores information about what will go into your next commit. Its technical name is the index Source 1সোর্স 1.
  • The Git directory is where Git stores the metadata and object database of your project. It is what is copied when you clone a repository Source 1সোর্স 1.

git add stages files Source 4সোর্স 4. A commit takes the files as they are in the staging area, and stores that snapshot permanently in the Git directory Source 1সোর্স 1. In a repository that git init made, the Git directory is a subdirectory named .git Source 16সোর্স 16:

working tree  ---- git add ---->  staging area  ---- git commit ---->  Git directory (.git)
 (modified)                        (staged)                             (committed)

On GitHub, a pull request is a proposal to merge code changes into a project, so that people can discuss and review the changes before they are merged Source 13সোর্স 13.

সহজ English

Git is different from other version control systems in how it thinks about its data Source 1সোর্স 1. It keeps your project as a series of snapshots. Each time you commit, Git takes a picture of what all your files look like at that moment Source 1সোর্স 1. A merge joins two or more lines of work together Source 2সোর্স 2.

Most work happens on your computer. Most Git commands need only local files, and the whole history of the project is on your disk Source 1সোর্স 1.

Each item has a checksum. Git names each stored item by a SHA-1 hash: a string of 40 hexadecimal characters Source 1সোর্স 1.

A file in Git is in one of three states Source 1সোর্স 1:

StateMeaning
ModifiedYou changed the file, but you did not commit it yet
StagedYou marked the change to go into your next commit
CommittedThe change is safely saved in your local database

The three states match three parts of a Git project Source 1সোর্স 1:

  • The working tree is one version of the project, taken out for you. Its files are on your disk to use or change Source 1সোর্স 1.
  • The staging area is a file, usually in your Git directory. It stores what will go into your next commit. Its technical name is the index Source 1সোর্স 1.
  • The Git directory is where Git keeps the metadata and the object database of your project. It is what gets copied when you clone a repository Source 1সোর্স 1.

git add stages files Source 4সোর্স 4. A commit takes the files as they are in the staging area, and saves that snapshot for good in the Git directory Source 1সোর্স 1. When you make a repository with git init, the Git directory is a folder named .git Source 16সোর্স 16:

working tree  ---- git add ---->  staging area  ---- git commit ---->  Git directory (.git)
 (modified)                        (staged)                             (committed)

On GitHub, a pull request asks to merge code changes into a project. People can discuss and review the changes before the merge Source 13সোর্স 13.

বাংলা ব্যাখ্যা

Git আর অন্য যেকোনো version control system (VCS)-এর প্রধান পার্থক্য হলো Git তার data-কে কীভাবে দেখে Source 1সোর্স 1। Git data-কে একটা ছোট filesystem-এর ধারাবাহিক snapshot হিসেবে দেখে: প্রতিবার commit করলে Git সেই মুহূর্তে আপনার সব ফাইল দেখতে কেমন, তার একটা ছবি তোলে Source 1সোর্স 1। merge দুই বা তার বেশি development history-কে এক করে Source 2সোর্স 2।

প্রায় সব কাজ local। বেশিরভাগ কাজে শুধু local ফাইল আর resource লাগে, আর project-এর পুরো history আপনার local disk-এই থাকে Source 1সোর্স 1।

সবকিছুর checksum থাকে। Git প্রতিটা জমানো জিনিসকে তার checksum দিয়ে চেনে, একটা SHA-1 hash: hexadecimal অক্ষরের ৪০ অক্ষরের একটা string Source 1সোর্স 1।

Git project-এর একটা ফাইল তিনটা state-এর একটায় থাকে Source 1সোর্স 1:

Stateমানে
Modifiedআপনি ফাইল বদলেছেন, কিন্তু এখনো commit করেননি
Stagedবদলানো ফাইলটা পরের commit-এ যাওয়ার জন্য চিহ্নিত করেছেন
Committeddata আপনার local database-এ নিরাপদে রাখা আছে

তিনটা state-এর সাথে Git project-এর তিনটা অংশ মেলে Source 1সোর্স 1:

  • working tree হলো project-এর একটা version-এর একটা checkout। এর ফাইলগুলো disk-এ রাখা হয়, যাতে আপনি ব্যবহার বা বদল করতে পারেন Source 1সোর্স 1।
  • staging area হলো একটা ফাইল, সাধারণত আপনার Git directory-র ভেতরে, যেটা পরের commit-এ কী যাবে সেই তথ্য রাখে। এর technical নাম index Source 1সোর্স 1।
  • Git directory হলো যেখানে Git আপনার project-এর metadata আর object database রাখে। কোনো repository clone করলে এটাই copy হয় Source 1সোর্স 1।

git add ফাইল stage করে Source 4সোর্স 4। commit staging area-য় ফাইলগুলো যেমন আছে তেমন নিয়ে সেই snapshot স্থায়ীভাবে Git directory-তে রাখে Source 1সোর্স 1। git init দিয়ে বানানো repository-তে Git directory হলো .git নামের একটা subdirectory Source 16সোর্স 16:

working tree  ---- git add ---->  staging area  ---- git commit ---->  Git directory (.git)
 (modified)                        (staged)                             (committed)

GitHub-এ pull request হলো একটা project-এ code change merge করার প্রস্তাব, যাতে merge-এর আগে মানুষ change-গুলো নিয়ে আলোচনা আর review করতে পারে Source 13সোর্স 13।

How it works

Branches. A branch in Git is a lightweight movable pointer to a commit Source 5সোর্স 5. The default branch name in Git is master, and every time you commit, the branch pointer moves forward automatically Source 5সোর্স 5. The init.defaultBranch setting changes the name for new repositories, and Git 3.0 will change the default to main Source 17সোর্স 17. A special pointer called HEAD points to the local branch you are currently on Source 5সোর্স 5.

Switching. git switch <branch> switches to a branch: the working tree and the index are updated to match it, and new commits are added to its tip Source 9সোর্স 9. git switch -c <new-branch> creates a new branch, then switches to it Source 9সোর্স 9.

Merging. There are two kinds of merge Source 6সোর্স 6:

  • Fast-forward. If the commit that you merge is directly ahead of the commit you are on, there is no divergent work. Git just moves the pointer forward.
  • Three-way merge. If the branches diverged, Git uses the two branch tips and their common ancestor. It creates a new merge commit, which has more than one parent.

Conflicts. If you changed the same part of the same file differently in the two branches, Git cannot merge them cleanly Source 6সোর্স 6. It pauses the merge and adds conflict-resolution markers to the file Source 6সোর্স 6. The part above ======= is the version in HEAD, and the part below it is the version of the other branch Source 6সোর্স 6. You resolve it, run git add on each file to mark it as resolved, then run git commit Source 6সোর্স 6.

Remotes. A remote repository is a version of your project that is hosted on the Internet or a network Source 7সোর্স 7. origin is the default name that Git gives to the server you cloned from Source 7সোর্স 7.

your laptop                               the server: the remote "origin"
local repository  <-- git fetch / git pull --  remote repository
local repository  --------- git push -------->  remote repository

সহজ English

Branches. A branch is a light pointer to a commit, and it can move Source 5সোর্স 5. Git's default branch name is master. Each time you commit, the branch pointer moves forward by itself Source 5সোর্স 5. The init.defaultBranch setting changes the name for new repositories, and Git 3.0 will change the default to main Source 17সোর্স 17. A special pointer called HEAD shows which branch you are on Source 5সোর্স 5.

Switching. git switch <branch> moves you to a branch. Your files change to match that branch, and new commits go on top of it Source 9সোর্স 9. git switch -c <new-branch> makes a new branch and moves you to it Source 9সোর্স 9.

Merging. A merge happens in one of two ways Source 6সোর্স 6:

  • Fast-forward. If the commit that you merge is directly ahead of the commit you are on, no work went two ways. Git just moves your pointer forward.
  • Three-way merge. If both branches have new work, Git compares the two branch tips with the commit where they split. It makes a new merge commit with more than one parent.

Conflicts. If both branches changed the same part of the same file in different ways, Git cannot merge them cleanly Source 6সোর্স 6. It stops and puts markers in the file Source 6সোর্স 6. Above ======= is the version in HEAD. Below it is the other branch's version Source 6সোর্স 6. You fix the text, run git add on the file, and then run git commit Source 6সোর্স 6.

Remotes. A remote is a version of your project on the Internet or a network Source 7সোর্স 7. origin is the default name that Git gives to the server you cloned from Source 7সোর্স 7.

your laptop                               the server: the remote "origin"
local repository  <-- git fetch / git pull --  remote repository
local repository  --------- git push -------->  remote repository

বাংলা ব্যাখ্যা

Branch। Git-এ branch হলো একটা commit-এর দিকে নির্দেশ করা একটা হালকা, সরানো যায় এমন pointer Source 5সোর্স 5। Git-এ default branch-এর নাম master, আর প্রতিবার commit করলে branch pointer নিজে নিজেই সামনে এগোয় Source 5সোর্স 5। init.defaultBranch সেটিং নতুন repository-র নাম বদলায়, আর Git 3.0 default বদলে main করবে Source 17সোর্স 17। HEAD নামের একটা বিশেষ pointer দেখায় আপনি এখন কোন local branch-এ আছেন Source 5সোর্স 5।

Switch করা। git switch <branch> একটা branch-এ নিয়ে যায়: working tree আর index সেই branch-এর মতো হয়ে যায়, আর নতুন commit সেই branch-এর মাথায় যোগ হয় Source 9সোর্স 9। git switch -c <new-branch> একটা নতুন branch বানায়, তারপর সেখানে যায় Source 9সোর্স 9।

Merge। merge দুই রকম Source 6সোর্স 6:

  • Fast-forward। আপনি যে commit merge করছেন সেটা যদি আপনার এখনকার commit-এর ঠিক সামনে থাকে, তাহলে আলাদা হয়ে যাওয়া কোনো কাজ নেই। Git শুধু pointer সামনে সরিয়ে দেয়।
  • Three-way merge। branch দুটো আলাদা হয়ে গেলে Git দুটো branch-এর মাথা আর তাদের common ancestor ব্যবহার করে। এটা একটা নতুন merge commit বানায়, যার একাধিক parent থাকে।

Conflict। দুই branch-এ একই ফাইলের একই অংশ আলাদাভাবে বদলালে Git পরিষ্কারভাবে merge করতে পারে না Source 6সোর্স 6। এটা merge থামিয়ে দেয় আর ফাইলে conflict-resolution marker বসায় Source 6সোর্স 6। =======-এর ওপরের অংশ HEAD-এর version, আর নিচের অংশ অন্য branch-এর version Source 6সোর্স 6। আপনি সমাধান করেন, প্রতিটা ফাইলে git add চালিয়ে resolved চিহ্নিত করেন, তারপর git commit চালান Source 6সোর্স 6।

Remote। remote repository হলো Internet বা network-এ রাখা আপনার project-এর একটা version Source 7সোর্স 7। যে server থেকে clone করেছেন, Git তার default নাম দেয় origin Source 7সোর্স 7।

your laptop                               the server: the remote "origin"
local repository  <-- git fetch / git pull --  remote repository
local repository  --------- git push -------->  remote repository
  • git fetch শুধু data download করে। এটা আপনার কাজের সাথে merge করে না, আর আপনি যা নিয়ে কাজ করছেন তা বদলায় না Source 7সোর্স 7।
  • git pull প্রথমে git fetch চালায়, তারপর remote branch-কে আপনার current branch-এ যোগ করে Source 10সোর্স 10।
  • git push <remote> <branch> আপনার কাজ share করে Source 7সোর্স 7। আপনার আগে কেউ push করে থাকলে আপনার push reject হয়: আগে তাদের কাজ fetch করে নিজের কাজে মেলাতে হয় Source 7সোর্স 7।

Try it

This practice run makes a small repository, a branch, and a merge conflict on purpose. Use an empty folder.

1. Tell Git who you are. Do this once. Every commit uses this information Source 3সোর্স 3:

git config --global user.name "Your Name"
git config --global user.email you@example.com

2. Start a repository and commit a file. You obtain a Git repository in one of two ways: turn a local directory into one, or clone an existing one Source 16সোর্স 16. Here you do the first. git init -b main starts a repository whose first branch is main Source 15সোর্স 15. Create checklist.txt with one line, Login: a valid user can sign in. Then check the state, stage the file, and commit it Source 4সোর্স 4. git log --oneline shows each commit on one line, with the first few characters of its hash Source 8সোর্স 8.

git init -b main
git status
git add checklist.txt
git commit -m "Add the login checklist"
git log --oneline

3. Change the same line on two branches. git switch -c creates a branch and switches to it, and git switch <branch> switches back Source 9সোর্স 9. git commit -a stages every file that is already tracked, then commits Source 4সোর্স 4.

git switch -c fix-checklist
# edit the line to: Login: a valid user can sign in with email
git commit -a -m "Say how the user signs in"
git switch main
# edit the line to: Login: a valid user can sign in and sign out
git commit -a -m "Add sign out"

4. Merge, and see the conflict. Git stops with "Automatic merge failed; fix conflicts and then commit the result", and git status lists the unmerged file Source 6সোর্স 6.

git merge fix-checklist
git status

The file now has the markers Source 6সোর্স 6:

<<<<<<< HEAD
Login: a valid user can sign in and sign out
=======
Login: a valid user can sign in with email
>>>>>>> fix-checklist

5. Resolve it. Edit the file to the text that you want, and remove the <<<<<<<, =======, and >>>>>>> lines. Then mark it as resolved and finish the merge commit Source 6সোর্স 6. --graph draws the branch and merge history Source 8সোর্স 8.

git add checklist.txt
git commit
git log --oneline --graph

6. Put it on GitHub. Create an empty repository on GitHub, with no README, license, or gitignore file, to avoid errors Source 15সোর্স 15. Copy its URL, then add the remote, check it, and push Source 15সোর্স 15:

git remote add origin REMOTE-URL
git remote -v
git push -u origin main

সহজ English

In this practice run you make a small repository, a branch, and a merge conflict on purpose. Use an empty folder.

1. Tell Git who you are. You do this once. Every commit uses this information Source 3সোর্স 3:

git config --global user.name "Your Name"
git config --global user.email you@example.com

2. Start a repository and commit a file. You get a Git repository in one of two ways: turn a folder into one, or clone one that already exists Source 16সোর্স 16. Here you do the first. git init -b main starts a repository with a first branch called main Source 15সোর্স 15. Make a file checklist.txt with one line: Login: a valid user can sign in. Then look at the state, stage the file, and commit it Source 4সোর্স 4. git log --oneline shows each commit on one line, with the start of its hash Source 8সোর্স 8.

git init -b main
git status
git add checklist.txt
git commit -m "Add the login checklist"
git log --oneline

3. Change the same line on two branches. git switch -c makes a branch and moves you to it. git switch <branch> moves you back Source 9সোর্স 9. git commit -a stages every file that Git already tracks, then commits Source 4সোর্স 4.

git switch -c fix-checklist
# edit the line to: Login: a valid user can sign in with email
git commit -a -m "Say how the user signs in"
git switch main
# edit the line to: Login: a valid user can sign in and sign out
git commit -a -m "Add sign out"

4. Merge, and see the conflict. Git stops with "Automatic merge failed; fix conflicts and then commit the result". git status lists the file that is not merged Source 6সোর্স 6.

git merge fix-checklist
git status

The file now has markers Source 6সোর্স 6:

<<<<<<< HEAD
Login: a valid user can sign in and sign out
=======
Login: a valid user can sign in with email
>>>>>>> fix-checklist

5. Fix it. Change the file to the text that you want, and delete the <<<<<<<, =======, and >>>>>>> lines. Then mark it as fixed and finish the merge commit Source 6সোর্স 6. --graph draws the branches and the merge Source 8সোর্স 8.

git add checklist.txt
git commit
git log --oneline --graph

6. Put it on GitHub. Make an empty repository on GitHub. Do not add a README, license, or gitignore file, to avoid errors Source 15সোর্স 15. Copy its URL. Then add the remote, check it, and push Source 15সোর্স 15:

git remote add origin REMOTE-URL
git remote -v
git push -u origin main

বাংলা ব্যাখ্যা

এই practice-এ আপনি একটা ছোট repository, একটা branch আর ইচ্ছা করে একটা merge conflict বানাবেন। একটা খালি ফোল্ডার ব্যবহার করুন।

১. Git-কে আপনার পরিচয় দিন। এটা একবারই করতে হয়। প্রতিটা commit এই তথ্য ব্যবহার করে Source 3সোর্স 3:

git config --global user.name "Your Name"
git config --global user.email you@example.com

২. repository শুরু করে একটা ফাইল commit করুন। Git repository দুইভাবে পাওয়া যায়: একটা local directory-কে repository বানিয়ে, অথবা আগে থেকে থাকা একটা repository clone করে Source 16সোর্স 16। এখানে আপনি প্রথমটা করবেন। git init -b main এমন একটা repository শুরু করে, যার প্রথম branch main Source 15সোর্স 15। checklist.txt নামে একটা ফাইল বানান, তাতে এক লাইন লিখুন: Login: a valid user can sign in। তারপর state দেখুন, ফাইলটা stage করুন আর commit করুন Source 4সোর্স 4। git log --oneline প্রতিটা commit এক লাইনে দেখায়, hash-এর প্রথম কয়েকটা অক্ষরসহ Source 8সোর্স 8।

git init -b main
git status
git add checklist.txt
git commit -m "Add the login checklist"
git log --oneline

৩. দুই branch-এ একই লাইন বদলান। git switch -c একটা branch বানিয়ে সেখানে নিয়ে যায়, আর git switch <branch> আবার ফিরিয়ে আনে Source 9সোর্স 9। git commit -a আগে থেকে track হওয়া সব ফাইল stage করে, তারপর commit করে Source 4সোর্স 4।

git switch -c fix-checklist
# edit the line to: Login: a valid user can sign in with email
git commit -a -m "Say how the user signs in"
git switch main
# edit the line to: Login: a valid user can sign in and sign out
git commit -a -m "Add sign out"

৪. merge করুন, conflict দেখুন। Git "Automatic merge failed; fix conflicts and then commit the result" বলে থেমে যায়, আর git status merge না হওয়া ফাইলটা দেখায় Source 6সোর্স 6।

git merge fix-checklist
git status

ফাইলে এখন marker আছে Source 6সোর্স 6:

<<<<<<< HEAD
Login: a valid user can sign in and sign out
=======
Login: a valid user can sign in with email
>>>>>>> fix-checklist

৫. সমাধান করুন। ফাইলটা আপনার পছন্দের লেখায় বদলান, আর <<<<<<<, ======= ও >>>>>>> লাইনগুলো মুছে দিন। তারপর resolved চিহ্নিত করে merge commit শেষ করুন Source 6সোর্স 6। --graph branch আর merge-এর history আঁকে Source 8সোর্স 8।

git add checklist.txt
git commit
git log --oneline --graph

৬. GitHub-এ রাখুন। GitHub-এ একটা খালি repository বানান, README, license বা gitignore ফাইল ছাড়া, যাতে error না হয় Source 15সোর্স 15। এর URL কপি করুন, তারপর remote যোগ করুন, যাচাই করুন আর push করুন Source 15সোর্স 15:

git remote add origin REMOTE-URL
git remote -v
git push -u origin main

How a tester uses it

Test a pull request on your machine. Anyone can work with an open pull request to continue working on it or to test it Source 14সোর্স 14. Find its ID number, the digits after its title Source 14সোর্স 14. Then fetch it into a new local branch and switch to it Source 14সোর্স 14, and run your tests:

git fetch origin pull/ID/head:BRANCH_NAME
git switch BRANCH_NAME

Read what changed. A pull request has tabs: Commits shows how the branch changed over time, Checks shows the automated tests, builds, and other validations, and Files changed shows the diff Source 13সোর্স 13. On your machine, git log -p shows the patch of each commit, and git log --stat lists the changed files and the number of added and removed lines Source 8সোর্স 8. git diff shows what you changed but did not stage yet, and git diff --staged shows what goes into your next commit Source 4সোর্স 4.

Name the exact version. git log lists each commit with its SHA-1 checksum Source 8সোর্স 8. Put it, or the short form that git log --oneline shows, in the bug report Source 8সোর্স 8. A branch name does not say exactly what you tested, because the branch pointer moves forward with every commit Source 5সোর্স 5.

Keep test output out of the repository. A .gitignore file lists patterns of intentionally untracked files that Git should ignore Source 12সোর্স 12. They are usually generated files, such as log files or files that your build produces Source 4সোর্স 4. The tutorial's advice: list test reports, screenshots, and videos in .gitignore too.

সহজ English

Test a pull request on your computer. Anyone can work with an open pull request, for example to test it Source 14সোর্স 14. Find its ID number: the digits after its title Source 14সোর্স 14. Then fetch it into a new branch on your computer and switch to it Source 14সোর্স 14, and run your tests:

git fetch origin pull/ID/head:BRANCH_NAME
git switch BRANCH_NAME

See what changed. A pull request has tabs. Commits shows how the branch changed. Checks shows the automated tests and builds. Files changed shows the diff Source 13সোর্স 13. On your computer, git log -p shows the changes of each commit. git log --stat lists the changed files and how many lines were added and removed Source 8সোর্স 8. git diff shows your changes that are not staged yet. git diff --staged shows what goes into your next commit Source 4সোর্স 4.

Name the exact version. git log lists each commit with its SHA-1 checksum Source 8সোর্স 8. Write it, or the short form from git log --oneline, in your bug report Source 8সোর্স 8. A branch name does not say exactly what you tested, because the branch pointer moves with every commit Source 5সোর্স 5.

Keep test output out of the repository. A .gitignore file lists patterns of files that Git should ignore Source 12সোর্স 12. These are usually generated files, such as log files or files that your build makes Source 4সোর্স 4. The tutorial's advice: list test reports, screenshots, and videos in .gitignore too.

বাংলা ব্যাখ্যা

নিজের computer-এ একটা pull request test করুন। যে কেউ একটা খোলা pull request নিয়ে কাজ চালিয়ে যেতে বা সেটা test করতে পারে Source 14সোর্স 14। এর ID নম্বর খুঁজুন, title-এর পরের সংখ্যাগুলো Source 14সোর্স 14। তারপর এটাকে একটা নতুন local branch-এ fetch করুন আর সেখানে switch করুন Source 14সোর্স 14, তারপর আপনার test চালান:

git fetch origin pull/ID/head:BRANCH_NAME
git switch BRANCH_NAME

কী বদলেছে পড়ুন। pull request-এ কয়েকটা tab আছে: Commits দেখায় branch সময়ের সাথে কীভাবে বদলেছে, Checks দেখায় automated test, build আর অন্য validation, আর Files changed দেখায় diff Source 13সোর্স 13। আপনার machine-এ git log -p প্রতিটা commit-এর patch দেখায়, আর git log --stat বদলানো ফাইল আর যোগ ও বাদ যাওয়া লাইনের সংখ্যা দেখায় Source 8সোর্স 8। git diff দেখায় কী বদলেছেন কিন্তু এখনো stage করেননি, আর git diff --staged দেখায় পরের commit-এ কী যাবে Source 4সোর্স 4।

ঠিক কোন version, সেটা বলুন। git log প্রতিটা commit-কে তার SHA-1 checksum-সহ দেখায় Source 8সোর্স 8। bug report-এ এটা লিখুন, অথবা git log --oneline যে ছোট রূপ দেখায় সেটা Source 8সোর্স 8। branch-এর নাম ঠিক বলে না আপনি কী test করেছেন, কারণ প্রতিটা commit-এর সাথে branch pointer সামনে সরে যায় Source 5সোর্স 5।

test output repository-র বাইরে রাখুন। .gitignore ফাইলে এমন ফাইলের pattern থাকে, যেগুলো ইচ্ছা করে untracked রাখা হয় আর Git উপেক্ষা করে Source 12সোর্স 12। এগুলো সাধারণত generated ফাইল, যেমন log ফাইল বা build-এর বানানো ফাইল Source 4সোর্স 4। টিউটোরিয়ালের পরামর্শ: test report, screenshot আর video-ও .gitignore-এ রাখুন।

Common mistakes

সহজ English

বাংলা ব্যাখ্যা

  • track হওয়া ফাইল .gitignore-এ যোগ করা। Git আগে থেকেই যেসব ফাইল track করে, .gitignore সেগুলোর ওপর কাজ করে না Source 12সোর্স 12। ফাইলটার tracking বন্ধ করতে git rm --cached চালান, তারপর .gitignore-এ যোগ করুন Source 12সোর্স 12।
  • shared branch-এ git push --force। এটা সেই check বন্ধ করে দেয় যেটা push হওয়া commit-এর ancestor নয় এমন branch update আটকায়, আর এতে remote repository commit হারাতে পারে Source 11সোর্স 11।
  • পুরোনো code test করা। git fetch download করে, কিন্তু আপনার কাজ বদলায় না Source 7সোর্স 7। test করার আগে git pull চালান, যেটা fetch করে তারপর remote branch যোগ করে Source 10সোর্স 10।
  • stage না করা জিনিস commit হবে ভাবা। commit রেকর্ড করে staging area-র snapshot, working tree-র সব change নয় Source 4সোর্স 4। কোন ফাইল কোন state-এ আছে তা দেখার প্রধান tool হলো git status Source 4সোর্স 4।
  • নাম আর email না দেওয়া। প্রতিটা commit এগুলো ব্যবহার করে, আর আপনার বানানো commit-এ এগুলো স্থায়ীভাবে বসে যায় Source 3সোর্স 3।
  • ফাইলে conflict marker রেখে দেওয়া। সমাধান করা ফাইল থেকে <<<<<<<, ======= আর >>>>>>> লাইন পুরোপুরি মুছে ফেলা হয় Source 6সোর্স 6। git add চালানোর আগে ফাইলটা দেখে নিন, কারণ ফাইল stage করলেই Git সেটাকে resolved ধরে নেয় Source 6সোর্স 6।

What a tester can check

Tutorial advice

This list is the tutorial's own advice for a tester who joins a team that uses Git.

  • Ask which branch each test environment runs, and write its commit hash in every bug report.
  • Before you test a pull request, read its Files changed tab, so that you know which tests matter.
  • Check that test reports, screenshots, videos, and files with passwords are in .gitignore.
  • After you fix a merge conflict in a test file, run the tests before you push.
  • Ask that test code goes through pull request review, the same as product code.
  • Ask the team which branches are protected and who may force push.

সহজ English

Tutorial advice

This list is the tutorial's own advice for a tester who joins a team that uses Git.

  • Ask which branch each test environment runs. Write its commit hash in every bug report.
  • Before you test a pull request, read its Files changed tab. Then you know which tests matter.
  • Check that test reports, screenshots, videos, and files with passwords are in .gitignore.
  • After you fix a merge conflict in a test file, run the tests before you push.
  • Ask that test code gets a pull request review, the same as product code.
  • Ask which branches are protected and who may force push.

বাংলা ব্যাখ্যা

Tutorial advice

এই তালিকা টিউটোরিয়ালের নিজের পরামর্শ, Git ব্যবহার করে এমন টিমে যোগ দেওয়া একজন tester-এর জন্য।

  • জিজ্ঞেস করুন কোন test environment কোন branch চালায়, আর প্রতিটা bug report-এ তার commit hash লিখুন।
  • একটা pull request test করার আগে তার Files changed tab পড়ুন, যাতে বোঝেন কোন test গুরুত্বপূর্ণ।
  • দেখুন test report, screenshot, video আর password-ওয়ালা ফাইল .gitignore-এ আছে কি না।
  • test ফাইলে merge conflict ঠিক করার পর push করার আগে test চালান।
  • বলুন test code-ও product code-এর মতো pull request review পার হোক।
  • জিজ্ঞেস করুন কোন branch protected, আর কে force push করতে পারে।

Key words

TermMeaning
RepositoryA project under Git: you make one with git init or clone one, and its whole history is on your disk
CommitA snapshot of the files, stored in the Git directory
SHA-1 hashThe 40-character checksum by which Git refers to a stored item, such as a commit
Working treeA single checkout of one version of the project, on disk for you to use or modify
Staging area (index)A file that stores what will go into your next commit
BranchA movable pointer to a commit
HEADThe pointer to the branch you are on
MergeJoining two or more development histories
Fast-forwardA merge that only moves the pointer forward
Merge commitA commit with more than one parent, made by a three-way merge
Merge conflictThe same part of a file changed differently on two branches
RemoteA version of the project on the Internet or a network
originThe default name of the remote that you cloned from
fetch / pull / pushDownload / download and integrate / share your commits
Pull requestA proposal on GitHub to merge changes, with review and checks
.gitignoreA file of patterns of files that Git should not track

Reels on this topicএই টপিকের রিলস

Short videos from other creators, picked for this topic. They are not part of this page's fact-checked text. Nothing loads from YouTube until you press Play.অন্য ক্রিয়েটরদের বানানো ছোট ভিডিও, এই টপিকের জন্য বাছাই করা। এগুলো এই পেজের ফ্যাক্ট-চেক করা লেখার অংশ নয়। চালান বাটন চাপার আগে YouTube থেকে কিছুই লোড হয় না।

Show 9 more reelsআরও 9টি রিল দেখান
  1. [1]
    What is Git?

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  2. [2]
    git-merge

    Git documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  3. [3]
    First-Time Git Setup

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  4. [4]
    Recording Changes to the Repository

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  5. [5]
    Branches in a Nutshell

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  6. [6]
    Basic Branching and Merging

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  7. [7]
    Working with Remotes

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  8. [8]
    Viewing the Commit History

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  9. [9]
    git-switch

    Git documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  10. [10]
    git-pull

    Git documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  11. [11]
    git-push

    Git documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  12. [12]
    gitignore

    Git documentation · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  13. [13]
    Pull requests

    GitHub Docs · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  14. [14]
    Checking out pull requests locally

    GitHub Docs · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  15. [15]
    Adding locally hosted code to GitHub

    GitHub Docs · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  16. [16]
    Getting a Git Repository

    Pro Git book · accessed 2026-11-15দেখা হয়েছে: 2026-11-15

  17. [17]
    git-init

    Git documentation · accessed 2026-11-27দেখা হয়েছে: 2026-11-27