• Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / tutorials / git branches merge fetch pull conflicts

git branches merge fetch pull conflicts

Agenda
————————-
————————-

Branches in Git
———————-

Git Merge
———————-

Git Fetch
———————

Git pull
———————

Merge Conflicts in Git
———————-

————————–
————————–
——————————————————————————————————————————————————————-

Table of Contents

Toggle
  • Branching Strategy in Git/ How Branching works ————————————————-
    • —————————————————– Master Branch – previous working code is already there
  • How to create Branches ——————————
  • How to merge ———————————
  • Branch will always points to latest commits
    • git merge —————— to merge this code to our current branch we need to use git merge, the the changes are reflected in our current branch
  • Branching strategies

Branching Strategy in Git/ How Branching works
————————————————-

 

Main/Master Branch — Here we store code that is being pushed to production server

live environment —- served by the code that is available in master branch

New features will be added to the product, which means new code will be addd to the existing code

Feature —> Prouduct

Master Branch – cworking code (existing code) + code for a new feature

code for a new feature might result in issues, Resulting in application down time

—————————————————–
Master Branch – previous working code is already there

we’ll create a new Branch

New Branch — NEW code — Testing the code on the new branch

Merge—-New Branch + Master Branch

Master Branch = Has the latest code

4 Developers are there in a team

Each developer will be working on an individual features

Each developer will their own feature branch

The tickets are assigned using a jira tool
———————————————–
feature-123658– Add caching mechanism

feature 123659 – add a filter in front end

feature-123658 — this will the branch name created by the developer and starts working on this

feature-123658 – add the new code

merge this code master branch

How to create Branches
——————————

git branch branch_name

ex: git branch feature-123658

how to get / checkout in to particular branch

git checkout branch_name

ex: git checkout feature-123658

————————————————————————————————————-

Inorder to create a branch and checkout to the branch, we can use a single command as well

git checkout -b branch_name

 

 

How to merge
———————————

git branch

—> it will point out the current branch

*feature-123658

I will switch to the master branch

git switch branchname

git switch master

switch to master branch

merge feature-123658 to master branch

git merge feature-123658

this will merge the code from feature-123658 branch to the master branch

 

——————————

 

Branch will always points to latest commits

——————————————

Git fetch – will pull the latest code from the remote repository to the local repostory

but it will not merge the code to our working branch

git merge
——————
to merge this code to our current branch we need to use git merge, the the changes are reflected in our current branch

git pull —-> it will fetch the code + it will also merge the code

git pull —> git fetch + git merge

 

Branching strategies

Git – Repositories ( Master Branch) – production code — code which is live/deployed on the server

checkout the code from master to develop branch

To create a branch

git branch Develop

git checkout Develop

git branch – shows the branches with * referring to the current branch

touch file5

git add file5
git commit -m “file5”
git push origin develop
username: username
token: token-id

tutorials

  • Core Java Tutorial Free online
  • HTML & CSS Tutorials
  • Php tutorials
  • ubuntu tutorials installation download issues etc
  • redis install ubuntu 20.04 with wordpress php redis mysql configuration
  • [INTRO] Ethical hacking / cyber Security / Penetration testing Tutorial -{updates frequently}
  • Android Studio tutorials syllabus Topics Course details #AndroidApplicationDevelopment
  • AUdio Editing Background Noise removal (Audacity, Adobe Premiere Addition, Camtasia Filmora Windows Obs)
  • what is vpn vs proxy vs tor, http vs https, http2, tcp vs udp, kali linux sql source code injection
  • how to create a website free of cost on google
  • CCNA Syllabus pdf (CCNA / CCNP vs devops vs mcsa /MCSE)
  • Redis performance metrics & tuning for nginx apache ubuntu & debian
  • xampp tutorials 2021 installation errors fix wordpress phpmyadmin mysql apache
  • new relic installation linux (infrastructure agent , php, mysql , nginx)
  • new relic mysql install integration - 2 ways fix problems
  • new relic php agent install in 3 steps
  • aws load balancer tutorial
  • git branches merge fetch pull conflicts

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy