Skip to content

Sabbir Mohammad Sami web developer

ResumeDownload Resume

All notes

(Development)6 min read

Git Cheat Sheet

The Git commands used day to day, grouped by task: setting your identity, starting or cloning a repository, staging and committing, branching, merging and rebasing, undoing changes, reviewing history, stashing and syncing with remotes — plus three recipes for untracking a committed node_modules or .env, restoring a file from an older commit and changing a remote URL.

The GitHub Octocat mark in a white circle over a blue and green gradient, captioned “Git Cheat Sheet”

Setup

Set the name and email that will be attached to your commits and tags:

Bash
git config --global user.name "your-username"
git config --global user.email "youremail@gmail.com"

Start a Project

Create a local repo (initialize the current directory as a git repo):

Bash
git init <directory>

Download a remote repo:

Bash
git clone <url>

Make a Change

Add a file to staging:

Bash
git add <file>

Stage all files:

Bash
git add .

Commit all staged files to git:

Bash
git commit -m "commit message"

Add changes to tracked files to staging:

Bash
git commit -am "commit message"

Remove node_module / .env file from GitHub

To remove a file from your GitHub repository, follow these steps:

  1. Remove the file from your local repository using the git rm command:
Bash
git rm <file_path>
  1. Commit the changes to your local repository:
Bash
git commit -m "Removed <file_path>"
  1. Push the changes to your remote GitHub repository:
Bash
git push origin <branch_name>

If you want to remove the file from version control but keep it in your local file system, use:

Bash
git rm --cached <file_path>

Retrieve a File from a Previous Commit

To retrieve a file from a previous commit in your Git repository, follow these steps:

  1. Find the commit hash that contains the version of the file you want. Use:
Bash
git log --oneline
  1. Checkout the file from the specific commit using:
Bash
git checkout <commit_hash> -- <file_path>
  1. Optionally, commit the changes if you want to keep the retrieved version:
Bash
git add <file_path>
git commit -m "Reverted <file_path> to version from <commit_hash>"
git push origin <branch_name>

Change the Remote Repository URL

To change the remote repository URL in your Git repository, follow these steps:

  1. View the current remote URL (optional):
Bash
git remote -v
  1. Change the remote URL using the set-url command:
Bash
git remote set-url origin <new_url>
  1. Verify the change (optional):
Bash
git remote -v

Basic Concepts

  • master: Default development branch
  • origin: Default remote name
  • HEAD: Current branch
  • HEAD^: Parent of HEAD
  • HEAD~4: 4th commit back from HEAD

Branches

List all local branches (add -r flag to show all remote branches, -a to show all branches):

Bash
git branch

Create a new branch:

Bash
git branch <new-branch>

Switch to a branch and update the working directory:

Bash
git checkout <branch>

Create a new branch and switch to it:

Bash
git checkout -b <new-branch>

Delete a merged branch:

Bash
git branch -d <branch>

Delete a branch, whether merged or not:

Bash
git branch -D <branch>

Add a tag to current commit (use -a to tag new releases):

Bash
git tag <tag-name>

Merging

Merge a branch into a branch B (add --no-ff to avoid fast-forward merge):

Bash
git merge <branch>

Merge and rebase all commits at once (single commit):

Bash
git merge --squash <branch>

Rebasing

Rebase feature branch onto main to incorporate new changes made to main (prevents unnecessary merge commits into feature, keeping history linear):

Bash
git checkout feature
git rebase main

Iteratively clean up a branch's commits before rebasing onto main:

Bash
git rebase -i main

Iteratively rebase the last 3 commits in the current branch:

Bash
git rebase -i Head~3

Undoing Things

Move (and/or rename) a file and stage it:

Bash
git mv <existing-path> <new-path>

Remove a file from the working directory and from staging area, then stage the deletion:

Bash
git rm <file>

Reset a file or a commit:

  • Reset a file from staging area only:
Bash
git reset <file>
  • Reset the index and working directory to a specific commit (read-only):
Bash
git reset --hard <commit_ID>

Revert a commit by creating a new commit:

Bash
git revert <commit_ID>

Restore file to a specific commit (leaves staging alone):

Bash
git checkout <commit_ID> <file>

Review your Repo

List new or modified files not yet committed:

Bash
git status

List commit history, with respective IDs:

Bash
git log --oneline

Show changes to unstaged files (to changes of staged files, add --cached option):

Bash
git diff

Show changes between two commits:

Bash
git diff commit1_ID commit2_ID

Stashing

Store modified and staged changes (to include untracked files, add -u flag. For untracked & ignored files, add -a):

Bash
git stash

As above, but add a comment:

Bash
git stash save "comment"

Partial stash (stash just single file):

Bash
git stash push -p

List all stashes:

Bash
git stash list

Apply stash:

Bash
git stash apply stash@{1}

Delete stash at index 1 (omit stash@{n} to delete the last stash):

Bash
git stash drop stash@{1}

Clear all stashes:

Bash
git stash clear

Synchronizing

Add a remote repo:

Bash
git remote add <alias> <url>

View all remote connections (add -v to view full URLs):

Bash
git remote

Remove a connection:

Bash
git remote remove <alias>

Rename a connection:

Bash
git remote rename <old> <new>

Fetch all branches from remote repo (no merge):

Bash
git fetch <alias>

Fetch a specific branch:

Bash
git fetch <alias> <branch>

Merge fetched changes into current branch:

Bash
git pull

Push all branches to remote repo:

Bash
git push <alias> <branch>

This cheat sheet summarizes the most common Git commands and operations. For more detailed information, refer to the official Git documentation.

Common Questions

How do I undo the last Git commit but keep my changes?
Run git reset --soft HEAD~1: the commit is removed and its changes stay staged. git reset HEAD~1 keeps them unstaged instead. If the commit is already pushed, use git revert <commit>, which adds a new commit that undoes it without rewriting shared history.
What is the difference between git merge and git rebase?
git merge joins two branches with a merge commit and keeps both histories as they happened. git rebase replays your commits on top of the other branch, giving a straight, linear history. Never rebase commits that others have already pulled.
How do I remove node_modules or .env from GitHub after committing them?
Add them to .gitignore, run git rm -r --cached node_modules (or git rm --cached .env), then commit and push. The files stay on your machine. If .env held secrets, change them: they are still in the repository’s history.
How do I change a Git remote URL?
Run git remote set-url origin <new-url>, then git remote -v to check it. This is the fix when a repository moves, is renamed, or when you switch from HTTPS to SSH.
Topic
Development
Published
Reading
6 min · 991 words
Sections
15
Tags
  • Git
  • Version control
  • Command line

Experience

( 03 roles — 2+ years )

Full-stack developer in Dhaka, Bangladesh. Building for clients in Germany and Bangladesh since 2022.

  1. (01)

    August 2025 — Present

    Full-Stack Developer

    Susko GmbH · Full Time · Remote

    • Developed and enhanced an AI-powered SaaS and social media automation platform — AI content, image and video generation, automated scheduling and publishing, multi-account and content-team management, Meta, Instagram and Google integrations, WhatsApp-based content generation and scheduling, admin controls and subscription management.
    • Built a full-stack Padel court management and automation system that connects physical court hardware to a real-time web dashboard — court and player management, game control and live scores over WebSocket — and worked on the sensor electronics, PCB design, footprint verification, Gerber validation and JLCPCB manufacturing.
    • Built and maintained automation workflows with n8n, webhooks, APIs and external service integrations that take manual steps out of business processes.
    • Delivered 40+ production websites and full-stack applications for German clients across industries in React, Next.js and TypeScript — shop management, review management and automation, fundraising platforms, menu management, QR code generation and other custom business tools.
    • Optimized backend performance across production applications — database queries, API paths, data processing and Redis-based workflows — for faster, more responsive apps.

    Next.js · React · TypeScript · Node.js · Python · Prisma · Redis · WebSocket · n8n · OpenAI

  2. (02)

    March 2024 — May 2025

    Software Developer

    Bangladesh Associate of IT Solutions · Full Time · On-site

    • Developed a full-stack inventory management system tracking products, sales, payments, returns, waste products, customer ledgers and SMS notifications, in React, TypeScript, Express and MySQL.
    • Scaled an accounting management platform from a single-client application into a multi-user system, with financial dashboards, journal entries, transaction management, reporting and data visualization.
    • Deployed and maintained web applications on cPanel and VPS servers — production deployments, domain configuration, server setup and troubleshooting.
    • Delivered websites for schools, madrasas and other organizations, turning client requirements into responsive, production-ready web applications.
    • Developed and redesigned production and company portfolio websites in React, Next.js and TypeScript, with a focus on responsive design and user experience.

    React · Next.js · TypeScript · Express · MySQL · Tailwind CSS · cPanel · VPS

  3. (03)

    November 2023 — April 2024

    Full-Stack Developer

    Diginie IT · Internship · Remote

    • Completed a remote internship as a full-stack developer, building and maintaining client web applications in Next.js, TypeScript and Tailwind CSS.
    • Turned designs into responsive pages that held together on every screen size, and kept existing client sites running.

    Next.js · TypeScript · Tailwind CSS · GitHub

About

( Dhaka, Bangladesh )

Sabbir Mohammad Sami — full-stack web & app developer at Susko GmbH, building for the web since 2022.

Sabbir Mohammad Sami, smiling and looking off to the side, seated on a white block in a black sweater — black-and-white studio portrait

I’m a full-stack developer from Dhaka who cares about the part people actually touch — unusual layouts, careful CSS, motion that means something — and about the code underneath being just as clean.

( Story )

I grew up in Dhaka and studied arts and humanities at Kabi Nazrul Government College. Alongside my studies I joined a web development course, and that is where the real growth started — surprise. Alongside work, I am now in my third year of Honours in Economics at National University.

My first website was a tourism site about the place I most wanted to visit. I built it in class 10.

Today I build AI products, automation and client platforms at Susko GmbH, after two years of shipping inventory, accounting and client sites at BAITS. What I am after has not changed: interfaces that look good and back-ends that run smoothly, from the same pair of hands.

Honest, down to earth, and fond of hard work. My inbox is always open — for a project, or just to say hi.

  1. ( Education )

    1. Kabi Nazrul Government College

      • Arts and humanities
      • Dhaka, Bangladesh
    2. National University, Bangladesh

      Session 2023–2024 · Now

      • Honours in Economics — 3rd year
      • Department of Economics
  2. ( Co-curricular )

    —

    Bangladesh National Cadet Corps (BNCC)

    • 1 No Battalion, Ramna Regiment
    • Rank: Cadet Corporal
  3. ( Languages )

    Bangla, English, Hindi

    • Bangla — native
    • English — comfortable
    • Hindi — fluent

( Skills )

Expertise
React · Next.js · JavaScript · TypeScript · MongoDB · Bootstrap · Tailwind CSS · shadcn/ui · GitHub · Figma
Comfortable
Flutter · Dart · MySQL · Mongoose · Express · TanStack Query · Firebase · React Router · Photoshop
Familiar
Zod · Framer Motion · GSAP · JWT · Axios · CORS · Stripe · Vercel

( Questions )

Who is Sabbir Mohammad Sami?

Sabbir Mohammad Sami (S M Sami) is a full-stack web and app developer from Dhaka, Bangladesh. Since August 2025 Sami has worked as a Full-Stack Developer at Susko GmbH in Germany, after building inventory and accounting platforms at Bangladesh Associate of IT Solutions (BAITS). Sami has been building for the web since 2022.

What does Sabbir Mohammad Sami build?

Sami builds websites, web apps, mobile apps and AI products end to end: company and restaurant websites, booking and management platforms, an AI social media platform (Kocial), an AI review manager (ReviewSync) and a Flutter money app (Sompi). That includes 40+ production websites for clients in Germany and Bangladesh.

Which technologies does Sami work with?

Sami works across the MERN stack — MongoDB, Express, React and Node.js — and with Next.js, TypeScript, Tailwind CSS, MySQL, PostgreSQL, Prisma and Redis. Mobile apps are built in Flutter and Dart. AI features use the OpenAI API, n8n automations and webhooks, and motion uses GSAP.

Does Sami build mobile apps with Flutter?

Yes. Sami builds cross-platform apps in Flutter and Dart. Sompi, Sami’s own money tracker, runs on Android, iOS, the web and the desktop from one Flutter codebase, with Riverpod for state and an encrypted SQLite store, so every account and transaction stays on the device.

Does Sami build AI products?

Yes. At Susko GmbH Sami builds AI SaaS: Kocial writes captions, generates images and publishes to Facebook and Instagram for agencies, and ReviewSync answers Google reviews in a business’s own voice. Sami also builds n8n workflows that connect AI models to business tools.

How can I hire Sami as a web or app developer in Dhaka?

Email smsami.dev@gmail.com or use the contact form on this site with a short note about the project. Sami works with clients in Dhaka, across Bangladesh and abroad — remotely for companies in Germany — and replies in English or Bangla.

( Contact )

Contact

( Available for projects )

Based in Dhaka, Bangladesh (GMT+6). Happy to talk in English, Bangla or Hindi.

Let’s work together.

Have an exciting project you need help with? Send me an email, give me a call, or write below — a project, a question, or just to say hi.

( Write to me )

* Required