Git
Usefull commands
# Git Commands
git clone [repo_url] # Copy repo locally
git remote add upstream [url] # Add original repo for tracking
git remote -v # Show remotes (yourFork/upstream)
git status # Show file changes
git add [file] # Stage changes
git commit -m "message" # Commit changes
git push origin [branch] # Push to your fork
git pull upstream [branch] # Pull updates from original repo
git fetch upstream # Fetch changes from original repo
git merge upstream/[branch] # Merge upstream changes
git checkout [branch] # Switch branch
git branch # List branches
git branch -d [branch] # Delete branch
git log --oneline # Show commit history
git diff # Show differences
git reset [file] # Unstage changes
git stash # Save changes temporarily
git stash pop # Restore stashed changes
# Notes upstream = original repo
# docker compose up uses docker-compose.yml to run multiple containers
# docker compose down stops/removes containers, but images remain
Last updated