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
Code:
git branch test
Then we can switch to the test branch
Code:
git checkout test
Now 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
Code:
git add test.txt
git commit -m "testing"
git push origin test
As you can see i replaced master with test when pushing to the server

Now 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
Code:
git checkout master
Then we merge the branches
Code:
git merge test
Then at last we push the merge
Code:
git push origin master
Now 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