Git & GitHub Tutorial for Beginners: Full Workflow (Step-by-Step Guide)
HTML-код
- Опубликовано: 10 окт 2024
- Learn Git and GitHub in this complete beginner-friendly guide. This video will walk you through the Git and GitHub workflow, covering everything from repository setup to pushing code online. Perfect for students and beginners wanting to understand version control. Whether you want to collaborate with others or manage your own projects, this tutorial will give you a solid foundation in Git.
What You'll Learn:
How to initialize Git repositories
Push and pull changes to GitHub
Create and manage branches for feature development
Use commands like git add, git commit, git push
Undo changes using git reset and git stash
Step-by-Step Commands Covered:
Create a directory for your project:
Connect Git and GitHub Using SSH Key:
Video: By Bhupesh Pravin Patil
Link: drive.google.c...
mkdir My-Details
Navigate into your project folder:
cd My-Details
Initialize a Git repository:
git init
Configure your username and email for Git:
git config --global user.name "Prem Mahajan"
git config --global user.email "prem@example.com"
Add a remote repository (GitHub link):
git remote add origin git@github.com:Prem7218/My-Details.git
Verify the remote connection:
git remote -v
Create a file and stage it for commit:
echo "Hello World" "Single Right shift Operator" index.html
git add index.html
Check the status of staged files:
git status
Commit changes with a message:
git commit -m "Initial commit with index.html"
Push to the remote repository (GitHub):
git push origin master
Pull changes from GitHub:
git pull origin master
Make new changes and push them to GitHub:
echo "New content added" "Right shift Operator" index.html
git add index.html
git commit -m "Added new content to index.html"
git push origin master
Create and switch to a new branch for updates:
git branch feature-updates
git checkout feature-updates
Add a new file to the branch:
echo "Feature added" "Right shift Operator" file.txt
git add file.txt
git commit -m "Added file.txt file"
Merge changes back to the master branch:
git checkout master
git merge feature-updates
git push origin master
Delete the branch locally and remotely:
git branch -d feature-updates
git push origin --delete feature-updates
Undo the last commit but keep changes:
git reset --soft HEAD~1
Completely undo the last commit and remove changes:
git reset --hard HEAD~1
Temporarily save changes with git stash:
echo "Temporary changes" "Right shift Operator" temp.txt
git stash
git stash list
git stash apply
Who Should Watch This Video:
[*] Students learning Git & GitHub for school or personal projects
[*] Beginners who want to understand the basics of version control
[*} Developers working on small to large projects needing version control expertise.
By following this tutorial, you will have a complete understanding of how Git and GitHub work together for efficient version control.
🖥️ How to Download Git:
We’ll walk you through downloading Git from the official website and setting up Git on your machine: git-scm.com/
🔗 Previous Videos & Links:
Connect Git and GitHub Using Command [Authentication Using SSH]:
PDF Link: pdfhost.io/v/3...
1. React JS Introduction: • React JS
2. ATS-Based Resume Playlist in Just 50 Minutes: • Resume Building
[*] Check Out My Channel for More Coding Content: / @codewheelr
👍 Don't forget to LIKE, COMMENT, and SUBSCRIBE for more tutorials!