-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
57 lines (57 loc) · 2.19 KB
/
Copy pathindex.html
File metadata and controls
57 lines (57 loc) · 2.19 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
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=, initial-scale=1.0">
<title>Git Tutorial</title>
</head>
<body>
<header><h1>My Favourite Git Command</h1>
My Favourite Git Command is <strong>Git Commit.</strong>
</header>
<section>
<p>Git commit is a command that records or the file permanently in the version history.</p>
<P> I will be showing you how to use the "git commit" in simple steps.</P>
</section>
<article>
<h3>STEP 1:</h3>
<ul>
<li>Create a Github Account.</li>
<li>Install Git Bash(if not installed).</li>
</ul>
<h3>STEP 2:</h3>
<ul>
<li>Create a local repository. </li>
<li>Initialize an empty git repository by using the command "git init" in the root if your directory. </li>
</ul>
<h3>STEP 3:</h3>
<ul>
<li>Add a new file to the staging area</li>
<li>Run the command "git add",add a file to the staging area.</li>
</ul>
<h3>STEP 4:</h3>
<ul>
<li>Create a Commit</li>
<li>
Run the command "git commit -m "the message"
</li>
</ul>
</article>
<article>
<h4>Flags that can be used with Git Commit.</h4>
<p>If you observed, when running the command git commit -m "message". You would been wondering what does the -m reperesents.Well, it reperesents a Flag!!</p>
<p>What is a Flag?</p>
<p><strong>A flag enhance commands to work efficiently and are added using a "-" after the command.</p></strong>
<p>Git commit consists of three flags and which are listed bleow.</p>
<ol>
<li> -a flag: this command commits any files you’ve added with the git add command and also commits any files you’ve changed since then.</li>
<li> -m flag: this command is used to commit message to your commit</li>
<li> -am flag: This command is a combination of the a and m flags and it is used to add and commit a message for the file in one command</li>
</ol>
</article>
<section>
<h4>Below is a terminal image that shows how to use git commit</h4>
<img src="image/gitImage.png" alt="git commit terminal" width="1000" height="500">
</section>
</body>
</html>