Jul 9, 2024
git --version
.mkdir
, cd
, etc.).git init
to initialize Git repository in a folder.git status
to check the repository state..git
folder created to track changes.git add <filename>
or git add .
before committing.git commit -m <message>
to save changes in local repo.git log
and git log --oneline
to view commit history.git branch <branchname>
and switch with git checkout <branchname>
or git switch <branchname>
.git merge <branchname>
merges changes into the current branch.git push -u origin main
sets upstream branch, later pushes require only git push
.