Skip to content

Commit 49cc5b4

Browse files
committed
Fully fleshed out basic github workshop
1 parent 72548c2 commit 49cc5b4

18 files changed

+256
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
# basic-github-workshop
1+
# basic-github-workshop
2+
* Inspiration for this repo from [jctf-pres](https://github.com/iloveicedgreentea/jerseyctf-presentation)
3+
4+
## Table of Contents
5+
<!-- (15 minutes and 10 minutes of questions) -->
6+
* [Why](docs/why.md)
7+
* [Git & Version Control](docs/gitVC.md)
8+
* [Commits](docs/commits.md)
9+
* [Branches](docs/branches.md)
10+
* [Remotes](docs/remotes.md)
11+
* [Commands](docs/commands.md)
12+
* [Conclusion](docs/conclusion.md)
13+
14+
## Purpose of this Presentation
15+
16+
An intro guide into Github. And the beauty of it!
17+
18+
19+
<!-- Flow: OG -> WHY -> GITVC -> commits -> branches -> remotes -> commands -> conclusion -->
20+
21+
<!-- DONE: OG, WHY, GITVC, commits, branches, remotes, commands, Conclusion-->
22+
23+
[Start Presentation](docs/why.md)
24+

docs/branches.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Branches
2+
3+
![](../img/branchLolz.jpeg)
4+
5+
6+
**Branches** are ways to isolate development work without affecting other branches in the repository.
7+
8+
Every repository (repo) has at least 1 default branch.
9+
10+
_Conventionally_, branches allow:
11+
* Development of Features
12+
* Bug Fixes
13+
* Environment for Experimenting of new ideas, safely
14+
15+
## Commands
16+
17+
To create a new branch
18+
* `git branch <BranchName>`
19+
20+
To switch into a different branch
21+
* `git checkout <BranchName>`
22+
23+
To create and switch to branch
24+
* `git checkout -b <BranchName>`
25+
26+
27+
---
28+
29+
[next](remotes.md)

docs/commands.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Commands (Git Commands)
2+
3+
Take a look at the [***GIT Cheat Sheet***](#gcs) in the **Resources** section for a more extensive list of commands
4+
5+
## Setup
6+
To add your Github Username
7+
* `git config --global user.name`
8+
9+
To add your Github Email
10+
* `git config --global user.email`
11+
12+
## Initialization
13+
14+
To Initialize an existing directory as a Git repository
15+
* `git init`
16+
17+
To clone a repository (Download current version from repository)
18+
* `git clone <url>`
19+
20+
21+
## Development
22+
23+
To stage your files (add to the commit)
24+
* `git add .`
25+
26+
To commit changes
27+
* `git commit -m "Commit Message"`
28+
29+
To push to the current remote and the current branch
30+
* `git push`
31+
32+
Update repository content from the current remote and current branch
33+
* `git pull`
34+
35+
* **THESE ARE BIT A FRACTION OF ALL THE POSSIBLE GIT COMMANDS, but they are are some of the most common**
36+
37+
38+
---
39+
40+
## Resources
41+
<b id="gcs">[GIT Cheat Sheet](https://education.github.com/git-cheat-sheet-education.pdf)</b>
42+
43+
---
44+
45+
[next](conclusion.md)

docs/commits.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Commits
2+
3+
![](../img/commitsLolz.jpeg)
4+
## What is it?
5+
Simply put, **Commits** are saved changes.
6+
7+
## Commits Explained
8+
Each commit has an associated _commit message_. A **good _commit message_** is a description why a particular change was made or the changes themselves.
9+
10+
Git assigns each commit a unique ID, called a SHA or hash, that identifies:
11+
* The specified changes
12+
* When the changes were made
13+
* Who created the changes
14+
15+
## Command
16+
`git commit -m "<A descriptive change>"`
17+
18+
## Funny Commit meme
19+
![](../img/breakProdCommit.jpg)
20+
> Commits that are meaningful and make the repo better are wonderful ;)
21+
22+
* Hmm, surely there must be a way to commit to a repo without breaking anything that might be really important.
23+
24+
---
25+
26+
[next](branches.md)

docs/conclusion.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Conclusion
2+
3+
Hope you are sold on Github!
4+
5+
6+
![](../img/githubPog.jpg)
7+
8+
Git is an incredibly powerful tool that can help you build anything that might interest you!
9+
10+
With Github and Git by your side, you are virtually unstoppable when it comes to **Software Development** and **Product Development**!
11+
12+
13+
Feel free to come on and try it for yourself! Or look into the [Advanced Github Techniques](https://github.com/njitacm/advanced-github-workshop) (if you up for the challenge)
14+
15+
> Also, highly recommend looking at github memes, sometimes very funny
16+
17+
## Resources
18+
* [Why Git Sucks and you'll use it anyways](https://www.slideshare.net/CarlosTaborda/why-git-sucks-and-youll-use-it-anyways)
19+
* After Slide 21, it actually has some meaning stuff that will help with understanding the fundamentals
20+
21+
---
22+
23+
[start over](../README.md)

docs/gitVC.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Git & Version Control
2+
3+
![](../img/vcMeme.jpg)
4+
5+
## Decoupling the Git in Github
6+
7+
### Github and Git are 2 different things
8+
9+
**Git** is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer.
10+
11+
**Github** is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere.
12+
13+
![](../img/gitVgithub.png)
14+
15+
---
16+
17+
## Version Control?
18+
Version Control goes by many names:
19+
* Revision Control
20+
* Source Control
21+
* Source Code Management
22+
23+
Version Control is a sclass of systems responsible for managing changes to any type of DATA.
24+
* Code
25+
* Documents
26+
* Backend Infrastructure
27+
* Collection of information
28+
* Executables / Programs
29+
* Anything that can be on a computer can be on Github
30+
31+
32+
> But what does it actually mean?
33+
* As long as you push to Github, your code is saved.
34+
* But not only your code, your entire history of your code is saved.
35+
36+
* You can work with your code without worrying about messing anything up
37+
* Via Branching, you can your main production branch and also a feature branch so if you mess anything up you, you don't actually mess anything up
38+
39+
40+
---
41+
42+
[next](commits.md)

docs/remotes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Remotes
2+
3+
![](../img/gitRem.png)
4+
> No meme sorry
5+
<!-- REMOTES ARE NO JOKING MATTER lol(MEME-less) -->
6+
7+
8+
9+
A remote URL is Git's fancy way of saying **"the place where your code is stored"**
10+
11+
That URL could be your repository on Gitub, or another user's fork, or even on a completely different server.
12+
13+
14+
## Commands
15+
To create remote repositories
16+
* `git remote add <RemoteName> <RemoteURL>`
17+
18+
To change remote's URL
19+
* `git remote set-url <RemoteName> <RemoteURL> `
20+
21+
## Resources
22+
* [Git remote Commands](https://git-scm.com/docs/git-remote)
23+
24+
---
25+
26+
[next](commands.md)

docs/why.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# why?
2+
Why not?
3+
4+
![](../img/githubMeme.jpg)
5+
6+
**GitHub** is a website for **developers** and **programmers** to collaboratively work on code. The primary benefit of **GitHub** is its version control system, which allows for seamless collaboration without compromising the integrity<sup>[1](#f1)</sup> of the original project. The projects on GitHub are examples of open-source software.
7+
8+
<sup id="f1">1</sup> Some `l33t` hackers can manipulate integrity on Github.
9+
10+
* Check out Contributors on [SigMal](https://github.com/AOrps/SigMal)
11+
* One of them seems like they don't quite fit
12+
13+
14+
## Benefits
15+
16+
* Github as a 'Code Portfolio'
17+
* Show off your technical and coding expertise
18+
19+
* Build Software Engineering Products
20+
* Lots of production Code is on Github (i.e. Linux Kernel, cpython, snort3, etc)
21+
22+
* For those ***BEAUTY GREEN SQUARES*** that make contribution
23+
24+
![](../img/count-mid.png)
25+
26+
Just note there is always another person, with more commits than you!
27+
28+
![](../img/theGuySheTellsYouNotToWorryAbout.png)
29+
30+
31+
32+
* Also use it as a place for information
33+
* [Red Teaming Toolkit](https://github.com/infosecn1nja/Red-Teaming-Toolkit)
34+
* [Zero-to-mastery/start-here-guidelines](https://github.com/zero-to-mastery/start-here-guidelines)
35+
* [SigMal](https://github.com/AOrps/SigMal)
36+
* [Awesome OSCP](https://github.com/0x4D31/awesome-oscp)
37+
38+
39+
---
40+
41+
[next](gitVC.md)

img/branchLolz.jpeg

605 KB
Loading

img/breakProdCommit.jpg

171 KB
Loading

img/commitsLolz.jpeg

9.78 KB
Loading

img/count-mid.png

18.7 KB
Loading

img/gitRem.png

68.8 KB
Loading

img/gitVgithub.png

238 KB
Loading

img/githubMeme.jpg

82.2 KB
Loading

img/githubPog.jpg

98 KB
Loading
18.1 KB
Loading

img/vcMeme.jpg

24.6 KB
Loading

0 commit comments

Comments
 (0)