This proves again that you can make as many commits on your development branch without affecting other branches. If you look at your project now, you will realize that the development.md file is missing. If you double-click on Master, you will checkout master.Ĭheckout means to switch to the branch you chose. To switch between branches, you can double-click the branch you want to go (on the sidebar). Once the push is completed, you can see the origin/development tag on the same commit as the development tag. The steps will the similar to the steps when you pushed the master branch for the first time. You can push the development branch into the Git remote by clicking the push button. Pushing the development branch into the Git remote This shows we can code as much as we like on the development branch without affecting other branches. Now, if you look at the Git history, you can see that the development branch is one commit ahead of the origin/master branch and the local master branch. In Fork, you can tell the branch your on by looking at the bolded branch.Ĭommit your code to the development branch. Make sure you’re on the development branch when you create the commit. If you go back to your Git client, you can commit this change to the development branch. Hello! This is committed from the development branch! In this file, we say “Hello! This is committed from the development branch!”. Let’s say we want to create a new file called development.md. Any code you change will be reflected only on that branch. When you create a new branch, you can code directly on the branch itself. In this case, the master branch can also be called a production branch. 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. So we create a new branch and work off it. We don’t want to show our mistakes to people. If you introduce any bugs, other people can see your bug immediately. If you commit code to the master branch, it means you change the website directly. Let’s say you have a website that’s ready for people to see. This development tag is on the same commit as master and origin/master. In the Git history, you can also see a new tag called development. Once you create the development branch, you can see two branches in your branches section-master and development. Checkout, in this case, means to move to the development branch. Once you name your branch, click on create and checkout. Usually the first branch we as developers is the development branch. You can name your branch anything you want. Right click on it and select create new branch. Look for the branch you want to branch from. Once you finish your code, you can complete the initial world by merging the changes into it. Then, you branch off into a different world. You can have a branch that stays the same in one world. In this parallel world concept, a Git branch is a parallel world. A world where I did not create this video.A world where I have created this video, but you’re not watching it.A world where I have created this video, and you’re watching it.Note: This the seventh video in the Git for beginners series.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |