_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
Let's talk

The Complete Guide to Git

18. 08. 2025 1 min read intermediate

Git je nejdůležitější nástroj každého vývojáře. Tady je vše, co potřebujete vědět.

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

nebo: git checkout -b feature/login

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

Merge vs Rebase

Merge vytvoří merge commit, zachová historii. Rebase přepíše historii na lineární. Pravidlo: rebase lokální branches, merge sdílené.

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/ — pro release-based projekty
  • Trunk-based: main + short-lived feature branches — pro CI/CD, doporučeno

.gitignore

node_modules/
.env
*.log
dist/
.DS_Store

Git Hooks

.husky/pre-commit

npm run lint
npm run test

Užitečné aliasy

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

Mastery

Git se naučíte praxí. Nebojte se experimentovat — reflog vás vždy zachrání.

gitversion controldevops
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.