-
Notifications
You must be signed in to change notification settings - Fork 15
/
matt-notes.txt
80 lines (57 loc) · 1.69 KB
/
matt-notes.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
=== Section : Command Line
=========
mkdir [directory-name]: Make Directory
make new folder with name [directory-name]
ls / dir:
display a list of files and folders in working directory
cd [directory-name]
go into [directory-name]
touch [file.extension]
create a new file with name [file.extension]
cat [filename]
print the contents of the file
pwd
displays the current working directory
Ctrl+L
Clear terminal Screen
git init
Initialize empty git repo in your working directory
git config --global user.name "<your name>"
git config --global user.email "<your email>"
git config --global --add color.ui true
git add
tells git to start tracking a file
add files that were not committed into staging area (commits to be pushed)
git status
show files that haven't been committed yet
> Compares working directory & Staging area
Red: Working Directory
Green: Staging
git reset
unstage files from commit stage
git rm --cached
stage a removal of the file
git commit -m [message]
make a commit
git diff
show difference in the files that are to be commited
git diff [branch1] [branch2]
Show diff between branches
git log
git log --oneline
show the commits you have made to this repository.
git log --all
show all logs (even if you are on an older version)
git checkout {branch}
checkout the latest commit of that branchi
git checkout {commit code}
checkout the commit
git checkout master
checkout the most recent commit
git branch
shows list of branches
git branch {new_branch_name}
create a new branch (using your current commit as the base)
git merge {branch_to_merge_into_your_current_branch}
Pull Request:
Go to your own repo and do a pull request.