2

I'm using espresso to test my application, and I have to make changes on code through testing. And when I need to pull updates from repository I want to update without affecting testing changes. So I need branch for development and branch for testing with its changes and from test branch I can pull changes from development branch.

Mohammad Alotol
  • 1,409
  • 15
  • 23

1 Answers1

2

It's debatable whether or not source control is the best way to do this, but it can provide a solution.

Create the branch and check it out:

git branch testing
git checkout testing

(or, in one line: git checkout -b testing)

Make your changes for testing and commit them, then switch back to your main branch:

git commit -m "changes for testing"
git checkout master

Later, when you're ready to test again, merge the new code into the testing branch:

git checkout testing
git merge master

When you're done testing, switch back to master:

git checkout master
solarshado
  • 567
  • 5
  • 18
  • Thanks @solarshado , But I have a lot of changes in testing branch, so I will do a lot of effort in merging, to keep testing changes – Mohammad Alotol Jul 31 '16 at 09:26
  • @user1573534 solarshado has the right answer, sorry but for the first time it would be painfule, than useful – piotrek1543 Aug 14 '16 at 23:07