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,

Command git init

Command Specification:

  1. git it is git key word for initializing git
  2. init it is used to initialize git repository in current directory\

Command Outcome: It is used to initialize repository in current directory

Command git config

Command Specification & Outcome:

  1. --user.name : It is used for the configuration of user name for the repository.
  2. --user.email : It is used for the configuration of email for the repository.
  3. --help : it is used for the opening of a panel that shows you keywords in DETAIL for using the GIT.
  4. --h : it is used for the opening of a panel that shows you keywords in SHORT for using the GIT.

Command rm -rf.git

Command Specification & Outcome:

1.rm -rf.git : IT is used to delete the storage file of the repository from the current directory.

Command git add

Command Specification & Outcome:

  1. add . : it is used to add all the files from CD into the staging area.
  2. **add *** : it is used to add specific files from CD into the staging area(e.g.text files).
  3. add : it is used to add common files from CD into the staging area separated by a space between them .

Command git commit

Command Specification & Outcome:

  1. git commit :it is used to add files in working repository in CD by giving them a long description.
  2. git commit-m :it is used to add files in working repository in CD by giving them a short message.

Command staging area

Command Specification & Outcome:

  1. staging area :it is the area where files stays when we add them until we commit them.

Command working repository

Command Specification & Outcome:
1.working repository :it is the space where our files saved in compressed form when we add them from CD.

Command git core.autocrlf

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

Command git commit

Command Specification & Outcome: 1.git commit -am : it is used to directly save the files into the repository file skipping the Staging Area.

Command rm

Command Specification & Outcome:

  1. rm : it is generally used to remove the file from CD.
  2. git rm --cached -r : it is used to remove the files from the staging area.

Command ls

Command Specification & Outcome:

  1. git ls-files : it is used for checking that how much files we have in Staging Area.

Command git mv

Command Specification & Outcome:

  1. 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.

Command mkdir

Command Specification & Outcome:

  1. mkdir : it is used to make a directory by using TERMINAL

DATED 12-11-2020

c-programming

  1. ternery operator : it is used to compare the two values.
  2. 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.
  3. while loop : it can execute the code again and again until our given condition is matched.
  4. 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....