Why can't sourcetree recognize a git repo from a child directory

I've noticed that if i open SourceTree from below the root git working directory that SourceTree will not recognize that it has an existing bookmark for the repo and offer to create a new local repository. Is my SourceTree misconfigured or is it only able to be launched against the root of the repo? Or maybe there's something with the alias I'm using?

 

Steps (OSX)

  1. Open Terminal
  2. Create an alias like this

    alias st='open -a /Applications/SourceTree.app/Contents/MacOS/SourceTree'

  3. Navigate into the root of a git repo that has at least one folder
  4. Run 'st' and verify there is an existing bookmark and/or create a new one.
  5. Return back to the terminal session
  6. Navigate just one level deep into the repo
  7. Run 'st' and you're prompted to create  new bookmark
  8. "cringe"

Expected behavior:

  • I expect that SourceTree can figure out that I'm in a Git Repo since the actual git CLI tools can do that.. SourceTree should show me the Git Repo...

 

 

1 answer

This widget could not be displayed.

Sounds like unusual SourceTree usage to me, but I can't think of any reason you shouldn't be able to use it that way. My guess is nobody's ever noticed that particular bug.

If you file a bug report at jira.atlassian.com, I imagine it could be addressed in the next version or two (I'm just a user though, so don't take that as any sort of commitment).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

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...

877 views 2 3
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you