Let's go through the steps to understand flow in case we are working on any production issue :
Step 1: we'll create a local branch for developing any feature /bug which can be a child branch inherited from the production branch.
The below command will create headerissue branch locally on which developer would work and fix production issues.
git checkout -b headerissue production branch
We can check the branches existing regionally by running below command.
step 2: git branch -List all branches existing locally. You can progress the changes by running below command
step 3: git status- To see any changes in the branch
step 4: Once you are done with changes committing changes locally not remotely.
Once unit testing and release testing gets completed, you'll be able to move to merge the changes within the production branch.
step 5: Now you can move to the production branch
$ git checkout productionbranch
Switched to branch production branch and merge the changes once
$ git merge --no-ff headerissue (merging with issue branch)
$ git branch -d headerissue(delete local branch)
$ git push origin productionbranch (pushing issue fix in production branch)