April 20th, 2021
.git/
├── branches
├── config --> contains all configs variable (local, global, system)
├── description
├── HEAD
├── index --> staged changes are indexed and stored
├── hooks
├── info
│ └── exclude
├── objects --> stores blobs, trees and commits
│ ├── 01
│ │ └── f788a49f3c242b25865b89e88f374cd948b748
│ ├── ce
│ │ └── cdee5f04fd48bc75c3eea771efa0d479bc1abd
│ ├── ea
│ │ └── 096bf3992571c237e4e8f6d3a481e67bdbf70d
│ ├── info
│ └── pack
└── refs
├── heads
└── tags
(PS: only important folder and files are explained. All hashes are either blob(file), tree (directory), commit)
git config --global user.name "Your name"
git config --global user.email "youremail@gmail.com"
The above two configurations are mandatory
git config --global http.proxy "http://edcguest:edcguest@172.31.100.29:3128/"
git config --global https.proxy "http://edcguest:edcguest@172.31.100.29:3128/"
git config --global color.ui auto
git config --global core.editor vim
In place of vim, you can specify nano, emacs, code etc.
git config --global core.editor vi
(PS: you may use the command:
man <command name>
to further find out more about any of these commands)
Line Feed Error: Most of you today were facing the issue:
Warning: LF will be replaced by CRLF in <filename>
The file will have its original line endings in your working directory
It is not an error.
Actually different operating system have different ways to simulate the end of file. Window default line ending is \r\n (CRLF - carriage return and line feed) (these are called escape sequences.) and git bash or cmder or linux uses \n (LF - line feed). Hence when you save/write a file in these environments git warns you that it is changing the line endings.
To copy some text from the terminal, select it and use the key combination: CTRL+SHIFT+C. To paste copied text to terminal use the key combination: CTRL+SHIFT+V.