You can use this icon in React, Ruby, or Jekyll. Here are code examples for each:
<GitCompareIcon size={24} />
<%= render(Primer::Beta::Octicon.new(:"git-compare", size: :medium)) %>
{% octicon git-compare height:24 %}