Git and GitHub Tutorial for Beginners
Kevin Stratvert Kevin Stratvert
2.96M subscribers
1,152,196 views
0

 Published On Jun 24, 2022

In this step-by-step tutorial, learn how to use Git and GitHub for source control management (SCM). We start with Git. What is it? How you can get it running on your system, and how you can start working with it? Then we look at GitHub.com, a platform for hosting and collaborating on Git repositories. By the end of this video, you'll be well on your way to using Git and GitHub. If you'd like to follow along, I've included sample files down below.

šŸ“š RESOURCES
- Sample files to follow along: https://1drv.ms/u/s!AmxrofZZlZ-whOIll...
- Official Git web site: https://www.git-scm.com/
- Official GitHub.com web site: https://github.com/
- Git and GitHub.com cheat sheet: https://education.github.com/git-chea...
- Git Reference Manual: http://git-scm.com/docs
- Git Overview Book: http://git-scm.com/book/en/v2
- Sample ignore files: https://github.com/github/gitignore
- Hyper.is Terminal: https://hyper.is/

āŒš TIMESTAMPS
00:00 Introduction
00:40 What is Git?
02:11 Get Git
03:13 Configure Git
04:55 Get help
05:59 Initialize repository
07:19 Git status
07:53 Track and untrack files
09:18 Ignore files with .gitignore
11:23 Track all files / add to staging
12:07 Commit
13:27 Change files and view differences
16:00 Bypass staging and commit
16:32 Delete / remove files
17:13 Restore files
17:55 Rename files
18:56 View commit history with git log
19:52 Amend commit
20:48 View changes in commits
22:08 Reset to previous commit
22:30 Rebase git repository
23:12 Branches
27:19 Merge branches
27:57 Delete branch
28:30 Merge conflicts
32:16 Typical Git flow
32:37 Set up GitHub account
33:37 Create new cloud repository
35:09 Push local repo to GitHub
37:29 Working with files
38:25 Edit repo details
38:44 Issues
40:17 Pull requests
43:05 Actions, Projects, Wiki, Security, Insights, Settings
44:18 Releases
45:00 Fetch and pull
45:37 Wrap up

šŸ–„ļø GIT COMMANDS CHEAT SHEET
Set configuration values for your username and email
git config --global user.name YOUR NAME
git config --global user.email YOUR EMAIL

Set default branch to main
git config --global init.default branch main

Get help on a command
git help COMMAND
git COMMAND -h

Initialize a new git repository
git init

Clone a repository
git clone REPOSITORY URL

Add a file to the staging area
git add FILE

Add all file changes to the staging area
git add --all
git add -A
git add .

Check the unstaged changes
git diff

Commit the staged changes
git commit -m "MESSAGE"

Reset staging area to the last commit
git reset

Check the state of the working directory and the staging area
git status

Remove a file from the index and working directory
git rm FILENAME

Rename a file
git mv (OLD NAME) (NEW NAME)

List the commit history
git log

List all the local branches
git branch

Create a new branch
git branch BRANCH NAME

Rename the current branch
git branch -m NEW BRANCH NAME

Delete a branch
git branch -d BRANCH NAME

Switch to another branch
git switch BRANCH NAME

Merge specified branch into the current branch
git merge BRANCH NAME

Create a connection to a remote repository
git remote add (NAME) (REPOSITORY URL)

Push the committed changes to a remote directory
git push (REMOTE) (BRANCH)

Download the content from a remote repository
git pull REMOTE

šŸ“ŗ RELATED VIDEOS
- Playlist with all my videos on Git and GitHub: Ā Ā Ā ā€¢Ā GitĀ andĀ GitHubĀ Ā 
- Python for Beginners Tutorial: Ā Ā Ā ā€¢Ā šŸ‘©ā€šŸ’»Ā PythonĀ forĀ BeginnersĀ TutorialĀ Ā 
- SQL for Beginners Tutorial: Ā Ā Ā ā€¢Ā SQLĀ TutorialĀ forĀ BeginnersĀ Ā 

šŸ“© NEWSLETTER
- Get the latest high-quality tutorial and tips and tricks videos emailed to your inbox each week: https://kevinstratvert.com/newsletter/

šŸ”½ CONNECT WITH ME
- Official website: http://www.kevinstratvert.com
- LinkedIn: Ā Ā /Ā kevinstratvertĀ Ā 
- Discord: https://bit.ly/KevinStratvertDiscord
- Twitter: Ā Ā /Ā kevstratĀ Ā 
- Facebook: Ā Ā /Ā kevin-stratvert-101912218227818Ā Ā 
- TikTok: Ā Ā /Ā kevinstratvertĀ Ā 
- Instagram: Ā Ā /Ā kevinstratvertĀ Ā 

šŸŽ TOOLS AND DISCOUNTS
āœ… šŸŽ™ļø Voicemod AI Voice Changer | 5% off | https://link.xsolla.com/KZBi89AY
āœ… šŸŒ Squarespace Websites | https://squarespace.syuh.net/XYaqYM
āœ… šŸ” Grammarly | https://grammarly.go2cloud.org/SH3nL
āœ… šŸ›ļø Shopify | https://shopify.pxf.io/XY9rPa
āœ… šŸ“‹ Notion | https://affiliate.notion.so/rffva4tr71ax
āœ… šŸ–¼ļø Figma | https://psxid.figma.com/lqjg97licpry
āœ… šŸ¤– ElevenLabs Text-to-Speech | https://try.elevenlabs.io/taqepq60mptr

šŸŽ’ MY COURSES
- Go from Excel novice to data analysis ninja in just 2 hours: https://kevinstratvert.thinkific.com/

šŸ™ REQUEST VIDEOS
https://forms.gle/BDrTNUoxheEoMLGt5

šŸ”” SUBSCRIBE ON YOUTUBE
https://www.youtube.com/user/kevlers?...

āš– DISCLOSURE
Some links are affiliate links. Purchasing through these links gives me a small commission to support videos on this channel. The price to you is the same.

#stratvert

show more

Share/Embed