Note that this won't actually open up the directory as a repository. Start "" "%LOCALAPPDATA%\SourceTree\SourceTree.exe" Command Prompt or PowershellĬreate a file named stree.cmd in your PATH linked directory. You can replace "log" in the last line with "status" if you prefer the changes/working directory view of your repository in SourceTree. $LOCALAPPDATA/SourceTree/SourceTree.exe -f $stree_path log & Git Bash for WindowsĬreate a file named stree ( touch stree) in your PATH linked directory and run chmod u+x stree on this file. You won't have to modify your bash profile for this script. I've placed both these scripts in a folder that is in my system PATH. Īdapting from multiple answers here for Windows, these scripts will allow you to get SourceTree running from command line (tested on SourceTree 3.0.1.7 / Windows 10). The shortest way to open SourceTree when your shell's working directory is a repository's root directory is stree. Now, stree is installed and can be accessed from any directory. If you use it, please report in the comments if and how it works and why you'd prefer it over the symbolic link.įor both methods, the path to stree in SourceTree.app must of course match the location where you installed SourceTree.app. On the above-mentioned issue's page, another workaround that I didn't test was posted: alias stree='/Applications/SourceTree.app/Contents/Resources/stree'. If it does not, then add it to your PATH manually or use echo export PATH='/usr/local/bin:$PATH' > ~/.bash_profile, which does it for you (restart your shell to reload the PATH variable). Make sure that directory is on your path: which stree should result in /usr/local/bin/stree. This will create a symbolic link to the stree binary and put it in /usr/local/bin. Use: ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local/bin/ There is an open issue about this.Ī workaround is found here. The answer by loeschg may not work some people get an error referring to their system logs and cannot install the command line tools.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |