Create a new VCS repository providing github. I have configured the repository in the root directory of the VCS in the teamcity project.
|<Root project> Contains all other projects||Edit|
Created a new branch "feature" and would be modifying the code, once the changes are merged and build is successful then it would automatically merge to the master branch.
Modify the VCS in the "Branch Specification" as +:refs/heads/* which lets the teamcity to check for branches other than the master.
Select "Triggers" and select for auto trigger from the VCS.
Select "Build Features" and select "Automerge changes" in watch build in branch +:feature when new build is created.
Ensure, you have an agent being attached to the VCS to execute the build.