-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit.html
More file actions
53 lines (53 loc) · 2.99 KB
/
git.html
File metadata and controls
53 lines (53 loc) · 2.99 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Git Bash Cheat Sheet!</title>
<link type="text/css" href="styles.css" rel="stylesheet">
</head>
<body>
<h1 class="title">Git Bash Cheat Sheet!</h1>
<div class="summary">
<p>Git Bash is a package that includes bash, a terminal and other utilities to run the
Git language from a command line. It is used to update projects to remote and local sources.
</p>
</div>
<div class="info">
<h2><u>Git Definitions</u></h2>
<p>Repository - Main package that encompasses the entire project.<br>
Branches - Seperate segments of the repository that are isolated from each other. All
repositories have a master branch.<br>
Commit - Changes to a repository.<br>
Push - Adding changes to a repository remote or local.<br>
Pull - Taking or downloading information from a remote or local repository.<br>
Staging - Getting changes ready to be commited and pushed to a repository.<br>
</p>
</div>
<br>
<div class="info">
<h2><u>Git Bash Commands</u></h2>
<p>cd - Changes directory, input the folder name to go there. ~ will take you to the root directory,
.. will take you to the previous directory.<br>
ls - Lists all directories and files in the current directory.<br>
git init - Creates a new local repository in the current directory.<br>
git clone - Clones a repository from a remote source when followed with a link.<br>
git branch - Creates a new branch when followed with the new branches name. Follow with -a
instead of a name to list all local and remote branches of the current repository.<br>
git checkout - Switches to the specified branch, use -b and a branch name instead to create
and switch to a new branch.<br>
git status - Informs you about any changes and edits you have made in a repository and notifies
if you are ahead or behind the local or remote repositories.<br>
git add - Stages the specified file, use . to stage all changes.<br>
git commit - "Saves" all staged files for pushing up, use -m and "" to add a message
about what's being pushed.<br>
git push - Sends changes to a local repository, adding -u origin followed by the branch
names sends changes to a remote repository instead.<br>
git pull - Takes changes from remote repository and adds them to the local repository.<br>
mkdir - Creates a new directory when followed with a folder name.<br>
rmdir - Deletes a folder when followed with a folder name.<br>
</p>
</div>
<div class="top">
<a href="#">To Top</a>
</div>
</body>
</html>