Git - Basic Operations | Practical explanation

Опубликовано: 01 Май 2026
на канале: Architecture Flashlight
29
0

Practical explanation

The following is a summary of basic git operations:

git add
Puts current working files into the stage (aka index or cache)

git checkout
Replaces the current working files with files from a branch.

git checkout -b
Creates a new local branch from the current branch's tip.

git clone
Clone an existing repository into a new directory.

git commit
Commits staged changes to a local branch

git commit -a
Commits all modified files to a local branch (shorthand for "git add" followed by "git commit" for each modified file)

git merge
Merges files from a given branch into the current branch.

git pull
Fetches remote changes on the current branch into the local clone, and merges them into the current working files.

git push
Uploads changes from all local branches to the respective remote repositories.