Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

The Complete Guide to Git

18. 08. 2025 1 min read intermediate

Git is the most important tool for every developer. Here is everything you need to know.

Basics

git init
git clone URL
git add .
git commit -m “message”
git push origin main

Branches

git branch feature/login
git checkout feature/login

or: git checkout -b feature/login

git merge feature/login
git branch -d feature/login

Merge vs Rebase

Merge creates a merge commit and preserves history. Rebase rewrites history to be linear. Rule: rebase local branches, merge shared ones.

Remote

git remote add origin URL
git fetch origin
git pull origin main
git push origin feature/login

Stash

git stash push -m “WIP”
git stash list
git stash pop

Tags

git tag -a v1.0.0 -m “Release 1.0”
git push origin –tags

Git Flow vs Trunk-based

  • Git Flow: main, develop, feature/, release/, hotfix/ — for release-based projects
  • Trunk-based: main + short-lived feature branches — for CI/CD, recommended

.gitignore

node_modules/
.env
*.log
dist/
.DS_Store

Git Hooks

.husky/pre-commit

npm run lint
npm run test

Useful Aliases

[alias]
co = checkout
br = branch
st = status
lg = log –oneline –graph –all

Mastery

You learn Git by practice. Don’t be afraid to experiment — reflog will always save you.

gitversion controldevops
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.