-
Notifications
You must be signed in to change notification settings - Fork 125
/
fork.html
75 lines (65 loc) · 3.79 KB
/
fork.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Super-newbie coder's guide to Hacktoberfest</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@900&family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script src="scripts.js" defer></script>
</head>
<body>
<div class="container">
<header>
<nav>
<img id="bars" src="./img/hamburger-icon.svg" alt="">
<ul id="content">
<li><a href="index.html" >HOME</a></li>
<li><a href="contribute.html">HOW TO CONTRIBUTE</a></li>
<li><a href="fork.html" class="nav-active">FORK THE CODE</a></li>
<li><a href="pull.html">MAKE A PULL REQUEST</a></li>
<li><a href="https://github.com/emmalearnscode/guide-to-HF" target="_blank">GITHUB</a></li>
</ul>
</nav>
<h1><span id="the">THE</span>
<br><span id="super">Super-Newbie Coder's</span>
<br>GUIDE TO
<br><span>Hacktoberfest</span></h1>
</header>
<main>
<section>
<h2>Working with the code</h2>
<ol class="fork-clone-code">
<li>To get hold of the code go to <a href="https://github.com/emmalearnscode/guide-to-HF">the GitHub repo</a> for this project.</li>
<li>Click on the "Fork" button in the top right to fork the code to your own GitHub repo.
<img class="GH-img" src="./img/repo-fork.png" alt="Image highlighting the fork button on GitHub">
</li>
<li>In your own repo, click on the green "Code" button. Copy the link.
<img class="GH-img" src="./img/repo-clone-link.png" alt="Image highlighting how to copy the github link ready for cloning">
</li>
<li>In the Command line navigate to the directory you want your code to be stored in. This is done with the "cd directory-name" command.</li>
<li>Once inside the directory type <code>git clone URL</code> to clone the repository to your computer.
<img class="GH-img" src="./img/repo-git-clone.png" alt="Image showing the command line command git clone URL">
</li>
<li><code>$ git checkout -b branchname</code> to create a branch</li>
<li><code>$ git remote add upstream [email protected]:emmalearnscode/guide-to-HF.git</code> to create upstream</li> <br>
<li>
<code>$ git remote -v</code> should result <br>
<code>
origin [email protected]:<username>/guide-to-HF.git (fetch)
origin [email protected]:<username>/guide-to-HF.git (push)
upstream [email protected]:emmalearnscode/guide-to-HF.git (fetch)
upstream [email protected]:emmalearnscode/guide-to-HF.git (push)
</code>
</li>
<li><code>$ git pull upstream master</code>to ensures you're working from the latest to avoid conflicts.</li>
<li>You can now open the files on your machine and make all your changes.</li>
<li><code>$ git commit -m "commit message"</code> </li>
<li><code>$ git push origin HEAD </code></li>
<li>Once you're done, head over to <a href="pull.html">Pull Requests</a> to find out how to add your changes to the original repository.</li>
</ol>
</section>
</main>
</div>
</body>
</html>