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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

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

649 views 0 4
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