Those of you familiar with the command line will recognize that you are not specifically “changing” the name so much as “moving it” in a similar fashion as the mv command. Now, you will proceed to changing the name of the branch locally. Your branch is now present on the remote repository and in your local configuration. In order to send it up to the remote you must do a Git push. So you have successfully created a local branch, but it is not present on the remote repository yet. At this point, any changes you make to the project files will be committed on the “staging” branch. You have now created a branch called “staging” and switched to it, because you used the “checkout” command. You can name this branch anything you want, but for this example the name “staging” will be used: git checkout -b staging ![]() (For the purposes of this test it would be best if you have already been working in this project and already have some commits on the master branch.) Create a New Branch For the local project you can use any directory on your local workstation, for the remote you can use your VPS server. To follow along with this example you will just need a test repository locally and a remote repository to push changes to. ![]() Then we will push the branch to the remote repository, change the name locally, and then change the name remotely to make sure they match. Only pay for what you need with our scalable Cloud VPS Hosting.ĬentOS, Debian, or Ubuntu No Bloatware SSH and Root Access Example Workflow For Changing a Branch NameĪs a quick review, we will follow the full procedure for creating a new branch and making a commit. ![]() If you don’t need cPanel, don't pay for it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |