Please feel free to improve the scripts, especially the one for Command Prompt. 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. would be done by issuing setx HOME c:Usersadmin on the command line. You can replace "log" in the last line with "status" if you prefer the changes/working directory view of your repository in SourceTree. After you have the key at that location, Git Bash will recognize the key and use. $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. Once configured, plugin will be responsible to authenticate the. Anyway, one could solve my 'original problem' by changing the way SourceTree connects using SSH (from Plink to OpenSSH, see picture below). So I'm stuck (for now) with https for my in-work connections. Now, stree is installed and can be accessed from any directory. It supports all the Git clients like SourceTree, GitKraken, or Command Prompt and Git bash, etc. 2 Answers Sorted by: 2 After some research it seems that BitBucket no longer allows SSH on 443 port (official info in this link ). For Mac, the Custom Actions configuration is located in Preferences > Git. 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. Purpose This article should help users to choose either to use System Git or Sourcetree's Embedded Git Solution Step 1: Locate the Git window For Windows, the Custom Actions configuration is located in Tools > Options > Git. 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 |