×
Clear all filters including search bar
Valeri Tandilashvili's Personal Professional Blog
index.html
to staging areagit add index.html
Adds any html file
to staging areagit add *.html
Adds several files to staging areagit add index.html another.html index.php
Adds modified and deleted files onlygit add -u / git add --update
Adds modified and new files only (but not new files without names)git add *
Adds all the changes - modified, new and deleted files (-A
is a short handhand notation for --all
)git add . / git add --all / git add -A
Adds all files including files with no names (ignores deleted files)git add . --no-all / git add . --ignore-removal
If we want to commit only part of changes of the same file --patch
or -p
is usedgit add --patch / git add -p
Possible answers for the command:
y
stage this hunk for the next commit
n
do not stage this hunk for the next commit
q
quit; do not stage this hunk or any of the remaining hunks
a
stage this hunk and all later hunks in the file
d
do not stage this hunk or any of the later hunks in the file
...
The complete list of the possible answers is on the link of the notegit status -s / git status --short
Outputs in an easy-to-parse format for scriptsgit status --porcelain
Outputs in the long-format (default)git status --long
Outputs on one linegit status -z
git init
Creates a directory mygit
inside the current folder and an empty git repository into the newly created foldergit init mygit
Modify files
-> Move to staging area
-> Commit
Remote Repository
Local Repository
Repository
Working directory
Staging
Commit
Message
To see what changes each feature takes separately
Not to commit feature changes on the main branch until it's finished
Not to Interfere while other developer is trying to fix an issue on main branch
If I work on two features at the same time, I should be able to commit the finished feature changes immediately
Multiple developers can work together on the same project
No need to wait for someone else to make their changes
Git can merge everyone's changes together
Everyone can have the most updated copy of the project's files
History
Collaboration
Feature branches
cm - centimeters
mm - millimeters
in - inches (1in = 96px = 2.54cm)
px - pixels (1px = 1/96th of 1in)
pt - points (1pt = 1/72 of 1in)
pc - picas (1pc = 12 pt)