We are going to treat the default "master" branch as our production and therefore need to create a single branch for development, or pre-production. Creating branchesĪs stated in the beginning of this article, we want to have a development and a production setup for our coding environment. Now that we know how to view branches, it time create our first one. The second line simply indicates that on our remote, named origin, there is a single branch, also called master. The asterisk next to "master" in the first line of the output indicates that we are currently on that branch. The output will look similiar to the following: We can view all existing branches by typing the following: git branch -aĪdding the "-a" to the end of our command tells GIT that we want to see all branches that exist, including ones that we do not have in our Prior to creating new branches, we want to see all the branches that exist. This tutorial will teach you how to create two branches (master and develop) and how to merge code from the development stage to production.Ī branch, at its core, is a unique series of code changes with a unique name.Įach repository can have one or more branches.īy default, the first branch is called "master". It's very easy to learn the syntax and to figure out how git can best serve your workflow and your environment. In the world of version control systems, GIT is arguably one of the best in terms of flexbility. Installation article and the article on how to use git effectively. This article is the third installment in the "Using Git" series.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |