Unboxing GitHub
Chaitanya Tejaswi
15th June, 2020
Objectives
Unboxing GitHub
- What is Git & GitHub?
- Install Git; Create GitHub profile.
- Learn to create & maintain lecture notes on GitHub.
- Learn about README files & MarkDown syntax.
- Use Github Pages to publish our files on a website.
Git vs GitHub
What’s Git?
Git is a distributed, version-control-system (VCS) for tracking changes in source code.
It was created by Linus Torvalds (= creator of Linux) to manage the Linux Kernel source code.
- Checkout this video if you want to learn the differences between Centralized & Distributed VCS.
What’s Github?
GitHub allows you to host your content (probably source code) on the internet, allowing you to manage it using Git.
So, Git is the tool that allows you to manage several versions of a software;
GitHub gives you a website where you can post your work online, and manage it using Git.
What’s in it for you?
>> Answer
>> Source Code
Git Installation *
- Install Git. Also, install Git-LFS.
* When working from Shell, make sure to Run As Administator.
GitHub: Create A New “Repository”
Goto
[github.com/login] Login using your
Username &
Password.
GitHub: Upload Files (Manual)
You can manually drag & drop files on GitHub.
GitHub: Upload Files (Auto)
You can update your files to/from
GitHub, using
Git from Shell/CommandPrompt.
The basic steps to do this are:
Practice: Upload Files
Goto [github.com]
- Select repository to add files
- Upload files manually
- Upload files from Shell
README.md files
Markdown & HTML
Markdown & HTML are both markup languages (= we can mark elements of the file to uniquely identify them).
- In practice, Markdown is an in-between file format.
- Markdown simplifies HTML syntax.
- It’s common to see HTML code inside markdown files.
eg. HTML syntax for multimedia (images, audio & video).
So, before learning markdown’s syntax, let’s learn HTML’s multimedia tags.
GitHub Pages *
[README.md (output)] [README.md (webpage)]
- What’s Github Pages?
GitHub Pages lets you turn your GitHub repositories into websites.
Practice: Create/Modify README
Goto [github.com]
- Select repository
- Modify README manually
- Modify README from Shell
- Deploy static website using GitHub Pages
Repository: RESET (Soft/Hard)
What are Soft & Hard Resets?
A Soft Reset resets your local copy of the project to a previous version.
A Hard Reset resets your online copy of the project to a previous version (after executing git push
).
git reset --soft 0ad5a7a6
git reset --hard 0ad5a7a6
When to use Soft & Hard Resets?
A Soft Reset is useful when you want to build on top of a previous version, starting from the current version. You do not delete any previous versions.
A Hard Reset is useful when you want to delete all modifications beyond a certain version, and want to build on from this version only.
Repository: DELETE
References
[1] “Getting Started with GitHub”
[2] “Git Large File Storage”
[3] “Git & GitHub Crash Course” by Brad Traversy
[4] “Comparing Open-Source Software Licenses”
Resources (Used In This Webinar)
Cheatsheets