What is git clone?
What all protocols does git clone support?
git clone <repo_name> <optional_directory_name>
<repo_name>
can use https or git or user@server protocol. Eg: https://github.com/libgit2/libgit2<aside>
π SUMMARY: git clone
makes a full copy of the data with all its versions and checks out on the latest version.
</aside>
How to check the staged/committed status of files
git status
tells
-s
or --short
to git status as an argument to get concise and simplified status output.<aside>
π SUMMARY: git status
command helps getting the status of untracked files and the current branch.
</aside>
How to protect some files from being staged or being mentioned untracked by git?
What file pattern standard does gitignore follow?
.gitignore
that contains class of files you donβt want to add to git or show as untracked.$ cat .gitignore
# File extensions ending in o or a.
*.[oa]
# File name ending in ~
*~
# ignore all .a files
*.a
# but do track lib.a, even though you're ignoring .a files above
!lib.a
# only ignore the TODO file in the current directory, not subdir/TODO
/TODO
# ignore all files in any directory named build
build/
# ignore doc/notes.txt, but not doc/server/arch.txt
doc/*.txt
# ignore all .pdf files in the doc/ directory and any of its subdirectories
doc/**/*.pdf
<aside>
π SUMMARY: To avoid staging files or being mentioned as untracked by git we mention those files as their name or using pattern in a file .gitignore
</aside>