Brew Sourcetree



Sourcetree) brewinstall sourcetree;; Spotify) brewinstall spotify;; Sequel Pro) brewinstall sequel-pro;; Visual Studio Code) brewinstall visual-studio-code;;.) echo ' Add $1 to checkbeforeinstall to install additional applications. ';; # # Add the application name to the switch case statement, then pass the cask-name to the brewinstall function # # For example: Skype) brewinstall skype. Switched from apple's git to latest git version using brew added the package-lock.json file to Sourcetree ignores set Sourcetree to use the brew git version instead of the built in on.

  1. Brew Source Crossword
  2. Brew Uninstall Sourcetree
  3. Brew Source China

Question or issue on macOS:

I’m using OSX and want get a svn repo into a local git repo using sourcetree.

When I add a bookmark using sourcetree using SVN URL, thus sourcetree knows it’s a SVN url, but when I click the clone button, it reports an error like following:

I don’t how to get it through. Can anyone give me a pointer on how to do this?

How to solve this problem?

Solution no. 1:

I hit this missing SVN/Core.pm issue recently with el capitain.

Fix I used was from Paul Schreiber’s blog :

Commenters below, say this worked on sierra and high sierra too.

Solution no. 2:

Or, if you don’t have Xcode, just CommandLineTools (this is on ElCapitan 10.11.6):

If you previously linked some older version or just made a mistake so it gives you: File exists, then you should first do

for whichever file was reported as already existent, of course.

EDIT Dir doesn’t exist: (suggested by @rogeriopradoj)

EDIT Sierra:
After upgrading to Sierra I lost CommandLineTools, so I just had to reinstall it and everything was back to normal.
This will prompt you to install just the CommandLineTools, not the whole XCode.

xcode-select --install

Hope this helps someone 🙂

Solution no. 3:

In my case, it is because different versioned perl was installed by brew as dependency of some formula, and override the system’s default version.

So the resolution for me is to relieve the overridden as described following.

when type which perl and perl -v, I find it not the system default version:

which should be v5.18.2 according to the git svn error messages.

I guess it is because the different versioned perl was installed by brew as dependency of some formula, and override the system default version.

Brew Source Crossword

To prove it, try to move /usr/bin before /usr/local/bin in $PATH, then perl was fallback to the system’s default version:

and perl -V list the @INC just satisfy the Can't locate SVN/Core.pm in @INC requirements:

type git svn and everything works well!

Solution no. 4:

Plus to the highest answer,
If you are using souceTree, simply paste command line may not work immediately.
In that case, you may need to check git used in your sourceTree, which should be set as System git.

Solution no. 5:

Xcode 11.4 no longer includes SVN/Core.pm in its Perl bindings!

If you’ve never installed the commandline tools and Xcode 11.4 is the first version you’ve run you will see this issue. Running xcode-select --install returns error: command line tools are already installed, use “Software Update” to install updates, which is accurate but non-obvious that your installed commandline tools differ from what you would get if installed outside of Xcode 11.4. The solution is to first remove these, then install the commandline tools using xcode-select.

Solution no. 6:

Thanks Marko, I did find that on ElCapitan 10.11.3 I had to symlink to a different area. Not sure why, but it works.

Solution no. 7:

I got the same issue on Macos Mojave 10.14.1. Because I used the built-in version of git, and it’s too lower(2.19.0). I fixed it by upgrade git to the latest version(2.21.0), and I found 2.19.1 also has no this issue.

Solution no. 8:

Brew Uninstall Sourcetree

The solution for me was to delete the password entry in the OSX key ring app, and have git svn re-create it. My key entry has been created earlier (by svn I suppose), and it seems that git cannot use this key entry (nor fix it nor add a second one).

The long story: I noticed that when unsing “system git” in SourceTree, there seemed to be a problem storing the credentials. When I entered the same git command (that SourceTree is issuing) on the command-line, git kept prompting me for my password each time.

Then I found https://stackoverflow.com/a/39800112/580672

If you are interested, my setup was:

  • No Xcode, only Command-Line tools (so I adapted the paths as mentioned in a post above ( https://paulschreiber.com/blog/2015/11/09/fixing-git-svn-on-os-x-el-capitan/comment-page-1/#comment-437843 )
  • Homebrew has svn and perl installed
Brew

I had tried with no success:

  • “embedded git” (yields the @INC error)
  • “system git” (different error: “Username: Use of uninitialized value $ret in chomp at /usr/local/Cellar/git/2.21.0/share/perl5/Git.pm line 596.”)
  • put usr/bin in front of my PATH as suggested above
  • force-uninstalled perl in homebrew

All without success. The solution was system git and the key entry, as stated above.

Solution no. 9:

I’ve found that the best solution is to expand the list of directories in @INC using an export

Referenced from: https://perlmaven.com/how-to-change-inc-to-find-perl-modules-in-non-standard-locations

Solution no. 10:

Manage to fix the same issue by changing the first line in /usr/local/Cellar/git/2.29.2/libexec/git-core/git-svn
to
#!/usr/local/bin/perl

Hope this helps!

Install Git on Mac OS X

There are several ways to install Git on a Mac. In fact, if you've installed XCode (or it's Command Line Tools), Git may already be installed. To find out, open a terminal and enter git --version.

Apple actually maintain and ship their own fork of Git, but it tends to lag behind mainstream Git by several major versions. You may want to install a newer version of Git using one of the methods below:

Git for Mac Installer

The easiest way to install Git on a Mac is via the stand-alone installer:

  1. Download the latest Git for Mac installer.

  2. Follow the prompts to install Git.

  3. Open a terminal and verify the installation was successful by typing git --version:

  4. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install Git with Homebrew

If you have installed Homebrew to manage packages on OS X, you can follow these instructions to install Git:

  1. Open your terminal and install Git using Homebrew:

  2. Verify the installation was successful by typing which git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  4. (Optional) To make Git remember your username and password when working with HTTPS repositories, install the git-credential-osxkeychain helper.

Install Git with MacPorts

If you have installed MacPorts to manage packages on OS X, you can follow these instructions to install Git:

  1. Open your terminal and update MacPorts:

  2. Search for the latest available Git ports and variants:

  3. Install Git with bash completion, the OS X keychain helper, and the docs:

  4. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. (Optional) To make Git remember your username and password when working with HTTPS repositories, configure the git-credential-osxkeychain helper.

Install the git-credential-osxkeychain helper

Bitbucket supports pushing and pulling your Git repositories over both SSH and HTTPS. To work with a private repository over HTTPS, you must supply a username and password each time you push or pull. The git-credential-osxkeychain helper allows you to cache your username and password in the OSX keychain, so you don't have to retype it each time.

  1. If you followed the MacPorts or Homebrew instructions above, the helper should already be installed. Otherwise you'll need to download and install it. Open a terminal window and check:

    If you receive a usage statement, skip to step 4. If the helper is not installed, go to step 2.

  2. Use curl to download git-credential-osxkeychain (or download it via your browser) and move it to /usr/local/bin:

  3. Make the file an executable:

  4. Configure git to use the osxkeychain credential helper.

    The next time Git prompts you for a username and password, it will cache them in your keychain for future use.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Mac, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Build Git from source on OS X

Building Git can be a little tricky on Mac due to certain libraries moving around between OS X releases. On El Capitan (OS X 10.11), follow these instructions to build Git:

  1. From your terminal install XCode's Command Line Tools (if you haven't already):

  2. Install Homebrew.

  3. Using Homebrew, install openssl:

  4. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  5. To build Git run make with the following flags:

Install Git on Windows

Git for Windows stand-alone installer

  1. Download the latest Git for Windows installer.

  2. When you've successfully started the installer, you should see the Git Setup wizard screen. Follow the Next and Finish prompts to complete the installation. The default options are pretty sensible for most users.

  3. Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).

  4. Run the following commands to configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

  5. Optional: Install the Git credential helper on Windows

    Bitbucket supports pushing and pulling over HTTP to your remote Git repositories on Bitbucket. Every time you interact with the remote repository, you must supply a username/password combination. You can store these credentials, instead of supplying the combination every time, with the Git Credential Manager for Windows.

Install Git with Atlassian Sourcetree

Sourcetree, a free visual Git client for Windows, comes with its own bundled version of Git. You can download Sourcetree here.

To learn how to use Git with Sourcetree (and how to host your Git repositories on Bitbucket) you can follow our comprehensive Git tutorial with Bitbucket and Sourcetree.

Install Git on Linux

Debian / Ubuntu (apt-get)

Git packages are available via apt:

  1. From your shell, install Git using apt-get:

  2. Verify the installation was successful by typing git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:

Fedora (dnf/yum)

Git packages are available via both yum and dnf:

  1. From your shell, install Git using dnf (or yum, on older versions of Fedora):

    or

  2. Verify the installation was successful by typing git --version:

  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create

Build Git from source on Linux

Debian / Ubuntu

Git requires the several dependencies to build on Linux. These are available via apt:

  1. From your shell, install the necessary dependencies using apt-get:

  2. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  3. To build Git and install it under /usr, run make:

Fedora

Git requires the several dependencies to build on Linux. These are available via both yum and dnf:

  1. From your shell, install the necessary build dependencies using dnf (or yum, on older versions of Fedora):

    or using yum. For yum, you may need to install the Extra Packages for Enterprise Linux (EPEL) repository first:

  2. Symlink docbook2X to the filename that the Git build expects:

  3. Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

  4. To build Git and install it under /usr, run make:

Brew Source China

Next up:

Setting up a repository

Start next tutorial