Professional Documents
Culture Documents
I.1 Configuration..........................................................................................................................................2
I.2 Auto completion.................................................................................................................................3
I.3 Help....................................................................................................................................................3
II.1 Initialize a repository.............................................................................................................................4
II. 2 Storage..............................................................................................................................................4
II.3 Commit..............................................................................................................................................4
II.4 Commit message...............................................................................................................................5
II.4 View the commit log..........................................................................................................................5
II.5 Arhitecture- the three trees..............................................................................................................5
III. Adding files.............................................................................................................................................6
I.1 Configuration
git –version
Using any Git command after installation will confirm Git is installed, but requesting the current
version of the tool is an easy way to confirm with minimal output and no need to set up a
repository.
Install on Mac:
Use the Ctrl key while clicking and then choose "Open with installer."
Install Git with the terminal utility command install git.
Hint: The Git installer at git-scm.com will install Git on a Mac.
Other configs:
a) System: /etc/gitconfig Program Files\Git\etc\gitconfig
b) User: ~/,gitconfig $HOME\.gitconfig
c) Project my_project/.git/config
Global configurations:
- mihai$ git config --global user.name “”
- mihai$ git config --global user.email “”
git config –list
Single configuration:
Mihai$ git config user.name
Mihai$ git config user.mail
IDE configuration:
git config
Git config with no options will access the project-level config file.
https://github.com/git/git/tree/master/contrib
https://github.com/git/git/tree/master/contrib/completion
or:
search completion
result:
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
ad to .bash_profile
shell script:
if [ -f ~/.git-completion.bash] ; then
source ~/.git-completion.bash
fi
I.3 Help
If a bad actor tampers with a file in an old version of a repository, which is true?