Shuttleu
2012-05-17 19:32:26
Using a testing branch for git for testing
Hello, this tutorial is a extension of my previous tutorial for using git
In this tutorial i will show you how to use separate branches for testing, this way you can have people using the testing branch and when your sure its stable, you can push it out to the masses
Introduction
Okay so what are branches?
Simply put, they are derivations from the original set of files
Using branches you can get everybody to use the stable branch, but you can still use a testing branch so all your experimental features can be in there, then once you are sure its stable you can merge the branches together
Video tutorial: Coming soon
Instructions
First we need to create the branch
git branch testThen we can switch to the test branch
git checkout testNow we can make all the changes that we normally would
So edit the files and push them to the server, however there is one difference
git add test.txt
git commit -m "testing"
git push origin testAs you can see i replaced master with test when pushing to the serverNow once you have finished all your changes and commits, you can merge Your test branch with your master branch
So first we need to switch back to the master branch
git checkout masterThen we merge the branches
git merge testThen at last we push the merge
git push origin masterNow you can check your master branch and you will see that all your changes from the testing branch has been made to your master branch.
Congratulations, you now have a testing branch for all the changes between your script releases
~shut