why we use a development branch?
Let’s say you have a website that’s ready for people to see. This website is on the master branch.
If you commit code to the master branch, it means you change the website directly. If you introduce any bugs, other people can see your bug immediately.
We’re humans. We make mistakes. We don’t want to show our mistakes to people.
So we create a new branch and work off it. When we’re done, and when we’re sure that there are no more bugs (at least we try to!), we push the changes back to the master branch to update the website.
That’s why we use a development branch.
In this case, the master branch can also be called a production branch.
important optiongit branch
to show the available branchgit branch //branch_name
to add a new branchgit checkout //branch_name
to switch branchgit branch -d //branch_name
to delete the branch
to merge development branch to master
before merging the branch we need to go back to master branch, by simply rungit checkout master
now you are on your master branch, and you are good to merge the develment branch into master branch by simple use merge command
:git merge development