Git is a version control system that keeps track of changes in your code overtime.
Github is a web-based platform that provides hosting for version control using Git.
S.N | For/To | Commands | Comment |
---|---|---|---|
1 | Git setup | git config --global user.name "your name" | |
. | git config --global user.email "your email" | ||
3 | List | git config --list | To check if entered name and email is associated with single account or not |
4 | Call yourself | git config --global user.name | To check your name |
. | git config --global user.email | To check your email | |
6 | Clone | git clone <-url of git repository-> | Copy https url of repository from code section |
7 | Children Directory | cd <-folder name-> | To enter into folder |
8 | Parent Directory | cd .. | To exit from existing folder |
9 | Listing | ls | To list files inside folder |
10 | Forcefull Listing | ls -Force | To list files inside folder including hidden one |
11 | Status | git status | Information about files, Eg: staged,commited |
12 | Add git | git init | |
13 | Rename branch name | git branch -M main | To rename branch name to main |
14 | Create branch | git branch -b <-new branch name-> | To create new branch |
15 | Delete brach | git branch -d <-branch name-> | To delete branch |
16 | Jumpover branch | git checkout <-another branch's name-> | To jump into another branch |
17 | Merge branch | git merge <-another branch's name-> | To merge two branch |
18 | Add origin | git remote add origin "<-url of repository->" | |
19 | Add directory | mkdir <-new directory name-> | To create new folder |
20 | Remove directory | rmdir <-directory name-> | To remove any folder |
21 | Add file | touch <-file name-> | To add file with extension |
22 | Stage | git add <-file name-> | To add your file to commit |
23 | Unstage | git restore --stage <-file name-> | To unstage your file |
24 | Commit | git commit -m "<-message->" | To commit the changes |
25 | Undo commit | git reset <-commit hash-> | To undo commit |
26 | Push | git push origin main | To push the commited file |
#Contributors
Rojina Tiwari
SMRITI PANDEYA
Bipana
Apekchha
Prabhat Mani Paudel
My name is Suchita Baral.
My name is Anil Pariyar.