It's not the same without you
Join the community to find out what other Atlassian users are discussing, debating and creating.
Trying to follow the Feature branch workflow as described by Atlassian at https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow from within Sourcetree. I'm fine up until it comes time to pull the feature branch from origin into master. If I do this in Sourcetree I get the warning: Are you sure you want to pull from a non-tracked branch? If I just do the git pull from the command line everything proceeds without any issues. Is Sourcetree being more strict than my command line git or is it actually doing something different? Here are some screenshots. My feature branch is called second-test.
Screen Shot 2015-06-04 at 10.53.47 PM.png
Screen Shot 2015-06-04 at 10.54.56 PM.png
Additionally, what the warning is trying to tell you is that you are pulling a branch directly from remote, rather than one of your local branches. If the branch is one that you don't have checked-out (tracked) locally, then it's more difficult to review the contents of the branch to be sure you want it merged in.
The tutorial says to use "pull" from remote instead of "merge" (potentially with the local branch) because it "makes sure you’re always pulling the most up-to-date version of the feature branch". If you are merging in a feature branch that you are working on alone, there is no risk of being out-of-date, so you can avoid the warning by merging the local feature branch instead of pulling the remote feature branch.
As you can see I using pull both in Sourcetree and from the command line as the tutorial recommends. The tutorial specifically says to pull in the feature branch from origin which is what I do here. This portion of the tutorial is under "Mary publishes her feature" and the commands described are: git checkout master git pull git pull origin marys-feature git push With the exception of the name of my feature branch I believe I am doing the exact same thing in Sourcetree and it certainly works as expected from the command line. I guess my bottom line is I find it odd that Atlassian wrote a tutorial that their software says is not recommended behaviour.
SourceTree is doing the same thing (you can check the cmd output once you actually run this), but it warns you that you are potentially doing something else than what you wanted. If this is something you repeatedly do, check the "Don't ask me again" checkbox.
I think it is odd that Atlassian wrote a tutorial including behaviour that their software warns against. I'm aware I can make the warnings go away but I want to understand why a workflow they recommend on their website throws warnings in their software. I assumed I missed a trick in Sourcetree early in the workflow but it now seems that is not the case.
Since your current branch is master , when you do a git pull from command line, you are getting the latest from origin/master -> master
But in sourcetree ,assuming that master is still your current branch, you are trying to pull from origin/second-test ->master (as per your screenshot) ,which is why sourcetree gives you that warning.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.
Read moreSupported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...
Connect with like-minded Atlassian users at free events near you!
Find a groupConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.
Start an AUGYou're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.