We are quite new to GIT and Sourcetree, and things are going pretty well. Unfortunately for me, I have become one of the go-to guys for when new team members come onboard.
We have a process workflow that works well, but I keep thinking there may be a better (quicker/simpler) way to update feature branches.
Specifically: We never work on develop itself, every bit of work however small is done on it's own branch, and a pull request enforced for merging back to develop (all good so far).
The problem arises when other developers have updated our develop branch, we encourage everyone to update their own feature branches often, and the sequence we show them is:
Is there a way to achieve this in Sourcetree without having to switch branches?
If you want to stay in SourceTree, you can do a fetch (doesn't matter what branch is checked out), then merge directly from the remote develop branch by expanding the >Remotes branch list, and right clicking on that develop (probably origin/develop).
The Pull operation currently performs a Fetch for you, so you'll want to make sure you do this manually since you're using Merge instead of Pull.
+1 for this, I teach our developers to stay in the feature branch, pull/fetch, merge origin/develop into the feature branch and push the merge. Also, most of the time it makes no difference whether they merge often, unless you have a small codebase with many developers. So I would not tell them to merge often.
I'm a CLI guy too, and I'd recommend your guys become so too if possible...
Then generally we rebase our feature branch ("git rebase develop") on top of develop/master, which keeps things nice and clear.
Shameless plug: I wrote a few notes about how we improved our PR process here: http://www.adaptavist.com/w/inside-adaptavists-stash-pull-request-workflow/. What's not in that, I don't think, is we use an event handler to stop people create PRs until they have merged/rebased. This gives us the best likelihood that when people come to review it won't already be conflicted, and that the build will be the same as the one done when merged.
I personally prefer to do this in command line too.
There are couple more options in merge within sourcetree -
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs