-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomandline-and-git.txt
40 lines (34 loc) · 1.64 KB
/
comandline-and-git.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CommendLine and Git
- Command Line basic
- pwd //Present working directory
- ls // list to see in the present directory
- ls -l // everything
- ls .la // hidden files
- mkdir // make directory
- touch file-name (i.e.index.html) //create file
- nano file-name (i.e.index.html) //Open file
- ctrl + x //to save or exit
- cat //for reading the file in terminal
- mv file-name (i.e.index.html) html (folder name) : // move file to folder
- rm file-name (i.e.log.text) //Remove file
- rm -rf folder-name (i.e htmlFolder) //Remove folder
-
- https://brew.sh/ //details about brew
- brew install tree : //to see the tree view of the directory
- tree //to see the directory tree
- history //to see the history of the comand line
- cp: coppy
GIT and gitHub
- Introduction to git : https://github.com/Asabeneh/Git-and-Github
- For first time configaration of git:
- git config --global user.name ‘yourname’git config --global user.email ‘youremail’
- git init //this comand for initializa the repository
- git status // to know the status of the repogit add filename (i.e. index.html) : file/directory add to the staging
- git add . // add everythinggit commit -m "commit name" : to commitgit log : to see the log
- git remote add origin https://github.com/AtikRhaman/git-lesson.git
- git push -u origin master
- git branch //To see where I am
- git branch branch-name (i.e. branch-test) //Create new branch
- git checkout branch-name (i.e. branch-test) //Swith to branch
- git branch -m branch-test test //rename the branch name (m= message)
- git merge branch-name (i.e dev) //to merge the branch with each other