Git - noorulzaman/c_basics GitHub Wiki
Topics
I had learned today about git:
git config --user.name
git config --user.email
git config --help
git config --h
git init
rm -rf.git
git add .
git add *
git add
git commit
git commit-m
staging area
working repository
Questions
Infront of every command you have learned, Please specify it's meaning word by word and tell in description that what does that command do, e.g,
git init
Command Command Specification:
- git it is git key word for initializing git
- init it is used to initialize git repository in current directory\
Command Outcome: It is used to initialize repository in current directory
git config
Command Command Specification & Outcome:
- --user.name : It is used for the configuration of user name for the repository.
- --user.email : It is used for the configuration of email for the repository.
- --help : it is used for the opening of a panel that shows you keywords in DETAIL for using the GIT.
- --h : it is used for the opening of a panel that shows you keywords in SHORT for using the GIT.
rm -rf.git
Command Command Specification & Outcome:
1.rm -rf.git : IT is used to delete the storage file of the repository from the current directory.
git add
Command Command Specification & Outcome:
- add . : it is used to add all the files from CD into the staging area.
- **add *** : it is used to add specific files from CD into the staging area(e.g.text files).
- add : it is used to add common files from CD into the staging area separated by a space between them .
git commit
Command Command Specification & Outcome:
- git commit :it is used to add files in working repository in CD by giving them a long description.
- git commit-m :it is used to add files in working repository in CD by giving them a short message.
staging area
Command Command Specification & Outcome:
- staging area :it is the area where files stays when we add them until we commit them.
working repository
Command Command Specification & Outcome:
1.working repository :it is the space where our files saved in compressed form when we add them from CD.
git core.autocrlf
Command Command Specification & Outcome:
1.git core.autocrlf :it is used for the conversion of end line e.g. line feed to carriage return.
Dated 7-11-2020
git commit
Command Command Specification & Outcome: 1.git commit -am : it is used to directly save the files into the repository file skipping the Staging Area.
rm
Command Command Specification & Outcome:
- rm : it is generally used to remove the file from CD.
- git rm --cached -r : it is used to remove the files from the staging area.
ls
Command Command Specification & Outcome:
- git ls-files : it is used for checking that how much files we have in Staging Area.
git mv
Command Command Specification & Outcome:
- mv : it is used to move files from one type to another but its a long method because in this method we also have to add these files in Staging Area and then commit them. 2.git mv : it is also used for the same purpose as mv but its a short method to do so.
mkdir
Command Command Specification & Outcome:
- mkdir : it is used to make a directory by using TERMINAL
DATED 12-11-2020
c-programming
- ternery operator : it is used to compare the two values.
- switch statements : its a case depended operator . if our input matches to the to first case or last or middle or any case it skips the further cases.
- while loop : it can execute the code again and again until our given condition is matched.
- do while loop : it works same as while loop but it processes the code at least one time before checking the conditions . these both loops give us ease of not repeatingly writing the same code again and again. AND THAT'S ALL FOR TODAY....