Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I'm still surprised that Sourcetree software advises against behaviour that they seem to advocate for, yours is certainly the correct answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can see the in my first screenshot the command-line pull I ran is: git pull origin second-test Making it identical to what I did in Sourcetree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.