I am new to Git and I have been tasked with setting up Git for a new project. They already have Stash licenses, and I would ideally use that for the back-end repo synchronization and the integrated pull request feature for code reviews.
I just installed SourceTree for Windows as well and it seems slick, a polished client GUI for sure. However, I am a little murky on how best to setup the workflow between stash and sourcetree in regards to Pull Requests.
So just for an example and not intended to represent our future branch structure... say I have a Stash project/repo called master. I then create a local only branch called "test_branch", branched from my local master in SourceTree. I then commit a simple change to my "test_branch", say a new file. So now I have a remote master, local master, and a local test_branch which is one change ahead.
So I am assuming... the "test_branch" MUST be pushed to the remote in a corresponding "test_branch", for a pull request to take place? Or should this work with a local only feature branch to remote master? Anyways say for sake of argument, I push the "test_branch" separately to my stash repo first, and now I have a local and remote "test_branch" that are in sync, and both 1 change ahead of my local and remote master. At this point, if I in the interface choose "Repository->Create Pull Request", and pick "test_branch" as my local branch, and "master" as my remote branch, and then click "Create Pull Request on Web", I would expect it to open up a browser window, launch stash's web interface, and bring up a pull request creation page, with the basic information for the request pre-filled.
Instead, all I get is the main stash page, and on the backend it just pushed my local "test_branch" changes directly to the remote master without asking. It completely ignored my request for a "pull request".
So either I have something configured wrong, or I have a bad assumption about how I should be using the two together. I notice in the "Create Pull Request" form box in SourceTree that it says "Latest commits will be pushed before creating pull request"... that sounds wrong?
As an alternative workflow, is it better and should it be possible, if I instead first merged my local only test_feature branch to my local master, and then create a pull request from my local master to the remote master? From the interface of the pull request in Stash this doesn't seem possible... but somehow this sounds better.
Separate, but nice to know:
Any guides on best practice for using this two together would be great, if anyone has links.
Also does anyone know of any good alternatives to StashBot for integrating Stash with Jenkins seamlessly?