
Today we will learn:
Why to use git ?
(version control system)
We will look at the use case scenario
The problem faced without version control system
How git (vcs) helps in teams.
Today we will learn
1. What is GIT
2. What is GIT HUB
3. Is GIT related to GIT HUB
4. A simple workflow
GIT - VCS - version control system
- to track changes in files / folders
- to collaborate in teams
- free and open source
Centralised VCS | Distributed VCS
GIT = DVCS
——————————————————
GIT HUB - website to upload your repositories online
- provides backup
- provides visual interface to your repo
- makes collaboration easier
GIT != GIT HUB
_______________________________________________
Today we will learn
1. How to download and install git
2. Signup and create account on GitHub
3. Add a project/folder/file to git
4. Track and commit changes
5. Add the repository to GitHub
______________________________________
Step 1 : Check if git is already installed.
terminal - git --version
Step 2 : Download and install git
https://git-scm.com/download/mac
Step 3 : Signup and create a account on GitHub
https://github.com/
Step 4 : Add your github email and username to git
git config --global user.email "yourGitHub@email.com"
git config --global user.name "yourGitHubusername"
Step 5 : Add file/folders to git - tracking
Step 6 : Commands
- terminal - goto the location of the folder/project
- git init
- git status
- git add
- git commit -m “…..”
- git remote add origin “location of remote repo”
- git push -u origin master
- git log
- git --help
________________________________________________________
Today we will learn
1. How to install Git on windows
2. Adding project/files to git for tracking
3. Git commands
4. Pushing project to remote repository(github)
_______________________________
Step 1 : check if git is already installed
git --version
Step 2 : download and install git
Step 3 : add your project to git
Step 4 : commands
git config --global user.email "yourGitHub@email.com"
git config --global user.name "yourGitHubusername"
- git init
- git status
- git add
- git commit -m “…..”
- git remote add origin https://github.com/RaghavAutomation/Repo2.git
- git push -u origin master
- git log
- git —help
Step 5 : adding project to remote repository (github)
____________________________________________________
Today we will learn
1. How to enable git commands autocomplete feature on mac os
2. How to enable git commands color features on mac os
____________________________________________________
For autocomplete
——————————
Step 1 : goto terminal
put git-completion.bash script in your home directory
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
Step 2 : Add following line to your .bash_profile.
This tells bash to run git autocomplete script if it exists
vi ~/.bash_profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
For enabling git colors
————————————
Step 1 : check if colouring is already enabled
terminal - git config color.ui
Step 2 : enable colouring
git config --global color.ui true
________________________________________________________
Today we will learn
1. What are branches
2. How to create branch
3. How to checkout branch
4. How to merge branch to master
5. How to delete branch (local and remote)
_________________________________________
Step 1 : Create branch
git branch “branch name”
Step 2 : Checkout branch
git checkout “branch name”
Step 3 : Merge new branch in master branch
git merge “branch name”
Step 4 : Delete branch
git branch -d “branch name” — delete from local
git push origin —delete “branch name” — delete from remote
______________________________________________________________
Today we will learn
How to trigger notification email from github
whenever there is any change/commit in the project
_________________________________________
Step 1 : Github - Repository - Settings - integration & services - add email
Step 2 : Test and validate by making some change in the project
_______________________________________________________________
Today We will learn:
1. What are tags / releases
2. Why should i create TAGs
3. When to create TAGs
4. How to create TAGs in git
create | show | publish | delete
Step 1:
Checkout the branch where you want to create the tag
git checkout "branch name"
example : git checkout master
________________________________________________________
Step 2:
Create tag with some name
git tag "tag name"
example : git tag v1.0
git tag -a v1.0 -m "ver 1 of .." (to create annotated tags)
________________________________________________________
Step 3:
Display or Show tags
git tag
git show v1.0
git tag -l “v1.*”
________________________________________________________
Step 4:
Push tags to remote
git push origin v1.0
git push origin --tags
git push --tags
(to push all tags at once)
________________________________________________________
Step 5:
Delete tags (if required only)
to delete tags from local :
git tag -d v1.0
git tag --delete v1.0
to delete tags from remote :
git push origin -d v1.0
git push origin --delete v1.0
git push origin :v1.0
to delete multiple tags at once:
git tag -d v1.0 v1.1 (local)
git push origin -d v1.0 v1.1 (remote)
________________________________________________________
Checking out TAGS
We cannot checkout tags in git
We can create a branch from a tag and checkout the branch
git checkout -b "branch name" "tag name"
example : git checkout -b ReleaseVer1 v1.0
________________________________________________________
Creating TAGS from past commits
git tag "tag name" "reference of commit"
example : git tag v1.2 5fcdb03
===================================================
Welcome to “Git and GitHub – Step by Step for Beginners”, a complete hands-on course designed for anyone who wants to learn version control from scratch. If you’ve never used Git or GitHub before, this course will guide you step by step to master the essential skills needed for real-world projects.
Do you want to learn the very basics of Git and Github in a very easy Step by Step manner?
If Yes, this course is for you.
Here we will learn the basics in an easy way.
We will understand why should we use Git.
Will start from What is Git and Github. How to download, install and learn different commands in Git.
You will start with the basics of Git, understanding what version control is, why it’s important, and how to install Git on your system. Then, you’ll learn to create repositories, track changes, commit code, and manage branches. We will also cover merging, resolving conflicts, and using Git effectively in team projects.
Next, you’ll move to GitHub, the platform that hosts your code online. You’ll learn to push and pull code, create pull requests, manage issues, and collaborate with others. The course is practical and beginner-friendly, with clear examples and exercises so you can apply your knowledge immediately.
By the end of this course, you will be confident in using Git and GitHub for your personal projects, internships, or professional work. This is the foundation every developer or tester needs to work efficiently with code and collaborate seamlessly.
LET'S GET STARTED...