-
Notifications
You must be signed in to change notification settings - Fork 514
/
help.txt
114 lines (61 loc) · 2.09 KB
/
help.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{cyan}{bold}
HELPFUL THINGS{/bold}{/cyan}
- Get stuck? Find an error? File and issue at:
{bold}github.com/jlord/git-it{/bold}
{cyan}
GIT COMMANDS
------------{/cyan}
{cyan}Configuration{/cyan}
{bold}Configure your name{/bold}
$ git config --global user.name "Your Name"
{bold}Configure your username{/bold}
$ git config --global user.username githubusername
{bold}Configure your email{/bold}
$ git config --global user.email youremail@example.com
{cyan}Check in{/cyan}
{bold}Check status of changes to a repository{/bold}
$ git status
{bold}View changes between commits{/bold}
$ git diff
{bold}Add a file's changes to be commited{/bold}
$ git add <FILENAME>
{bold}To add all files' changes{/bold}
$ git add .
{bold}To commit (aka save) the changes you've added with a short
message describing the changes{/bold}
$ git commit -m "your commit message"
{cyan}Remotes{/cyan}
{bold}To push your changes to a remote{/bold}
$ git push <REMOTENAME> <BRANCHNAME>
{bold}To pull in changes from remote{/bold}
$ git pull <REMOTENAME> <BRANCHNAME>
{bold}To set a URL for a remote{/bold}
$ git remote set-url <REMOTENAME> <URL>
{bold}Add a remote{/bold}
$ git remote add <REMOTENAME> <URL>
{cyan}Branches{/cyan}
{bold}Merge a branch into current branch{/bold}
$ git merge <BRANCHNAME>
{bold}Change the branch you're working on{/bold}
$ git checkout <BRANCHNAME>
{bold}Delete a local branch{/bold}
$ git branch -d <BRANCHNAME>
{bold}Delete a remote branch{/bold}
$ git push <REMOTENAME> --delete <BRANCHNAME>
{cyan}
BASH COMMANDS
-------------{/cyan}
{bold}Make a new folder (aka directory){/bold}
$ mkdir <FOLDERNAME>
{bold}Navigate into an existing folder (aka change directory){/bold}
$ cd <FOLDERNAME>
{bold}Back out of a folder/directory{/bold}
$ cd ..
{bold}Back out all the way to the home directory{/bold}
$ cd
{bold}List the items in a folder{/bold}
$ ls
{bold}Remove (delete) a file{/bold}
$ rm <FILENAME>
{bold}Remove (delete) a folder{/bold}
$ rm -rf <FOLDERNAME>