Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed assets/img/index-1.png
Binary file not shown.
78 changes: 22 additions & 56 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,72 +25,54 @@ <h1>Notes on Git and GitHub</h1>
<div class="row">
<div class="single-col">
<p>
On this page you can find some personal notes on the use of Git
and GitHub. Though the notes themselves were created by me, the
content in them is the result of courses that I've taken on the
subject, books I've read, and countless YouTube videos, blog posts
and StackOverflow questions. These notes should not be considered
as a replacement for engaging with those resources.
On this page you can find some personal notes on the use of Git and GitHub. Though the notes themselves
were created by me, the content in them is the result of courses that I've taken on the subject, books
I've read, and countless YouTube videos, blog posts and StackOverflow questions. These notes should not
be considered as a replacement for engaging with those resources.
</p>
<br />
<p>
Some resources that I especially recommend and whose influence can
be found all across these notes are:
Some resources that I especially recommend and whose influence can be found all across these notes are:
</p>
<ul>
<li class="references-item">
<em>The ultimate Git course</em> by Mosh Hamedani which you can
find <a href="https://codewithmosh.com/" class="here">here</a>.
I personally consider this to be THE course on Git and GitHub
for newcomers or people who have been learning-by-doing.
<em>The ultimate Git course</em> by Mosh Hamedani which you can find
<a href="https://codewithmosh.com/" class="here">here</a>. I personally consider this to be THE course
on Git and GitHub for newcomers or people who have been learning-by-doing.
</li>
<li class="references-item">
<em>Happy Git with R</em> by Jenny Bryan which you can find
<a href="https://happygitwithr.com/" class="here">here</a>.
Don't be fooled by its title, even if you are not an R
programmer this book covers everything on how to get started,
from download and installation, to setting up SSH keys and PATs,
to basic workflows, and much more.
<a href="https://happygitwithr.com/" class="here">here</a>. Don't be fooled by its title, even if you
are not an R programmer this book covers everything on how to get started, from download and
installation, to setting up SSH keys and PATs, to basic workflows, and much more.
</li>
<li class="references-item">
Several YouTube channels that have helped me immensely from time
to time are
<a href="https://youtu.be/HVsySz-h9r4" class="here"
>Corey Shafer</a
>,
Several YouTube channels that have helped me immensely from time to time are
<a href="https://youtu.be/HVsySz-h9r4" class="here">Corey Shafer</a>,
<a
href="https://www.youtube.com/watch?v=3RjQznt-8kE&list=PL4cUxeGkcC9goXbgTDQ0n_4TBzOO0ocPR"
class="here"
>The Net Ninja</a
>,
>The Net Ninja</a>,
<a
href="https://www.youtube.com/channel/UCpREcVgeyOjDIAFa8FQr9Dw"
class="here"
>The Modern Coder</a
>,
>The Modern Coder</a>,
<a
href="https://www.youtube.com/watch?v=IHaTbJPdB-s&list=PLZlA0Gpn_vH85jM1TWO6TdCtSr6ruglWn&index=13"
class="here"
>Web Dev Simplified</a
>,
>Web Dev Simplified</a>,
<a
href="https://www.youtube.com/channel/UCp06FAzrFalo3txskS1gCfA"
class="here"
>GitKraken's YouTube channel</a
>.
>GitKraken's YouTube channel</a>.
</li>
<li class="references-item">
The official documentation for
<a href="https://git-scm.com/doc" class="here">Git</a> and
<a href="https://docs.github.com/en" class="here">GitHub</a>.
These can be hard to navigate at first.
The official documentation for <a href="https://git-scm.com/doc" class="here">Git</a> and
<a href="https://docs.github.com/en" class="here">GitHub</a>. These can be hard to navigate at first.
</li>
<li class="references-item">
<a href="https://ohshitgit.com/" class="here"
>Oh Shit, Git!?!</a
>
A funny guide into how to solve some of the most common mistakes
we've all made when we first started with Git.
<a href="https://ohshitgit.com/" class="here">Oh Shit, Git!?!</a> A funny guide into how to solve some
of the most common mistakes we've all made when we first started with Git.
</li>
</ul>
</div>
Expand Down Expand Up @@ -448,24 +430,8 @@ <h2 class="jump-to-title-text">Jump to...</h2>
</div>
</div>
</div>
<div class="row">
<div class="single-col center">
<p>
Read up! Enjoy! And when things don't work...worry not, for you
are not alone...
</p>
</div>
</div>
<div class="row">
<div class="single-col center">
<img src="assets/img/index-1.png" alt="" class="github-img" />
</div>
</div>
</section>
</main>
<script
src="https://kit.fontawesome.com/994cc6cf8e.js"
crossorigin="anonymous"
></script>
<script src="https://kit.fontawesome.com/994cc6cf8e.js" crossorigin="anonymous"></script>
</body>
</html>
35 changes: 13 additions & 22 deletions pages/001/what_is_git.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../../assets/css/style.css" />
<link
rel="shortcut icon"
href="../../assets/favicon/favicon.png"
type="image/x-icon"
/>
<link rel="shortcut icon" href="../../assets/favicon/favicon.png" type="image/x-icon" />
<title>What is Git?</title>
</head>

<body>
<div class="floating-div">
<header>
Expand All @@ -30,22 +28,17 @@ <h1>What is Git?</h1>
<div class="row">
<div class="single-col">
<p>
Git is a version control system. A version control system records
the changes made to the project's code over time in a special
database called a <em>repository</em>. We can then look at the
database and see who's made changes and when. This way, if we made
a mistake we can easily go back to a previous state.
Git is a version control system. A version control system records the changes made to the project's code
over time in a special database called a <em>repository</em>. We can then look at the database and see
who's made changes and when. This way, if we made a mistake we can easily go back to a previous state.
</p>
<br />
<p>
Version control systems can be classified into two categories:
<em>Centralized</em> and <em>Distributed</em>. In a centralized
system, all team members connect to a central server to get and
share code. The problem with these systems is that if the server
goes down, we can't save snapshots. In distributed systems, every
member of the team has a copy of the entire project on their
machine, and then share their code to a central copy of the
project. Git is a distributed control system.
Version control systems can be classified into two categories: <em>Centralized</em> and
<em>Distributed</em>. In a centralized system, all team members connect to a central server to get and
share code. The problem with these systems is that if the server goes down, we can't save snapshots. In
distributed systems, every member of the team has a copy of the entire project on their machine, and then
share their code to a central copy of the project. Git is a distributed control system.
</p>
</div>
</div>
Expand All @@ -54,9 +47,7 @@ <h1>What is Git?</h1>
<footer>
<a class="go-home" href="../../index.html"><i class="fas fa-home"></i></a>
</footer>
<script
src="https://kit.fontawesome.com/994cc6cf8e.js"
crossorigin="anonymous"
></script>
<script src="https://kit.fontawesome.com/994cc6cf8e.js" crossorigin="anonymous"></script>
</body>

</html>
53 changes: 18 additions & 35 deletions pages/002/configuring_git.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../../assets/css/style.css" />
<link
rel="shortcut icon"
href="../../assets/favicon/favicon.png"
type="image/x-icon"
/>
<link rel="shortcut icon" href="../../assets/favicon/favicon.png" type="image/x-icon" />
<title>Configuring Git</title>
</head>

<body>
<div class="floating-div">
<header>
Expand Down Expand Up @@ -42,26 +40,16 @@ <h1>Configuring Git</h1>
</ul>
<p>Settings can be specified at three different levels</p>
<ul>
<li>
<strong>System</strong>: settings at the system level apply to
all users of the computer.
</li>
<li>
<strong>Global</strong>: the settings here apply to all
repositories of the current user.
</li>
<li>
<strong>Local</strong>: the settings here apply to the current
repository.
</li>
<li><strong>System</strong>: settings at the system level apply to all users of the computer.</li>
<li><strong>Global</strong>: the settings here apply to all repositories of the current user.</li>
<li><strong>Local</strong>: the settings here apply to the current repository.</li>
</ul>
</div>
</div>
<div class="row">
<div class="single-col">
<p>
To configure the settings, open the Git Bash (Bash = "Bourne Again
Shell") or Terminal. You can specify the name with:
To configure the settings, open the terminal. You can specify the name with:
</p>
<div class="code">
<code>git config --global user.name "User Name"</code>
Expand All @@ -75,16 +63,15 @@ <h1>Configuring Git</h1>
<code>git config --global core.editor "code --wait"</code>
</div>
<p>
All these configuration settings are stored in a text file that we
can access and edit with our default editor. You can open it with:
All these configuration settings are stored in a text file that we can access and edit with our default
editor. You can open it with:
</p>
<div class="code">
<code>git config --global -e</code>
</div>
<p>
This will open the <em>.gitconfig</em> file where you can edit
configurations. When you go back to Git Bash you'll see a message
that says
This will open the <em>.gitconfig</em> file where you can edit configurations. When you go back to the
terminal you'll see a message that says
</p>
<div class="code">
<code>hint: Waiting for your editor to close the file...</code>
Expand All @@ -95,13 +82,11 @@ <h1>Configuring Git</h1>
<div class="row">
<div class="single-col">
<p>
Now we need to configure how Git will handle the end-of-line. On
Windows, the end-of-line are marked with two special characters:
<span class="inline-code">\r</span> for <em>Carriage Return</em>,
and <span class="inline-code">\n</span> for <em>Line Feed</em>. On
macOS and Linux, the end-of-line is indicated with
<span class="inline-code">\n</span>. We have to configure a
property called <em>core.autocrlf</em>. On Windows use:
Now we need to configure how Git will handle the end-of-line. On Windows, the end-of-line are marked with
two special characters: <span class="inline-code">\r</span> for <em>Carriage Return</em>, and
<span class="inline-code">\n</span> for <em>Line Feed</em>. On macOS and Linux, the end-of-line is
indicated with <span class="inline-code">\n</span>. We have to configure a property called
<em>core.autocrlf</em>. On Windows use:
</p>
<div class="code">
<code>git config --global core.autocrlf true</code>
Expand All @@ -117,9 +102,7 @@ <h1>Configuring Git</h1>
<footer>
<a class="go-home" href="../../index.html"><i class="fas fa-home"></i></a>
</footer>
<script
src="https://kit.fontawesome.com/994cc6cf8e.js"
crossorigin="anonymous"
></script>
<script src="https://kit.fontawesome.com/994cc6cf8e.js" crossorigin="anonymous"></script>
</body>

</html>
33 changes: 13 additions & 20 deletions pages/003/getting_help.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../../assets/css/style.css" />
<link
rel="shortcut icon"
href="../../assets/favicon/favicon.png"
type="image/x-icon"
/>
<title>Getting Help</title>
<link rel="shortcut icon" href="../../assets/favicon/favicon.png" type="image/x-icon" />
<title>Getting help</title>
</head>

<body>
<div class="floating-div">
<header>
Expand All @@ -20,7 +18,7 @@
</a>
</div>
<div class="title">
<h1>Getting Help</h1>
<h1>Getting help</h1>
</div>
<div class="btn">
<a href="../004/initializing_a_repository.html" class="next">
Expand All @@ -34,26 +32,23 @@ <h1>Getting Help</h1>
<div class="row">
<div class="single-col">
<p>
To get help on a Git command, Google <em>git + command</em>. The
first result will be a link to the Git documentation. There you'll
find the complete documentation of the command.
To get help on a Git command, Google <em>git + command</em>. The first result will be a link to the Git
documentation. There you'll find the complete documentation of the command.
</p>
</div>
</div>
<div class="row">
<div class="single-col">
<p>
We can also access the same page from the Git Bash. Just run
<em>git command --help</em>. So, for example, if we need help with
the <em>config</em> command, we run:
We can also access the same page from the terminal. Just run <em>git command --help</em>. For example, if
we need help with the <em>config</em> command, we run:
</p>
<div class="code">
<code>git config --help</code>
</div>
<p>
The same information as with Google will come up. Use the
<em>space bar</em> to go to the next page. Use <em>q</em> to exit.
If you only want to see a summary of the command, run:
The same information as with Google will come up. Use the <em>space bar</em> to go to the next page. Use
<em>q</em> to exit. If you only want to see a summary of the command, run:
</p>
<div class="code">
<code>git config -h</code>
Expand All @@ -65,9 +60,7 @@ <h1>Getting Help</h1>
<footer>
<a class="go-home" href="../../index.html"><i class="fas fa-home"></i></a>
</footer>
<script
src="https://kit.fontawesome.com/994cc6cf8e.js"
crossorigin="anonymous"
></script>
<script src="https://kit.fontawesome.com/994cc6cf8e.js" crossorigin="anonymous"></script>
</body>

</html>
Loading