![]() ![]() Hopefully, the above GIF demonstrates how branches are copies of your project, but with slight differences. Only the development branch has the 3 extra text files, but when we switch to the master branch, we can see that those files do not exist on master. In the above GIF, you can see what my project folder looks like when I switch branches. Some files have been created on the development branch, committed and then pushed. So, now that you have a new branch, you can do THIS magic:ĭid that not seem magical? Let me explain. Not a necessary step, but this way you know for sure that the branch you created is accessible from places outside of your own computer. But here’s what mine looks like on GitLab: I won’t tell you how to do this, because I bet you can figure it out. If you have used GitLab as your server, like I suggested in Getting Started, then for your own peace of mind, you can also confirm the existence of your new branch by logging in to your GitLab account, clicking on your project, and viewing your branches. If you’ve followed my setup guide correctly, Getting Started with GitKraken for Windows, then this should have worked successfully without any errors Note that this is identical to trying to push when you have committed your work. If you are not currently checked out to the branch you intend to push, then you can just right-click on the local branch you intend to push, and select ‘ push’. Ignore the prompt that appears and hit the submit button.Ignore the prompt that appears and hit the submit button. Assuming you are currently checked out to your new branch, simply hit the push button at the top of your GitKraken window.You need to push this new branch to the remote repository. Your team members can’t access it, and if you try to work from a different computer, neither can you! But this branch still only exists on your local repository. Remember, we have created a new branch, and even switched to it. Push is what you do to take changes on your local repository (on your computer) and push those changes to your remote repository (like Gitlab). However, just so you know, you can switch branches whenever you like by double-clicking on them under your local branches section.ĭouble-clicking on a remote branch that does not exist locally will checkout (AKA switch to) that branch and you will find it in your local branch list from then on. In some git clients, you must also switch to your new branch after creating it, this happens for you automatically in GitKraken. You will be instantly switched to your new branch. Type the name of your new branch when prompted to do so.Simply right click on your local master branch and select ‘ Create branch here‘. ![]() So we will make a branch called development, which will branch off of master. Every new project starts with a default branch called ‘ master‘. ![]() This guide strictly describes these procedures when using GitKraken, so hopefully you have come to the right place, and your interface looks something like this:īranches in Git are like branches in trees, they have to branch off of something, like another branch. Now, assuming you’re familiar with branching, I’m going to go ahead and show you how to do the following things with branches in GitKraken: If you’re new to branching, please make sure you’ve read that first. It is explained in my guide: ‘ What are ‘branches’?‘. Before reading this, I hope that you understand what you are trying to achieve with branching. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |