- git ?
- git is a version control software
- It keep track of code changes
- It helps to collaborate in a project
- It is installed and maintained locally
- It provides Command Line Interface (CLI)
- Released in April 7, 2005
- Developed by Linus Torvalds & Junio C Hamano
- github?
- GitHub is a hosting service where we can keep our git repositiory/folders
- It is maintained on cloud/web
- It provides Graphical User Interface (GUI)
- Founded in 2008
- Download and install git on your pc: https://git-scm.com/
- check git version: open terminal or cmd then use the command
git --version
to find out whether git is installed or not. if git is installed it will return a version number of git.
git configuration
- check all configuartion options:
git config
- set global user name and user email for all repository/git folders (if you want to set different username and email for different git repository then remove --global)
- set global user name:
git config --global user.name "Badsha Faysal"
- set global user email:
git config --global user.email "badshafaysa@gmail.com"
- set global user name:
- list all git configuration:
- list all the configuration:
git config --list
- list user name:
git config user.name
- list user email:
git config user.email
- list all the configuration:
- change global username & email
- change global user name:
git config --global user.name "PUT_NEW_USER_NAME_HERE"
- change global user email:
git config --global user.email "PUT_NEW_USER_EMAIL_HERE"
- change global user name:
- creating a git folder
-
ls -a : list all files inside of a directory
mkdir DIRECTORY_NAME_HERE cd DIRECTORY_NAME_HERE git init Example: mkdir folder1 cd folder1 git init ls -a
- adding new files in git folder
-
git status : displays the state of the working directory and staging area
ls -a touch fileName.extension open fileName.extension git status Example: touch day1.txt open day1.txt write something inside the file
-
Git is aware of the file but not added to our git repo
-
Files in git repo can have 2 states โ tracked (git knows and added to git repo), untracked (file in the working directory, but not added to the local repository)
-
To make the file trackable stagging or adding is required
- adding files to stagging area:
git add fileName
add a file in staging area / indexgit add .
add all files of directory to stagging area not subdirectorygit add -A
add all files of directory and subdirectory to stagging areagit rm --cached fileName
unstage a file from staging areagit diff
- checking the differences of a staged filegit restore fileName
- restore the file
git commit -m "message"
move the file to local repository from stagging areagit log
check the commit historygit reset --soft HEAD^
uncommit the commit in HEAD and move to staging areagit reset HEAD^
uncommit the commit in HEAD and move to unstaging / working areagit reset --hard HEAD^
uncommit the commit in HEAD and delete the commit completely with all the changes
git log --oneline
git show
git show HEAD^
git show commit-id
git checkout commit-id
git checkout master
- create a .gitignore file and add the things you do not want to add in the stagging area
- Inside .gitignore we can keep secret files, hidden files, temporary files, log files
secret.txt
secret.txt will be ignored*.txt
ignore all files with .txt extension!main.txt
ignore all files with .txt extension without .main.txttest?.txt
ignore all files like test1.txt test2.txttemp/
all the files in temp folders will be ignored
- sign in to your github account
- create a git repo
-
6 heading levels: number of hashes define heading levels. check the following examples:
# heading 1 level text is here
## heading 2 level text is here
-
bold syntax:
**text goes here**
-
italic syntax:
_text goes here_
-
bold and italic syntax:
**_text goes here_**
-
strikethrouh syntax:
~~this is~~
-
single line code syntax: `` place code inside backticks
-
multiple line code syntax: ``` place code inside three open and closing backticks
-
multiple line code syntax language specific: ```html for specific lanaguage use language name when starting; not closing
-
Ordered List syntax
``` 1. HTML 2. CSS 1. Fundamental 2. CSS Architecture - BEM 3. CSS Preprocessor - SASS 3. JS ```
-
Unordered List syntax ->
- html - css - Fundamental - CSS Architecture - BEM - CSS Preprocessor - SASS - js
-
Task List
- [x] Task1 - [x] Task2 - [x] Task3
-
adding link
<!-- automatic link --> https://github.com/me-badsha <!-- markdown link syntax --> [title](link) [BadshaGithub](https://github.com/me-badsha) [BadshaGithubis][websitelink] <!-- all link is here --> [BadshaGithub]: https://github.com/me-badsha
-
adding image syntax ->


### Lesson 10. Adding emoji
-
adding emoji
emoji src ### Smileys ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐คฃ ๐ฅฒโบ๏ธ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ฅฐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐คช ๐คจ ๐ง ๐ค ๐ ๐ฅธ ๐คฉ ๐ฅณ ๐ ๐ ๐ ๐ ๐ ๐ ๐โน๏ธ ๐ฃ ๐ ๐ซ ๐ฉ ๐ฅบ ๐ข ๐ญ ๐ค ๐ ๐ก ๐คฌ ๐คฏ ๐ณ ๐ฅต ๐ฅถ ๐ฑ ๐จ ๐ฐ ๐ฅ ๐ ๐ค ๐ค ๐คญ ๐คซ ๐คฅ ๐ถ ๐ ๐ ๐ฌ ๐ ๐ฏ ๐ฆ ๐ง ๐ฎ ๐ฒ ๐ฅฑ ๐ด ๐คค ๐ช ๐ต ๐ค ๐ฅด ๐คข ๐คฎ ๐คง ๐ท ๐ค ๐ค ๐ค ๐ค ๐ ๐ฟ ๐น ๐บ ๐คก ๐ฉ ๐ป ๐ โ ๏ธ ๐ฝ ๐พ ๐ค ๐ ๐บ ๐ธ ๐น ๐ป ๐ผ ๐ฝ ๐ ๐ฟ ๐พ### Gestures and Body Parts ๐ ๐ค ๐ โ ๐ ๐ ๐ค ๐ค โ๏ธ ๐ค ๐ค ๐ค ๐ค ๐ ๐ ๐ ๐ ๐ โ๏ธ ๐ ๐ โ ๐ ๐ค ๐ค ๐ ๐ ๐ ๐คฒ ๐ค ๐ โ๏ธ ๐ ๐คณ ๐ช ๐ฆพ ๐ฆต ๐ฆฟ ๐ฆถ ๐ฃ ๐ ๐ฆป ๐ ๐ซ ๐ซ ๐ง ๐ฆท ๐ฆด ๐ ๐ ๐ ๐ ๐ ๐ฉธ
-
adding table
table syntax | heading1 | heading2 | | ----- | ----- | | data1 | data2 | | data3 | data4 | | data5 | data6 |
- check remote connection:
git remote
orgit remote -v
git remote add name <REMOTE_URL>
example: git remote add origin http://...- to clone a remote repository:
git clone <REMOTE_URL>
- push a branch
git push -u origin branch_name
- push all branches
git push --all
- pull from a repo:
git pull
which is equivalent to git fetch + git merge
- Branch is a new and separate branch of master/main repository
- create a branch
git branch branch_name
- List branches
git branch
- List all remote branches
git branch -r
- List all local & remote branches
git branch -a
- move to a branch
git checkout branch_name
- create and move to a branch
git checkout -b branch_name
- delete a branch:
git branch -d branch_name
- merge branches:
git checkout branchName git merge branchName
git log --oneline --all --graph
- Reeference:
Thanks for read....