about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/version-management/git-and-tools
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/version-management/git-and-tools')
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile2
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix66
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/bump2version/default.nix31
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix80
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix80
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix228
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix48
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gh/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix17
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix20
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-dbx/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-utils/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix54
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-codereview/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix55
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile4
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix21
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix60
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-gone/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix44
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-interactive-rebase-tool/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-machete/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-my/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix36
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-standup/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix58
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix45
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix33
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix29
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix348
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch38
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch28
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch23
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch13
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch26
-rwxr-xr-xnixpkgs/pkgs/applications/version-management/git-and-tools/git/update.sh19
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix23
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gita/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/deps.nix543
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix41
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix21
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitui/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix43
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/legit/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix25
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/deps.nix273
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix35
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/shards.nix8
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix55
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix49
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/helper-scripts_depspathprefix.patch37
97 files changed, 4475 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix
new file mode 100644
index 000000000000..b225782f2864
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchurl, jre, makeWrapper }:
+
+let
+  version = "1.13.0";
+  jarName = "bfg-${version}.jar";
+  mavenUrl = "http://central.maven.org/maven2/com/madgag/bfg/${version}/${jarName}";
+in
+  stdenv.mkDerivation {
+    inherit version jarName;
+
+    name = "bfg-repo-cleaner-${version}";
+
+    src = fetchurl {
+      url = mavenUrl;
+      sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz";
+    };
+
+    buildInputs = [ jre makeWrapper ];
+
+    phases = "installPhase";
+
+    installPhase = ''
+      mkdir -p $out/share/java
+      mkdir -p $out/bin
+      cp $src $out/share/java/$jarName
+      makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = "https://rtyley.github.io/bfg-repo-cleaner/";
+      # Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
+      description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
+      longDescription = ''
+        The BFG is a simpler, faster alternative to git-filter-branch for
+        cleansing bad data out of your Git repository history, in particular removing
+        crazy big files and removing passwords, credentials, and other private data.
+
+        The git-filter-branch command is enormously powerful and can do things
+        that the BFG can't - but the BFG is much better for the tasks above, because
+        it's faster (10-720x), simpler (dedicated to just removing things), and
+        beautiful (can use Scala instead of bash to script customizations).
+      '';
+      license = licenses.gpl3;
+      maintainers = [ maintainers.changlinli ];
+      platforms = platforms.unix;
+      downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";
+    };
+
+  }
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile
new file mode 100644
index 000000000000..8ed325154711
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'atlassian-stash'
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock
new file mode 100644
index 000000000000..27a6e2c8dd03
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/Gemfile.lock
@@ -0,0 +1,27 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    addressable (2.5.0)
+      public_suffix (~> 2.0, >= 2.0.2)
+    atlassian-stash (0.7.0)
+      commander (~> 4.1.2)
+      git (>= 1.2.5)
+      json (>= 1.7.5)
+      launchy (~> 2.4.2)
+    commander (4.1.6)
+      highline (~> 1.6.11)
+    git (1.3.0)
+    highline (1.6.21)
+    json (2.0.2)
+    launchy (2.4.3)
+      addressable (~> 2.3)
+    public_suffix (2.0.5)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  atlassian-stash
+
+BUNDLED WITH
+   2.1.4
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix
new file mode 100644
index 000000000000..68edb8503bfc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/default.nix
@@ -0,0 +1,21 @@
+{ lib, bundlerEnv, ruby, bundlerUpdateScript }:
+
+bundlerEnv rec {
+  name = "bitbucket-server-cli-${version}";
+
+  version = (import ./gemset.nix).atlassian-stash.version;
+  inherit ruby;
+  gemdir = ./.;
+
+  pname = "atlassian-stash";
+
+  passthru.updateScript = bundlerUpdateScript "gitAndTools.bitbucket-server-cli";
+
+  meta = with lib; {
+    description = "A command line interface to interact with BitBucket Server (formerly Atlassian Stash)";
+    homepage    = "https://bitbucket.org/atlassian/bitbucket-server-cli";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ jgertm nicknovitski ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix
new file mode 100644
index 000000000000..a7c1406665e7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bitbucket-server-cli/gemset.nix
@@ -0,0 +1,66 @@
+{
+  addressable = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1j5r0anj8m4qlf2psnldip4b8ha2bsscv11lpdgnfh4nnchzjnxw";
+      type = "gem";
+    };
+    version = "2.5.0";
+  };
+  atlassian-stash = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1rsf9h5w5wiglwv0fqwp45fq06fxbg68cqkc3bpqvps1i1qm0p6i";
+      type = "gem";
+    };
+    version = "0.7.0";
+  };
+  commander = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0x9i8hf083wjlgj09nl1p9j8sr5g7amq0fdmxjqs4cxdbg3wpmsb";
+      type = "gem";
+    };
+    version = "4.1.6";
+  };
+  git = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3";
+      type = "gem";
+    };
+    version = "1.3.0";
+  };
+  highline = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "06bml1fjsnrhd956wqq5k3w8cyd09rv1vixdpa3zzkl6xs72jdn1";
+      type = "gem";
+    };
+    version = "1.6.21";
+  };
+  json = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1lhinj9vj7mw59jqid0bjn2hlfcnq02bnvsx9iv81nl2han603s0";
+      type = "gem";
+    };
+    version = "2.0.2";
+  };
+  launchy = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "190lfbiy1vwxhbgn4nl4dcbzxvm049jwc158r2x7kq3g5khjrxa2";
+      type = "gem";
+    };
+    version = "2.4.3";
+  };
+  public_suffix = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "040jf98jpp6w140ghkhw2hvc1qx41zvywx5gj7r2ylr1148qnj7q";
+      type = "gem";
+    };
+    version = "2.0.5";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/bump2version/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/bump2version/default.nix
new file mode 100644
index 000000000000..69b44625f95a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bump2version/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, isPy27, pytest, testfixtures, lib }:
+
+buildPythonApplication rec {
+  pname = "bump2version";
+  version = "1.0.0";
+  disabled = isPy27;
+
+  src = fetchFromGitHub {
+    owner = "c4urself";
+    repo = "${pname}";
+    rev = "refs/tags/v${version}";
+    sha256 = "10p7rg569rk3qvzs5kjj17894bqlsg3ihhbln6ciwwfhkfq1kpja";
+  };
+
+  checkInputs = [ pytest testfixtures ];
+  # X's in pytest are git tests which won't run in sandbox
+  checkPhase = ''
+    pytest tests/ -k 'not usage_string_fork'
+  ''; 
+
+  meta = with stdenv.lib; {
+    description = "Version-bump your software with a single command";
+    longDescription = ''
+      A small command line tool to simplify releasing software by updating 
+      all version strings in your source code by the correct increment.
+    '';
+    homepage = "https://github.com/c4urself/bump2version";
+    license = licenses.mit;
+    maintainers = with maintainers; [ jefflabonte ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix
new file mode 100644
index 000000000000..8debc642b457
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt
+, docbook_xsl, pkgconfig, luajit
+, coreutils, gnused, groff, docutils
+, gzip, bzip2, lzip, xz, zstd
+, python, wrapPython, pygments, markdown
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cgit";
+  version = "1.2.3";
+
+  src = fetchurl {
+    url = "https://git.zx2c4.com/cgit/snapshot/${pname}-${version}.tar.xz";
+    sha256 = "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss";
+  };
+
+  # cgit is tightly coupled with git and needs a git source tree to build.
+  # IMPORTANT: Remember to check which git version cgit needs on every version
+  # bump (look for "GIT_VER" in the top-level Makefile).
+  gitSrc = fetchurl {
+    url    = "mirror://kernel/software/scm/git/git-2.25.1.tar.xz";
+    sha256 = "09lzwa183nblr6l8ib35g2xrjf9wm9yhk3szfvyzkwivdv69c9r2";
+  };
+
+  nativeBuildInputs = [ pkgconfig ] ++ [ python wrapPython ];
+  buildInputs = [
+    openssl zlib asciidoc libxml2 libxslt docbook_xsl luajit
+  ];
+  pythonPath = [ pygments markdown ];
+
+  postPatch = ''
+    sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \
+        -e 's|"bzip2"|"${bzip2.bin}/bin/bzip2"|' \
+        -e 's|"lzip"|"${lzip}/bin/lzip"|' \
+        -e 's|"xz"|"${xz.bin}/bin/xz"|' \
+        -e 's|"zstd"|"${zstd}/bin/zstd"|' \
+        -i ui-snapshot.c
+
+    substituteInPlace filters/html-converters/man2html \
+      --replace 'groff' '${groff}/bin/groff'
+
+    substituteInPlace filters/html-converters/rst2html \
+      --replace 'rst2html.py' '${docutils}/bin/rst2html.py'
+  '';
+
+  # Give cgit a git source tree and pass configuration parameters (as make
+  # variables).
+  preBuild = ''
+    mkdir -p git
+    tar --strip-components=1 -xf "$gitSrc" -C git
+
+    makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/")
+  '';
+
+  # Install manpage.
+  postInstall = ''
+    # xmllint fails:
+    #make install-man
+
+    # bypassing xmllint works:
+    a2x --no-xmllint -f manpage cgitrc.5.txt
+    mkdir -p "$out/share/man/man5"
+    cp cgitrc.5 "$out/share/man/man5"
+
+    wrapPythonProgramsIn "$out/lib/cgit/filters" "$out $pythonPath"
+
+    for script in $out/lib/cgit/filters/*.sh $out/lib/cgit/filters/html-converters/txt2html; do
+      wrapProgram $script --prefix PATH : '${stdenv.lib.makeBinPath [ coreutils gnused ]}'
+    done
+  '';
+
+  meta = {
+    homepage = "https://git.zx2c4.com/cgit/about/";
+    repositories.git = "git://git.zx2c4.com/cgit";
+    description = "Web frontend for git repositories";
+    license = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ bjornfor ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
new file mode 100644
index 000000000000..22d289d549af
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchgit, ruby, gnugrep, diffutils, git, darcs }:
+
+stdenv.mkDerivation {
+  pname = "darcs-to-git";
+  version = "2015-06-04";
+
+  src = fetchgit {
+    url = "git://github.com/purcell/darcs-to-git.git";
+    rev = "e5fee32495908fe0f7d700644c7b37347b7a0a5b";
+    sha256 = "0lxcx0x0m1cv2j4x9ykpjf6r2zg6lh5rya016x93vkmlzxm3f0ji";
+  };
+
+  patchPhase = let
+    matchExecution = ''(\<(output_of|system|run)\([^"%]*("|%w\()|^[^"`]*`)'';
+  in ''
+    sed -r -i \
+      -e '1s|^#!.*|#!${ruby}/bin/ruby|' \
+      -e 's!${matchExecution}git\>!\1${git}/bin/git!' \
+      -e 's!${matchExecution}darcs\>!\1${darcs}/bin/darcs!' \
+      -e 's!${matchExecution}diff\>!\1${diffutils}/bin/diff!' \
+      -e 's!\<egrep\>!${gnugrep}/bin/egrep!g' \
+      -e 's!%w\(darcs init\)!%w(${darcs}/bin/darcs init)!' \
+      darcs-to-git
+  '';
+
+  installPhase = ''
+    install -vD darcs-to-git "$out/bin/darcs-to-git"
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    orig_dir="$(pwd)"
+    darcs_repos="$(pwd)/darcs_test_repos"
+    git_repos="$(pwd)/git_test_repos"
+    test_home="$(pwd)/test_home"
+    mkdir "$darcs_repos" "$git_repos" "$test_home"
+    cd "$darcs_repos"
+    ${darcs}/bin/darcs init
+    echo "this is a test file" > new_file1
+    ${darcs}/bin/darcs add new_file1
+    HOME="$test_home" ${darcs}/bin/darcs record -a -m c1 -A none
+    echo "testfile1" > new_file1
+    echo "testfile2" > new_file2
+    ${darcs}/bin/darcs add new_file2
+    HOME="$test_home" ${darcs}/bin/darcs record -a -m c2 -A none
+    ${darcs}/bin/darcs mv new_file2 only_one_file
+    rm -f new_file1
+    HOME="$test_home" ${darcs}/bin/darcs record -a -m c3 -A none
+    cd "$git_repos"
+    HOME="$test_home" PATH= "$orig_dir/darcs-to-git" "$darcs_repos"
+    assertFileContents() {
+      echo -n "File $1 contains '$2'..." >&2
+      if [ "x$(cat "$1")" = "x$2" ]; then
+        echo " passed." >&2
+        return 0
+      else
+        echo " failed: '$(cat "$1")' != '$2'" >&2
+        return 1
+      fi
+    }
+    echo "Checking if converted repository matches original repository:" >&2
+    assertFileContents only_one_file testfile2
+    ${git}/bin/git reset --hard HEAD^
+    assertFileContents new_file1 testfile1
+    assertFileContents new_file2 testfile2
+    ${git}/bin/git reset --hard HEAD^
+    assertFileContents new_file1 "this is a test file"
+    echo "All checks passed." >&2
+    cd "$orig_dir"
+    rm -rf "$darcs_repos" "$git_repos" "$test_home"
+  '';
+
+  meta = {
+    description = "Converts a Darcs repository into a Git repository";
+    homepage = "http://www.sanityinc.com/articles/converting-darcs-repositories-to-git";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix
new file mode 100644
index 000000000000..c591ef554ee4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/default.nix
@@ -0,0 +1,228 @@
+/* All git-relates tools live here, in a separate attribute set so that users
+ * can get a fast overview over what's available.
+ */
+args @ {config, lib, pkgs}: with args; with pkgs;
+let
+  gitBase = callPackage ./git {
+    svnSupport = false;         # for git-svn support
+    guiSupport = false;         # requires tcl/tk
+    sendEmailSupport = false;   # requires plenty of perl libraries
+    perlLibs = [perlPackages.LWP perlPackages.URI perlPackages.TermReadKey];
+    smtpPerlLibs = [
+      perlPackages.libnet perlPackages.NetSMTPSSL
+      perlPackages.IOSocketSSL perlPackages.NetSSLeay
+      perlPackages.AuthenSASL perlPackages.DigestHMAC
+    ];
+  };
+
+  self = rec {
+  # Try to keep this generally alphabetized
+
+  bfg-repo-cleaner = callPackage ./bfg-repo-cleaner { };
+
+  bitbucket-server-cli = callPackage ./bitbucket-server-cli { };
+
+  bump2version = pkgs.python37Packages.callPackage ./bump2version { };
+
+  darcs-to-git = callPackage ./darcs-to-git { };
+
+  delta = callPackage ./delta { };
+
+  diff-so-fancy = callPackage ./diff-so-fancy { };
+
+  gh = callPackage ./gh { };
+
+  ghq = callPackage ./ghq { };
+
+  git = appendToName "minimal" gitBase;
+
+  git-absorb = callPackage ./git-absorb {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  git-annex = pkgs.haskellPackages.git-annex;
+
+  git-annex-metadata-gui = libsForQt5.callPackage ./git-annex-metadata-gui {
+    inherit (python3Packages) buildPythonApplication pyqt5 git-annex-adapter;
+  };
+
+  git-annex-remote-b2 = callPackage ./git-annex-remote-b2 { };
+
+  git-annex-remote-dbx = callPackage ./git-annex-remote-dbx {
+    inherit (python3Packages)
+    buildPythonApplication
+    fetchPypi
+    dropbox
+    annexremote
+    humanfriendly;
+  };
+
+  git-annex-remote-rclone = callPackage ./git-annex-remote-rclone { };
+
+  git-annex-utils = callPackage ./git-annex-utils { };
+
+  git-appraise = callPackage ./git-appraise {};
+
+  git-bug = callPackage ./git-bug { };
+
+  # support for bugzilla
+  git-bz = callPackage ./git-bz { };
+
+  git-cinnabar = callPackage ./git-cinnabar { };
+
+  git-codeowners = callPackage ./git-codeowners { };
+
+  git-codereview = callPackage ./git-codereview { };
+
+  git-cola = callPackage ./git-cola { };
+
+  git-crypt = callPackage ./git-crypt { };
+
+  git-dit = callPackage ./git-dit {
+    inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
+  };
+
+  git-extras = callPackage ./git-extras { };
+
+  git-fame = callPackage ./git-fame {};
+
+  git-fast-export = callPackage ./fast-export { };
+
+  git-filter-repo = callPackage ./git-filter-repo {
+    pythonPackages = python3Packages;
+  };
+
+  git-gone = callPackage ./git-gone {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  git-hub = callPackage ./git-hub { };
+
+  git-ignore = callPackage ./git-ignore { };
+
+  git-imerge = callPackage ./git-imerge { };
+
+  git-interactive-rebase-tool = callPackage ./git-interactive-rebase-tool {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  git-machete = python3Packages.callPackage ./git-machete { };
+
+  git-my = callPackage ./git-my { };
+
+  git-octopus = callPackage ./git-octopus { };
+
+  git-open = callPackage ./git-open { };
+
+  git-radar = callPackage ./git-radar { };
+
+  git-recent = callPackage ./git-recent {
+    utillinux = if stdenv.isLinux then utillinuxMinimal else utillinux;
+  };
+
+  git-remote-gcrypt = callPackage ./git-remote-gcrypt { };
+
+  git-remote-hg = callPackage ./git-remote-hg { };
+
+  git-reparent = callPackage ./git-reparent { };
+
+  git-secret = callPackage ./git-secret { };
+
+  git-secrets = callPackage ./git-secrets { };
+
+  git-standup = callPackage ./git-standup { };
+
+  git-stree = callPackage ./git-stree { };
+
+  git-subrepo = callPackage ./git-subrepo { };
+
+  git-subtrac = callPackage ./git-subtrac { };
+
+  git-sync = callPackage ./git-sync { };
+
+  git-test = callPackage ./git-test { };
+
+  git-trim = callPackage ./git-trim {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  git-workspace = callPackage ./git-workspace {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  git2cl = callPackage ./git2cl { };
+
+  # The full-featured Git.
+  gitFull = gitBase.override {
+    svnSupport = true;
+    guiSupport = true;
+    sendEmailSupport = true;
+    withLibsecret = !stdenv.isDarwin;
+  };
+
+  # Git with SVN support, but without GUI.
+  gitSVN = lowPrio (appendToName "with-svn" (gitBase.override {
+    svnSupport = true;
+  }));
+
+  gita = python3Packages.callPackage ./gita {};
+
+  gitbatch = callPackage ./gitbatch { };
+
+  gitflow = callPackage ./gitflow { };
+
+  gitstatus = callPackage ./gitstatus { };
+
+  gitui = callPackage ./gitui {
+    inherit (darwin.apple_sdk.frameworks) Security;
+  };
+
+  grv = callPackage ./grv { };
+
+  hub = callPackage ./hub { };
+
+  lab = callPackage ./lab { };
+
+  lefthook = callPackage ./lefthook { };
+
+  legit = callPackage ./legit { };
+
+  pass-git-helper = python3Packages.callPackage ./pass-git-helper { };
+
+  pre-commit = pkgs.python3Packages.toPythonApplication pkgs.python3Packages.pre-commit;
+
+  qgit = qt5.callPackage ./qgit { };
+
+  scmpuff = callPackage ./scmpuff { };
+
+  stgit = callPackage ./stgit { };
+
+  subgit = callPackage ./subgit { };
+
+  svn-all-fast-export = libsForQt5.callPackage ./svn-all-fast-export { };
+
+  svn2git = callPackage ./svn2git {
+    git = gitSVN;
+  };
+
+  thicket = callPackage ./thicket { };
+
+  tig = callPackage ./tig { };
+
+  top-git = callPackage ./topgit { };
+
+  transcrypt = callPackage ./transcrypt { };
+
+  ydiff = pkgs.python3.pkgs.toPythonApplication pkgs.python3.pkgs.ydiff;
+
+} // lib.optionalAttrs (config.allowAliases or true) (with self; {
+  # aliases
+  darcsToGit = darcs-to-git;
+  gitAnnex = git-annex;
+  gitFastExport = git-fast-export;
+  gitRemoteGcrypt = git-remote-gcrypt;
+  svn_all_fast_export = svn-all-fast-export;
+  topGit = top-git;
+});
+in
+  self
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
new file mode 100644
index 000000000000..60950dc0465c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
@@ -0,0 +1,32 @@
+{ lib, fetchFromGitHub, rustPlatform, llvmPackages, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "delta";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "dandavison";
+    repo = pname;
+    rev = version;
+    sha256 = "1b5ap468d0gvgwkx6wqxvayzda2xw95lymd0kl38nq1fc0ica6hk";
+  };
+
+  LLVM_CONFIG_PATH = "${llvmPackages.llvm}/bin/llvm-config";
+  LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
+
+  cargoSha256 = "07mjl751r9d88fnmnan0ip0m3vxqf51vq2y7k3g3yywcgasj9jgr";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --bash --name delta.bash completion/bash/completion.sh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/dandavison/delta";
+    description = "A syntax-highlighting pager for git";
+    changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ marsam ma27 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
new file mode 100644
index 000000000000..c073edaee7d8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
@@ -0,0 +1,48 @@
+{stdenv, git, perl, ncurses, coreutils, fetchFromGitHub, makeWrapper, ...}:
+
+stdenv.mkDerivation rec {
+  pname = "diff-so-fancy";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "so-fancy";
+    repo = "diff-so-fancy";
+    rev = "v${version}";
+    sha256 = "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl";
+  };
+
+  # Perl is needed here for patchShebangs
+  nativeBuildInputs = [ perl makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib/diff-so-fancy
+
+    # diff-so-fancy executable searches for it's library relative to
+    # itself, so we are copying executable to lib, and only symlink it
+    # from bin/
+    cp diff-so-fancy $out/lib/diff-so-fancy
+    cp -r lib $out/lib/diff-so-fancy
+    ln -s $out/lib/diff-so-fancy/diff-so-fancy $out/bin
+
+    # ncurses is needed for `tput`
+    wrapProgram $out/lib/diff-so-fancy/diff-so-fancy \
+      --prefix PATH : "${git}/share/git/contrib/diff-highlight" \
+      --prefix PATH : "${git}/bin" \
+      --prefix PATH : "${coreutils}/bin" \
+      --prefix PATH : "${ncurses.out}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/so-fancy/diff-so-fancy";
+    description = "Good-looking diffs filter for git";
+    license = licenses.mit;
+    platforms = platforms.all;
+    longDescription = ''
+      diff-so-fancy builds on the good-lookin' output of git contrib's
+      diff-highlight to upgrade your diffs' appearances.
+    '';
+    maintainers = with maintainers; [ fpletz globin ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix
new file mode 100644
index 000000000000..22009f10d44f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix
@@ -0,0 +1,42 @@
+{stdenv, fetchgit, mercurial, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "fast-export";
+  version = "190107";
+
+  src = fetchgit {
+    url = "git://repo.or.cz/fast-export.git";
+    rev = "v${version}";
+    sha256 = "14azfps9jd5anivcvfwflgsvqdyy6gm9jy284kzx2ng9f7871d14";
+  };
+
+  buildInputs = [mercurial.python mercurial makeWrapper];
+
+  installPhase = ''
+    binPath=$out/bin
+    libexecPath=$out/libexec/${pname}
+    sitepackagesPath=$out/${mercurial.python.sitePackages}
+    mkdir -p $binPath $libexecPath $sitepackagesPath
+
+    # Patch shell scripts so they can execute the Python scripts
+    sed -i "s|ROOT=.*|ROOT=$libexecPath|" *.sh
+
+    mv hg-fast-export.sh hg-reset.sh $binPath
+    mv hg-fast-export.py hg-reset.py $libexecPath
+    mv hg2git.py pluginloader plugins $sitepackagesPath
+
+    for script in $out/bin/*.sh; do
+      wrapProgram $script \
+        --prefix PATH : "${mercurial.python}/bin":$libexec \
+        --prefix PYTHONPATH : "${mercurial}/${mercurial.python.sitePackages}":$sitepackagesPath
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Import mercurial into git";
+    homepage = "https://repo.or.cz/w/fast-export.git";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.koral ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gh/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gh/default.nix
new file mode 100644
index 000000000000..597e0672073b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gh/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
+
+buildGoModule rec {
+  pname = "gh";
+  version = "0.7.0";
+
+  src = fetchFromGitHub {
+    owner = "cli";
+    repo = "cli";
+    rev = "v${version}";
+    sha256 = "054mag8jgxkvx2f95ha10n45v4xv5lms69w76g95z18m62qhjcyl";
+  };
+
+  modSha256 = "0v33x9bnwjfg4425vralnsb4i22c0g1rcmaga9911v0i7d51k0fn";
+
+  buildFlagsArray = [
+    "-ldflags=-s -w -X github.com/cli/cli/command.Version=${version}"
+  ];
+
+  subPackages = [ "cmd/gh" ];
+
+  nativeBuildInputs = [ installShellFiles ];
+  postInstall = ''
+    for shell in bash fish zsh; do
+      $out/bin/gh completion -s $shell > gh.$shell
+      installShellCompletion gh.$shell
+    done
+  '';
+
+  meta = with lib; {
+    description = "GitHub CLI tool";
+    homepage = "https://cli.github.com/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ zowoq ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix
new file mode 100644
index 000000000000..f9d8eab8e55a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "ghq";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "x-motemen";
+    repo = "ghq";
+    rev = "v${version}";
+    sha256 = "1i0q9lxdxbyj0l0510cbkwkbycawrx8cxlbdrhb2p2fnk0vqnyiv";
+  };
+
+  modSha256 = "0hlbhky3c6zva9khn73n6xgq57k5p8anskxy3g2m0wzhr72cyc41";
+
+  buildFlagsArray = ''
+    -ldflags=
+      -X=main.Version=${version}
+  '';
+
+  postInstall = ''
+    install -m 444 -D ${src}/misc/zsh/_ghq $out/share/zsh/site-functions/_ghq
+    install -m 444 -D ${src}/misc/bash/_ghq $out/share/bash-completion/completions/_ghq
+  '';
+
+  meta = {
+    description = "Remote repository management made easy";
+    homepage = "https://github.com/x-motemen/ghq";
+    maintainers = with stdenv.lib.maintainers; [ sigma ];
+    license = stdenv.lib.licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
new file mode 100644
index 000000000000..3f5cbad4c12f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-absorb";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner  = "tummychow";
+    repo   = pname;
+    rev    = "refs/tags/${version}";
+    sha256 = "0lggv3knh6iglkh8x2zqvqcs3dlwfsdiclg7pmdrycny72la4k2j";
+  };
+
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  cargoSha256 = "13gikjswbb0kkpvb5zhj88qq5l667624gkfb7hd3zygh4qyhsy05";
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/tummychow/git-absorb";
+    description = "git commit --fixup, but automatic";
+    license = [ licenses.bsd3 ];
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix
new file mode 100644
index 000000000000..ad07a3dba3c8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, pyqt5, git-annex-adapter }:
+
+buildPythonApplication rec {
+  pname = "git-annex-metadata-gui";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "alpernebbi";
+    repo = "git-annex-metadata-gui";
+    rev = "v${version}";
+    sha256 = "03kch67k0q9lcs817906g864wwabkn208aiqvbiyqp1qbg99skam";
+  };
+
+  prePatch = ''
+    substituteInPlace setup.py --replace "'PyQt5', " ""
+  '';
+
+  propagatedBuildInputs = [ pyqt5 git-annex-adapter ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/alpernebbi/git-annex-metadata-gui";
+    description = "Graphical interface for git-annex metadata commands";
+    maintainers = with maintainers; [ dotlambda ];
+    license = licenses.gpl3Plus;
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix
new file mode 100644
index 000000000000..55a9dd18f720
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix
@@ -0,0 +1,17 @@
+{ stdenv, buildGoPackage, fetchgit }:
+
+buildGoPackage rec {
+  pname = "git-annex-remote-b2";
+  version = "20151212-${stdenv.lib.strings.substring 0 7 rev}";
+  rev = "4db46b9fc9ef7b3f4851c2a6b061cb8f90f553ba";
+
+  goPackagePath = "github.com/encryptio/git-annex-remote-b2";
+
+  src = fetchgit {
+    inherit rev;
+    url = "https://github.com/encryptio/git-annex-remote-b2";
+    sha256 = "1139rzdvlj3hanqsccfinprvrzf4qjc5n4f0r21jp9j24yhjs6j2";
+  };
+
+  goDeps = ./deps.nix;
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix
new file mode 100644
index 000000000000..479b3e7d6372
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/deps.nix
@@ -0,0 +1,20 @@
+[
+  {
+    goPackagePath = "github.com/pquerna/ffjson";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pquerna/ffjson";
+      rev = "674bc015b5b3f50f9bb2561179778586b9af68c5";
+      sha256 = "0l53q7b1g25hfjm1iyynfs413rpav4c51yvdr244ivw1x3hksa7a";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/kothar/go-backblaze.v0";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/kothar/go-backblaze.v0";
+      rev = "373819725fc560fa962c6cd883b533d2ebec4844";
+      sha256 = "1kmlwfnnfd4h46bb9pz2gw1hxqm1pzkwvidfmnc0zkrilaywk6fx";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-dbx/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-dbx/default.nix
new file mode 100644
index 000000000000..addfd1f5041b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-dbx/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, buildPythonApplication
+, fetchPypi
+, dropbox
+, annexremote
+, humanfriendly
+}:
+
+buildPythonApplication rec {
+  pname = "git-annex-remote-dbx";
+  version = "1.0.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "5b6f8025ed1e9877f06882ddbd81f701a8e094647ab97595e2afc09016835a7c";
+  };
+
+  propagatedBuildInputs = [ dropbox annexremote humanfriendly ];
+
+  meta = with lib; {
+    description = "A git-annex special remote for Dropbox";
+    homepage = "https://pypi.org/project/git-annex-remote-dbx/";
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix
new file mode 100644
index 000000000000..260e8024a8cc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, rclone, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "git-annex-remote-rclone";
+  version = "0.6";
+  rev = "v${version}";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "DanielDent";
+    repo = "git-annex-remote-rclone";
+    sha256 = "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-annex-remote-rclone $out/bin
+    wrapProgram "$out/bin/git-annex-remote-rclone" \
+      --prefix PATH ":" "${stdenv.lib.makeBinPath [ rclone ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/DanielDent/git-annex-remote-rclone";
+    description = "Use rclone supported cloud storage providers with git-annex";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.montag451 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-utils/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-utils/default.nix
new file mode 100644
index 000000000000..bcfc33e55e4c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-utils/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchgit, autoconf, automake, libtool, gmp }:
+
+stdenv.mkDerivation rec {
+  pname = "git-annex-utils";
+  version = "0.04-3-g531bb33";
+  src = fetchgit {
+    url = "http://git.mysteryvortex.com/repositories/git-annex-utils.git";
+    rev = "531bb33";
+    sha256 = "1sv7s2ykc840cjwbfn7ayy743643x9i1lvk4cd55w9l052xvzj65";
+  };
+  buildInputs = [ autoconf automake libtool gmp ];
+  preConfigure = "./autogen.sh";
+
+  meta = {
+    description = "gadu, a du like utility for annexed files";
+    longDescription = ''
+      This is a set of utilities that are handy to use with git-annex repositories.
+      Currently there is only one utility gadu, a du like utility for annexed files.
+    '';
+    homepage = "http://git-annex.mysteryvortex.com/git-annex-utils.html";
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = with stdenv.lib.maintainers; [ woffs ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix
new file mode 100644
index 000000000000..7796f08c8a46
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  pname = "git-appraise-unstable";
+  version = "2018-02-26";
+  rev = "2414523905939525559e4b2498c5597f86193b61";
+
+  goPackagePath = "github.com/google/git-appraise";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "google";
+    repo = "git-appraise";
+    sha256 = "04xkp1jpas1dfms6i9j09bgkydih0q10nhwn75w9ds8hi2qaa3sa";
+  };
+
+  meta = {
+    description = "Distributed code review system for Git repos";
+    homepage = "https://github.com/google/git-appraise";
+    license = stdenv.lib.licenses.asl20;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.vdemeester ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix
new file mode 100644
index 000000000000..cd35c98a9696
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix
@@ -0,0 +1,30 @@
+{ fetchFromGitHub, python2Packages, stdenv, git, graphviz }:
+
+python2Packages.buildPythonApplication rec {
+  pname = "git-big-picture";
+  version = "0.10.1";
+
+  src = fetchFromGitHub {
+    owner = "esc";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0b0zdq7d7k7f6p3wwc799347fraphbr20rxd1ysnc4xi1cj4wpmi";
+  };
+
+  buildInputs = [ git graphviz ];
+
+  checkInputs = [ git ];
+
+  postFixup = ''
+    wrapProgram $out/bin/git-big-picture \
+      --prefix PATH ":" ${ stdenv.lib.makeBinPath buildInputs  }
+    '';
+
+  meta = {
+    description = "Tool for visualization of Git repositories";
+    homepage = "https://github.com/esc/git-big-picture";
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nthorne ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix
new file mode 100644
index 000000000000..3ca25d6cf13e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "git-bug";
+  version = "0.7.1"; # the `rev` below pins the version of the source to get
+  rev = "2d64b85db71a17ff3277bbbf7ac9d8e81f8e416c";
+  goPackagePath = "github.com/MichaelMure/git-bug";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "MichaelMure";
+    repo = "git-bug";
+    sha256 = "01ab3mlwh5g1vr3x85fppflg18gb8ip9mjfsp2b5rfigd9lxyyns";
+  };
+
+  modSha256 = "05wxvzsbhvz15596019vs7h09kynfsfjx3i5xyrl5xjzdxbaqbrq";
+
+  buildFlagsArray = ''
+    -ldflags=
+      -X ${goPackagePath}/commands.GitCommit=${rev}
+      -X ${goPackagePath}/commands.GitLastTag=${version}
+      -X ${goPackagePath}/commands.GitExactTag=${version}
+  '';
+
+  postInstall = ''
+    install -D -m 0644 misc/bash_completion/git-bug "$out/etc/bash_completion.d/git-bug"
+    install -D -m 0644 misc/zsh_completion/git-bug "$out/share/zsh/site-functions/git-bug"
+    install -D -m 0644 -t "$out/share/man/man1" doc/man/*
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Distributed bug tracker embedded in Git";
+    homepage = "https://github.com/MichaelMure/git-bug";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ royneary ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix
new file mode 100644
index 000000000000..7f199894924e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchgit
+, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, makeWrapper, xmlto
+, pythonPackages }:
+
+stdenv.mkDerivation {
+  pname = "git-bz";
+  version = "3.2015-09-08";
+
+  src = fetchgit {
+    sha256 = "146z57m8nblgsxm4z6qnsvcy81p11d0w88v93ybacc6w21plh8hc";
+    rev = "e17bbae7a2ce454d9f69c32fc40066995d44913d";
+    url = "git://git.fishsoup.net/git-bz";
+  };
+
+  nativeBuildInputs = [
+    asciidoc docbook_xml_dtd_45 docbook_xsl libxslt makeWrapper xmlto
+  ];
+  buildInputs = []
+    ++ (with pythonPackages; [ python pysqlite ]);
+
+  postPatch = ''
+    patchShebangs configure
+
+    # Don't create a .html copy of the man page that isn't installed anyway:
+    substituteInPlace Makefile --replace "git-bz.html" ""
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/git-bz \
+      --prefix PYTHONPATH : "$(toPythonPath "${pythonPackages.pycrypto}")" \
+      --prefix PYTHONPATH : "$(toPythonPath "${pythonPackages.pysqlite}")"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Bugzilla integration for git";
+    longDescription = ''
+      git-bz is a tool for integrating the Git command line with the
+      Bugzilla bug-tracking system. Operations such as attaching patches to
+      bugs, applying patches in bugs to your current tree, and closing bugs
+      once you've pushed the fixes publicly can be done completely from
+      the command line without having to go to your web browser.
+
+      Authentication for git-bz is done by reading the cookies for the
+      Bugzilla host from your web browser. In order to do this, git-bz needs
+      to know how to access the cookies for your web browser; git-bz
+      currently is able to do this for Firefox, Epiphany, Galeon and
+      Chromium on Linux.
+    '';
+    license = licenses.gpl2Plus;
+    homepage = "http://git.fishsoup.net/cgit/git-bz/";
+
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix
new file mode 100644
index 000000000000..679e8dbdf507
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, lib, fetchFromGitHub, autoconf, makeWrapper
+, curl, libiconv, mercurial, zlib
+}:
+
+let
+  python3 = mercurial.python;
+in
+
+stdenv.mkDerivation rec {
+  pname = "git-cinnabar";
+  version = "0.5.4";
+
+  src = fetchFromGitHub {
+    owner = "glandium";
+    repo = "git-cinnabar";
+    rev = version;
+    sha256 = "1cjn2cc6mj4m736wxab9s6qx83p5n5ha8cr3x84s9ra6rxs8d7pi";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ autoconf makeWrapper ];
+  buildInputs = [ curl zlib ] ++ lib.optional stdenv.isDarwin libiconv;
+
+  # Ignore submodule status failing due to no git in environment.
+  makeFlags = [ "SUBMODULE_STATUS=yes" ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    mkdir -p $out/bin $out/libexec
+    install git-cinnabar-helper $out/bin
+    install git-cinnabar git-remote-hg $out/libexec
+    cp -r cinnabar mercurial $out/libexec
+
+    for pythonBin in git-cinnabar git-remote-hg; do
+        makeWrapper $out/libexec/$pythonBin $out/bin/$pythonBin \
+            --prefix PATH : ${lib.getBin python3}/bin \
+            --prefix GIT_CINNABAR_EXPERIMENTS , python3 \
+            --set PYTHONPATH ${mercurial}/${python3.sitePackages}
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/glandium/git-cinnabar";
+    description = "git remote helper to interact with mercurial repositories";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ qyliss ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
new file mode 100644
index 000000000000..2517e20ce9d7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix
@@ -0,0 +1,21 @@
+{ lib, rustPlatform, fetchFromGitHub }:
+rustPlatform.buildRustPackage rec {
+  pname = "git-codeowners";
+  version = "0.1.2";
+
+  src = fetchFromGitHub {
+    owner = "softprops";
+    repo = "git-codeowners";
+    rev = "v${version}";
+    sha256 = "0bzq4ridzb4l1zqrj1r0vlzkjpgfaqwky5jf49cwjhz4ybwrfpkq";
+  };
+
+  cargoSha256 = "0r0hyp15knbbs4l9rcn395pzrx2vbibmwvs4pmga363irmi8mcy5";
+
+  meta = with lib; {
+    homepage = "https://github.com/softprops/git-codeowners";
+    description = "a git extension to work with CODEOWNERS files";
+    license = licenses.mit;
+    maintainers = with maintainers; [ zimbatm ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codereview/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codereview/default.nix
new file mode 100644
index 000000000000..902814078485
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-codereview/default.nix
@@ -0,0 +1,21 @@
+{ lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage {
+  pname = "git-codereview";
+  version = "2020-01-15";
+  goPackagePath = "golang.org/x/review";
+
+  src = fetchFromGitHub {
+    owner = "golang";
+    repo = "review";
+    rev = "f51a73253c4da005cfdf18a036e11185c04c8ce3";
+    sha256 = "0c4vsyy5zp7pngqn4q87xipndghxyw2x57dkv1kxnrffckx1s3pc";
+  };
+
+  meta = with lib; {
+    description = "Manage the code review process for Git changes using a Gerrit server";
+    homepage = "https://golang.org/x/review/git-codereview";
+    license = licenses.bsd3;
+    maintainers = [ maintainers.edef ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
new file mode 100644
index 000000000000..858383f96641
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, python3Packages, gettext, git, qt5 }:
+
+let
+  inherit (python3Packages) buildPythonApplication pyqt5 sip pyinotify;
+
+in buildPythonApplication rec {
+  pname = "git-cola";
+  version = "3.5";
+
+  src = fetchFromGitHub {
+    owner = "git-cola";
+    repo = "git-cola";
+    rev = "v${version}";
+    sha256 = "09b60jbpdr4czx7h4vqahqmmi7m9vn77jlkpjfhys7crrdnxjp9i";
+  };
+
+  buildInputs = [ git gettext ];
+  propagatedBuildInputs = [ pyqt5 sip pyinotify ];
+  nativeBuildInputs = [ qt5.wrapQtAppsHook ];
+
+  doCheck = false;
+
+  postFixup = ''
+    wrapQtApp $out/bin/git-cola
+    wrapQtApp $out/bin/git-dag
+
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/git-cola/git-cola";
+    description = "A sleek and powerful Git GUI";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.bobvanderlinden ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix
new file mode 100644
index 000000000000..487f9b9625f4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix
@@ -0,0 +1,55 @@
+{ fetchFromGitHub, git, gnupg, makeWrapper, openssl, stdenv
+, libxslt, docbook_xsl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "git-crypt";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "AGWA";
+    repo = pname;
+    rev = version;
+    sha256 = "13m9y0m6gc3mlw3pqv9x4i0him2ycbysizigdvdanhh514kga602";
+  };
+
+  nativeBuildInputs = [ libxslt ];
+
+  buildInputs = [ openssl makeWrapper ];
+
+  patchPhase = ''
+    substituteInPlace commands.cpp \
+      --replace '(escape_shell_arg(our_exe_path()))' '= "git-crypt"'
+  '';
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "ENABLE_MAN=yes"
+    "DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl"
+  ];
+
+  postFixup = ''
+    wrapProgram $out/bin/git-crypt --prefix PATH : $out/bin:${git}/bin:${gnupg}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.agwa.name/projects/git-crypt";
+    description = "Transparent file encryption in git";
+    longDescription = ''
+      git-crypt enables transparent encryption and decryption of files in a git
+      repository. Files which you choose to protect are encrypted when
+      committed, and decrypted when checked out. git-crypt lets you freely
+      share a repository containing a mix of public and private
+      content. git-crypt gracefully degrades, so developers without the secret
+      key can still clone and commit to a repository with encrypted files. This
+      lets you store your secret material (such as keys or passwords) in the
+      same repository as your code, without requiring you to lock down your
+      entire repository.
+    '';
+    downloadPage = "https://github.com/AGWA/git-crypt/releases";
+    license = licenses.gpl3;
+    maintainers = [ maintainers.dochang ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
new file mode 100644
index 000000000000..9ec4e2530424
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, fetchFromGitHub
+, openssl_1_0_2
+, zlib
+, libssh
+, cmake
+, perl
+, pkgconfig
+, rustPlatform
+, curl
+, libiconv
+, CoreFoundation
+, Security
+}:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  pname = "git-dit";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "neithernut";
+    repo = "git-dit";
+    rev = "v${version}";
+    sha256 = "1sx6sc2dj3l61gbiqz8vfyhw5w4xjdyfzn1ixz0y8ipm579yc7a2";
+  };
+
+  cargoSha256 = "1wjbwd3scx71l2fpxgvgwaw05lkpw13rm6d2i1x5crhs7py96ky6";
+
+  nativeBuildInputs = [
+    cmake
+    pkgconfig
+    perl
+  ];
+
+  buildInputs = [
+    openssl_1_0_2
+    libssh
+    zlib
+  ] ++ stdenv.lib.optionals (stdenv.isDarwin) [
+    curl
+    libiconv
+    CoreFoundation
+    Security
+  ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Decentralized Issue Tracking for git";
+    # This has not had a release in years and its cargo vendored dependencies
+    # fail to compile. It also depends on an unsupported openssl:
+    # https://github.com/NixOS/nixpkgs/issues/77503
+    broken = true;
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ Profpatsch matthiasbeyer ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix
new file mode 100644
index 000000000000..f2afdd941fe4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchzip, unixtools, which }:
+
+stdenv.mkDerivation rec {
+  pname = "git-extras";
+  version = "5.1.0";
+
+  src = fetchzip {
+    url = "https://github.com/tj/git-extras/archive/${version}.tar.gz";
+    sha256 = "0ja8ds9gpibrnwcf8n6cpbggwkbks0ik3z9vfx5h1yf3ln1nycky";
+  };
+
+  nativeBuildInputs = [ unixtools.column which ];
+
+  dontBuild = true;
+
+  preInstall = ''
+    patchShebangs .
+  '';
+
+  installFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  postInstall = ''
+    # bash completion is already handled by make install
+    install -D etc/git-extras-completion.zsh $out/share/zsh/site-functions/_git_extras
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/tj/git-extras";
+    description = "GIT utilities -- repo summary, repl, changelog population, author commit percentages and more";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.spwhitt maintainers.cko ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile
new file mode 100644
index 000000000000..17373f02b44d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile
@@ -0,0 +1,4 @@
+source 'https://rubygems.org'
+
+# Specify your gem's dependencies in git_fame.gemspec
+gem "git_fame"
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock
new file mode 100644
index 000000000000..12c58d72103a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/Gemfile.lock
@@ -0,0 +1,26 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    git_fame (2.5.2)
+      hirb (~> 0.7.3)
+      memoist (~> 0.14.0)
+      method_profiler (~> 2.0.1)
+      progressbar (~> 0.21.0)
+      scrub_rb (~> 1.0.1)
+      trollop (~> 2.1.2)
+    hirb (0.7.3)
+    memoist (0.14.0)
+    method_profiler (2.0.1)
+      hirb (>= 0.6.0)
+    progressbar (0.21.0)
+    scrub_rb (1.0.1)
+    trollop (2.1.2)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  git_fame
+
+BUNDLED WITH
+   2.1.4
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix
new file mode 100644
index 000000000000..782579c70446
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, bundlerEnv, ruby, bundlerUpdateScript }:
+
+bundlerEnv {
+  inherit ruby;
+
+  pname = "git_fame";
+
+  gemdir = ./.;
+
+  passthru.updateScript = bundlerUpdateScript "gitAndTools.git-fame";
+
+  meta = with stdenv.lib; {
+    description = ''
+      A command-line tool that helps you summarize and pretty-print collaborators based on contributions
+      '';
+    homepage    = "http://oleander.io/git-fame-rb";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ expipiplus1 nicknovitski ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix
new file mode 100644
index 000000000000..49b4af4ef6d3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/gemset.nix
@@ -0,0 +1,60 @@
+{
+  git_fame = {
+    dependencies = ["hirb" "memoist" "method_profiler" "progressbar" "scrub_rb" "trollop"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "02k5ls5zyif8skdbnym6zw9y76whlnksw2m94jsh2n1ygk98izdd";
+      type = "gem";
+    };
+    version = "2.5.2";
+  };
+  hirb = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0mzch3c2lvmf8gskgzlx6j53d10j42ir6ik2dkrl27sblhy76cji";
+      type = "gem";
+    };
+    version = "0.7.3";
+  };
+  memoist = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "03d3h6kp16bf0crqg1cxdgp1d2iyzn53d3phbmjh4pjybqls0gcm";
+      type = "gem";
+    };
+    version = "0.14.0";
+  };
+  method_profiler = {
+    dependencies = ["hirb"];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1ax04qrrv7fqp5ayxaxhn72660pybdkpkvmgiwbg7bs7x5ijjzd8";
+      type = "gem";
+    };
+    version = "2.0.1";
+  };
+  progressbar = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "17haw9c6c9q6imsn83pii32jnihpg76jgd09x7y4hjqq45n3qcdh";
+      type = "gem";
+    };
+    version = "0.21.0";
+  };
+  scrub_rb = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0dwg33w83w17aiij9kcbi7irj7lh045nh9prjgkzjya3f1j60d3x";
+      type = "gem";
+    };
+    version = "1.0.1";
+  };
+  trollop = {
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0415y63df86sqj43c0l82and65ia5h64if7n0znkbrmi6y0jwhl8";
+      type = "gem";
+    };
+    version = "2.1.2";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix
new file mode 100644
index 000000000000..0439669f9da5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "git-filter-repo";
+  version = "2.26.0";
+
+  src = fetchurl {
+    url = "https://github.com/newren/git-filter-repo/releases/download/v${version}/${pname}-${version}.tar.xz";
+    sha256 = "15d07i66b090bhjfj9s4s2s38k75mhxmddzyn44bnnyb967w6yjk";
+  };
+
+  buildInputs = [ pythonPackages.python ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -Dm755 -t $out/bin git-filter-repo
+    install -Dm644 -t $out/share/man/man1 Documentation/man1/git-filter-repo.1
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/newren/git-filter-repo";
+    description = "Quickly rewrite git repository history (filter-branch replacement)";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-gone/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
new file mode 100644
index 000000000000..32350fa538db
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, makeWrapper, openssl, git, libiconv, Security, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-gone";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "lunaryorn";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0zc4cb1dg30np5yc4ymkr894qs2bk0r123i302md00niayk4njyd";
+  };
+
+  cargoSha256 = "1d892889ml7sqyxzmjipq5fvizb4abqhmmn450qm7yam9fn5q5wf";
+
+  nativeBuildInputs = [ pkgconfig makeWrapper installShellFiles ];
+
+  buildInputs = [ openssl ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  postInstall = ''
+    installManPage git-gone.1
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/git-gone --prefix PATH : "${stdenv.lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Cleanup stale Git branches of pull requests";
+    homepage = "https://github.com/lunaryorn/git-gone";
+    license = licenses.asl20;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix
new file mode 100644
index 000000000000..33b3d0bc167c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, gitMinimal, python2Packages }:
+
+stdenv.mkDerivation rec {
+  pname = "git-hub";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "sociomantic-tsunami";
+    repo = "git-hub";
+    rev = "v${version}";
+    sha256 = "0jkzg7vjvgb952qncndhki7n70714w61flbzf4mdcjc286lqjvwb";
+  };
+
+  buildInputs = [ python2Packages.python ];
+  nativeBuildInputs = [
+    gitMinimal        # Used during build to generate Bash completion.
+    python2Packages.docutils
+  ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  enableParallelBuilding = true;
+
+  installFlags = [ "prefix=$(out)" "sysconfdir=$(out)/etc" ];
+
+  postInstall = ''
+    # Remove inert ftdetect vim plugin and a README that's a man page subset:
+    rm -r $out/share/{doc,vim}
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Git command line interface to GitHub";
+    longDescription = ''
+      A simple command line interface to GitHub, enabling most useful GitHub
+      tasks (like creating and listing pull request or issues) to be accessed
+      directly through the Git command line.
+    '';
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix
new file mode 100644
index 000000000000..93d152baa003
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, installShellFiles, rustPlatform, pkgconfig, openssl, darwin }:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  pname = "git-ignore";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "sondr3";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0krz50pw9bkyzl78bvppk6skbpjp8ga7bd34jya4ha1xfmd8p89c";
+  };
+
+  cargoSha256 = "0vcg2pl0s329fr8p23pwdx2jy7qahbr7n337ib61f69aaxi1xmq0";
+
+  nativeBuildInputs = [ pkgconfig installShellFiles ];
+  buildInputs = [ openssl ]
+  ++ stdenv.lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Security
+  ];
+
+  outputs = [ "out" "man" ];
+  preFixup = ''
+    installManPage $releaseDir/build/git-ignore-*/out/git-ignore.1
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Quickly and easily fetch .gitignore templates from gitignore.io";
+    homepage = "https://github.com/sondr3/git-ignore";
+    license = licenses.gpl3Plus;
+    platforms = platforms.all;
+    maintainers = [ maintainers.sondr3 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix
new file mode 100644
index 000000000000..721a7784e9ca
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "git-imerge";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "mhagger";
+    repo = "git-imerge";
+    rev = "v${version}";
+    sha256 = "0vi1w3f0yk4gqhxj2hzqafqq28rihyhyfnp8x7xzib96j2si14a4";
+  };
+
+  buildInputs = [ pythonPackages.python pythonPackages.wrapPython ];
+
+  makeFlags = [ "PREFIX=" "DESTDIR=$(out)" ] ; 
+ 
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/mhagger/git-imerge";
+    description = "Perform a merge between two branches incrementally";
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.spwhitt ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-interactive-rebase-tool/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-interactive-rebase-tool/default.nix
new file mode 100644
index 000000000000..6d548f040541
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-interactive-rebase-tool/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, ncurses5, fetchFromGitHub, rustPlatform, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-interactive-rebase-tool";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "MitMaro";
+    repo = pname;
+    rev = version;
+    sha256 = "10z3di2qypgsmg2z7xfs9nlrf9vng5i7l8dvqadv1l4lb9zz7i8q";
+  };
+
+  cargoSha256 = "0jc6mhszxmwsdjk73wkfi0jjp9vkzzl9kk0dbnry6w7dyr5if8cc";
+
+  buildInputs = [ ncurses5 ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  checkFlagsArray = [ "--test-threads=1" ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/MitMaro/git-interactive-rebase-tool";
+    description = "Native cross platform full feature terminal based sequence editor for git interactive rebase";
+    changelog = "https://github.com/MitMaro/git-interactive-rebase-tool/releases/tag/${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ masaeedu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-machete/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-machete/default.nix
new file mode 100644
index 000000000000..42be3f7d3547
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-machete/default.nix
@@ -0,0 +1,33 @@
+{ lib, buildPythonApplication, fetchPypi
+, installShellFiles, pbr
+, flake8, mock, pycodestyle, pylint, tox }:
+
+buildPythonApplication rec {
+  pname = "git-machete";
+  version = "2.13.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0n07gm05676vgfh6vlym59jwwzym9xmibhr0zpf0drlx02fr47qy";
+  };
+
+  nativeBuildInputs = [ installShellFiles pbr ];
+
+  # TODO: Add missing check inputs (2019-11-22):
+  # - stestr
+  doCheck = false;
+  checkInputs = [ flake8 mock pycodestyle pylint tox ];
+
+  postInstall = ''
+      installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
+      installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/VirtusLab/git-machete";
+    description = "Git repository organizer and rebase/merge workflow automation tool";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.blitz ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-my/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-my/default.nix
new file mode 100644
index 000000000000..2a8a262bf304
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-my/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "git-my";
+  version = "1.1.2";
+
+  src = fetchFromGitHub {
+    owner = "davidosomething";
+    repo = "git-my";
+    rev = version;
+    sha256 = "0jji5zw25jygj7g4f6f3k0p0s9g37r8iad8pa0s67cxbq2v4sc0v";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -Dm755 -t "$out"/bin ./git-my
+  '';
+
+  meta = with stdenv.lib; {
+    description =
+      "List remote branches if they're merged and/or available locally";
+    homepage = "https://github.com/davidosomething/git-my";
+    license = licenses.free;
+    maintainers = with maintainers; [ bb010g ];
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix
new file mode 100644
index 000000000000..d5278d9d2417
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, git, perl, makeWrapper }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  pname = "git-octopus";
+  version = "1.4";
+
+  installFlags = [ "prefix=$(out)" ];
+
+  buildInputs = [ makeWrapper ];
+
+  # perl provides shasum
+  postInstall = ''
+    for f in $out/bin/*; do
+      wrapProgram $f --prefix PATH : ${makeBinPath [ git perl ]}
+    done
+  '';
+
+  src = fetchFromGitHub {
+    owner = "lesfurets";
+    repo = "git-octopus";
+    rev = "v${version}";
+    sha256 = "14p61xk7jankp6gc26xciag9fnvm7r9vcbhclcy23f4ghf4q4sj1";
+  };
+
+  meta = {
+    homepage = "https://github.com/lesfurets/git-octopus";
+    description = "The continuous merge workflow";
+    license = licenses.lgpl3;
+    platforms = platforms.unix;
+    maintainers = [maintainers.mic92];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix
new file mode 100644
index 000000000000..10f221b63882
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix
@@ -0,0 +1,32 @@
+{stdenv, git, xdg_utils, gnugrep, fetchFromGitHub, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "git-open";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "paulirish";
+    repo = "git-open";
+    rev = "v${version}";
+    sha256 = "0lprzrjsqrg83gixfaiw26achgd8l7s56jknsjss4p7y0w1fxm05";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-open $out/bin
+    wrapProgram $out/bin/git-open \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git xdg_utils gnugrep ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/paulirish/git-open";
+    description = "Open the GitHub page or website for a repository in your browser";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.jlesquembre ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix
new file mode 100644
index 000000000000..fc4b5850f5c7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchFromGitHub}:
+
+stdenv.mkDerivation rec {
+  pname = "git-radar";
+  version = "0.6";
+
+  src = fetchFromGitHub {
+    owner = "michaeldfallen";
+    repo = "git-radar";
+    rev = "v${version}";
+    sha256 = "0c3zp8s4w7m4s71qgwk1jyfc8yzw34f2hi43x1w437ypgabwg81j";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out
+    ln -s $out/git-radar $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/michaeldfallen/git-radar";
+    license = licenses.mit;
+    description = "A tool you can add to your prompt to provide at-a-glance information on your git repo";
+    platforms = with platforms; linux ++ darwin;
+    maintainers = with maintainers; [ kamilchm ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix
new file mode 100644
index 000000000000..99b64e012eae
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix
@@ -0,0 +1,35 @@
+{stdenv, git, less, fetchFromGitHub, makeWrapper
+# utillinuxMinimal is included because we need the column command
+, utillinux
+}:
+
+stdenv.mkDerivation rec {
+  pname = "git-recent";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "paulirish";
+    repo = "git-recent";
+    rev = "v${version}";
+    sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-recent $out/bin
+    wrapProgram $out/bin/git-recent \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git less utillinux ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/paulirish/git-recent";
+    description = "See your latest local git branches, formatted real fancy";
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = [ maintainers.jlesquembre ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix
new file mode 100644
index 000000000000..04787b0ce25b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitHub, docutils, makeWrapper
+, gnupg, curl, rsync, coreutils
+, gawk, gnused, gnugrep
+}:
+
+stdenv.mkDerivation rec {
+  pname = "git-remote-gcrypt";
+  version = "1.3";
+  rev = version;
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "spwhitton";
+    repo = "git-remote-gcrypt";
+    sha256 = "0n8fzvr6y0pxrbvkywlky2bd8jvi0ayp4n9hwi84l1ldmv4a40dh";
+  };
+
+  outputs = [ "out" "man" ];
+
+  nativeBuildInputs = [ docutils makeWrapper ];
+
+  installPhase = ''
+    prefix="$out" ./install.sh
+    wrapProgram "$out/bin/git-remote-gcrypt" \
+      --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg curl rsync coreutils
+                                                    gawk gnused gnugrep ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://spwhitton.name/tech/code/git-remote-gcrypt";
+    description = "A git remote helper for GPG-encrypted remotes";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ellis montag451 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix
new file mode 100644
index 000000000000..37c06d3a85e2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, fetchFromGitHub, mercurial, makeWrapper
+, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt, libxml2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "git-remote-hg";
+  version = "1.0.1";
+
+  src = fetchFromGitHub {
+    owner = "mnauw";
+    repo = "git-remote-hg";
+    rev = "v${version}";
+    sha256 = "1by5ygqvq9ww990kdrjndaqsssyf2jc4n380f9pfh2avsr7871wc";
+  };
+
+  buildInputs = [ mercurial.python mercurial makeWrapper
+    asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt libxml2
+  ];
+
+  doCheck = false;
+
+  installFlags = [ "HOME=\${out}" "install-doc" ];
+
+  postInstall = ''
+    wrapProgram $out/bin/git-remote-hg \
+      --prefix PYTHONPATH : "$(echo ${mercurial}/lib/python*/site-packages):$(echo ${mercurial.python}/lib/python*/site-packages)${stdenv.lib.concatMapStrings (x: ":$(echo ${x}/lib/python*/site-packages)") mercurial.pythonPackages or []}"
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/mnauw/git-remote-hg";
+    description = "Semi-official Mercurial bridge from Git project";
+    license = licenses.gpl2;
+    maintainers = [ ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix
new file mode 100644
index 000000000000..c0de46264d05
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git, gnused }:
+
+stdenv.mkDerivation rec {
+  pname = "git-reparent";
+  version = "unstable-2017-09-03";
+
+  src = fetchFromGitHub {
+    owner  = "MarkLodato";
+    repo   = "git-reparent";
+    rev    = "a99554a32524a86421659d0f61af2a6c784b7715";
+    sha256 = "0v0yxydpw6r4awy0hb7sbnh520zsk86ibzh1xjf3983yhsvkfk5v";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -m755 -Dt $out/bin git-reparent
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/git-reparent --prefix PATH : "${stdenv.lib.makeBinPath [ git gnused ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Git command to recommit HEAD with a new set of parents";
+    maintainers = [ maintainers.marsam ];
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix
new file mode 100644
index 000000000000..140c2647be22
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secret/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper, git, gnupg, gawk }:
+
+let
+  version = "0.3.2";
+  repo = "git-secret";
+
+in stdenv.mkDerivation {
+  name = "${repo}-${version}";
+
+  src = fetchFromGitHub {
+    inherit repo;
+    owner = "sobolevn";
+    rev = "v${version}";
+    sha256 = "0n268xlsd9p5f083sqwzpvsqg99fdk876mf8gihkydakrismc45b";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -D git-secret $out/bin/git-secret
+
+    wrapProgram $out/bin/git-secret \
+      --prefix PATH : "${lib.makeBinPath [ git gnupg gawk ]}"
+
+    mkdir $out/share
+    cp -r man $out/share
+  '';
+
+  meta = {
+    description = "A bash-tool to store your private data inside a git repository";
+    homepage = "https://git-secret.io";
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.lo1tuma ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
new file mode 100644
index 000000000000..1beff2a118df
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
+
+stdenv.mkDerivation rec {
+  pname = "git-secrets";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "awslabs";
+    repo = "git-secrets";
+    rev = version;
+    sha256 = "10lnxg0q855zi3d6804ivlrn6dc817kilzdh05mmz8a0ccvm2qc7";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -m755 -Dt $out/bin git-secrets
+    install -m444 -Dt $out/share/man/man1 git-secrets.1
+
+    wrapProgram $out/bin/git-secrets \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git coreutils ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Prevents you from committing secrets and credentials into git repositories";
+    homepage = "https://github.com/awslabs/git-secrets";
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-standup/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-standup/default.nix
new file mode 100644
index 000000000000..ceb734f0f67f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-standup/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git }:
+
+stdenv.mkDerivation rec {
+  pname = "git-standup";
+  version = "2.3.2";
+
+  src = fetchFromGitHub {
+    owner = "kamranahmedse";
+    repo = pname;
+    rev = version;
+    sha256 = "1xnn0jjha56v7l2vj45zzxncl6m5x2hq6nkffgc1bcikhp1pidn7";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -Dm755 -t $out/bin git-standup
+
+    wrapProgram $out/bin/git-standup \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Recall what you did on the last working day";
+    homepage = "https://github.com/kamranahmedse/git-standup";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix
new file mode 100644
index 000000000000..dc636571acc0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-stree/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, lib, fetchFromGitHub, ... }:
+
+stdenv.mkDerivation {
+  pname = "git-stree";
+  version = "0.4.5";
+
+  src = fetchFromGitHub {
+    owner = "tdd";
+    repo = "git-stree";
+    rev = "0.4.5";
+    sha256 = "0y5h44n38w6rhy9m591dvibxpfggj3q950ll7y4h49bhpks4m0l9";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin $out/etc/bash_completion.d
+    install -m 0755 git-stree $out/bin/
+    install -m 0644 git-stree-completion.bash $out/etc/bash_completion.d/
+  '';
+
+  meta = with lib; {
+    description = "A better Git subtree helper command";
+    homepage = "http://deliciousinsights.github.io/git-stree";
+    license = licenses.mit;
+    maintainers = [ maintainers.benley ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix
new file mode 100644
index 000000000000..708014e4af8d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchFromGitHub, git, makeWrapper, which }:
+
+stdenv.mkDerivation rec {
+  pname = "git-subrepo";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "ingydotnet";
+    repo = "git-subrepo";
+    rev = version;
+    sha256 = "0n10qnc8kyms6cv65k1n5xa9nnwpwbjn9h2cq47llxplawzqgrvp";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+    which
+  ];
+
+  buildInputs = [
+    git
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "INSTALL_LIB=${placeholder "out"}/bin"
+    "INSTALL_MAN=${placeholder "out"}/share/man/man1"
+  ];
+
+  patches = [
+    # Allow zsh completion to work even though we aren't installing from a git
+    # clone.  Also submitted upstream as
+    # https://github.com/ingydotnet/git-subrepo/pull/420
+    ./zsh-completion.patch
+  ];
+
+  postInstall = ''
+    ZSH_COMP_DIR="$out/share/zsh/vendor-completions"
+    mkdir -p "$ZSH_COMP_DIR"
+    cp share/zsh-completion/_git-subrepo "$ZSH_COMP_DIR/"
+
+    BASH_COMP_DIR="$out/share/bash-completion/completions"
+    mkdir -p "$BASH_COMP_DIR"
+    cp share/completion.bash "$BASH_COMP_DIR/git-subrepo"
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/git-subrepo \
+      --prefix PATH : "${git}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/ingydotnet/git-subrepo";
+    description = "Git submodule alternative";
+    license = licenses.mit;
+    platforms = platforms.unix ++ platforms.darwin;
+    maintainers = [ maintainers.ryantrinkle ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch
new file mode 100644
index 000000000000..dcba5ba6eea1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch
@@ -0,0 +1,32 @@
+diff --git a/pkg/bin/generate-completion.pl b/pkg/bin/generate-completion.pl
+index 85ae3b8..d3e423c 100644
+--- a/pkg/bin/generate-completion.pl
++++ b/pkg/bin/generate-completion.pl
+@@ -82,11 +82,6 @@ sub generate_zsh {
+ 
+ # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
+ 
+-if [[ -z $GIT_SUBREPO_ROOT ]]; then
+-	echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
+-	return 3
+-fi
+-
+ _git-subrepo() {
+     typeset -A opt_args
+     local curcontext="$curcontext" state line context
+diff --git a/share/zsh-completion/_git-subrepo b/share/zsh-completion/_git-subrepo
+index fc82be2..a8069d9 100644
+--- a/share/zsh-completion/_git-subrepo
++++ b/share/zsh-completion/_git-subrepo
+@@ -3,11 +3,6 @@
+ 
+ # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
+ 
+-if [[ -z $GIT_SUBREPO_ROOT ]]; then
+-	echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
+-	return 3
+-fi
+-
+ _git-subrepo() {
+     typeset -A opt_args
+     local curcontext="$curcontext" state line context
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix
new file mode 100644
index 000000000000..a5097697a867
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix
@@ -0,0 +1,22 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "git-subtrac";
+  version = "0.02";
+
+  src = fetchFromGitHub {
+    owner = "apenwarr";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1nj950r38sxzrgw69m1xphm7a4km2g29iw2897gfx4wx57jl957k";
+  };
+
+  modSha256 = "147vzllp1gydk2156hif313vwykagrj35vaiqy1swqczxs7p9hhs";
+
+  meta = with lib; {
+    description = "Keep the content for your git submodules all in one place: the parent repo";
+    homepage = "https://github.com/apenwarr/git-subtrac";
+    license = licenses.asl20;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix
new file mode 100644
index 000000000000..bba355095558
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchFromGitHub, coreutils, gnugrep, gnused, makeWrapper, git
+}:
+
+stdenv.mkDerivation rec {
+  pname = "git-sync";
+  version = "20151024";
+
+  src = fetchFromGitHub {
+    owner = "simonthum";
+    repo = "git-sync";
+    rev = "eb9adaf2b5fd65aac1e83d6544b9076aae6af5b7";
+    sha256 = "01if8y93wa0mwbkzkzx2v1vqh47zlz4k1dysl6yh5rmppd1psknz";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -a git-sync $out/bin/git-sync
+  '';
+
+  wrapperPath = with stdenv.lib; makeBinPath [
+    coreutils
+    git
+    gnugrep
+    gnused
+  ];
+
+  fixupPhase = ''
+    patchShebangs $out/bin
+
+    wrapProgram $out/bin/git-sync \
+      --prefix PATH : "${wrapperPath}"
+  '';
+
+  meta = {
+    description = "A script to automatically synchronize a git repository";
+    homepage = "https://github.com/simonthum/git-sync";
+    maintainers = with stdenv.lib.maintainers; [ imalison ];
+    license = stdenv.lib.licenses.cc0;
+    platforms = with stdenv.lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix
new file mode 100644
index 000000000000..27f9bcffa34e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub, makeWrapper, git }:
+
+stdenv.mkDerivation rec {
+  pname = "git-test";
+  version = "1.0.4";
+
+  src = fetchFromGitHub {
+    owner = "spotify";
+    repo = "git-test";
+    rev = "v${version}";
+    sha256 = "01h3f0andv1p7pwir3k6n01v92hgr5zbjadfwl144yjw9x37fm2f";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -m755 -Dt $out/bin git-test
+    install -m444 -Dt $out/share/man/man1 git-test.1
+
+    wrapProgram $out/bin/git-test \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Test your commits";
+    homepage = "https://github.com/spotify/git-test";
+    license = licenses.asl20;
+    maintainers = [ maintainers.marsam ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
new file mode 100644
index 000000000000..d843cdc307c0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-trim";
+  version = "0.3.2";
+
+  src = fetchFromGitHub {
+    owner = "foriequal0";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "079kavm3n776wvmy25jq1g4qdvmhh3d3x1vdpb1f6pw5rkky8lyw";
+  };
+
+  cargoSha256 = "1ii5l7z9avg0gzlaav2gnfbr8wkbp008i5rz6k6bs2sfqnpnn5k6";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  postInstall = ''
+    install -Dm644 -t $out/share/man/man1/ docs/git-trim.1
+  '';
+
+  # fails with sandbox
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "Automatically trims your branches whose tracking remote refs are merged or gone";
+    homepage = "https://github.com/foriequal0/git-trim";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix
new file mode 100644
index 000000000000..8894c4f0f7ad
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix
@@ -0,0 +1,29 @@
+{ stdenv
+, fetchFromGitHub
+, rustPlatform
+, Security
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-workspace";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "orf";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0n025bnisg724d9pjcindxagj1ry63sxr0pplpkh2f2qffzm78pi";
+  };
+
+  cargoSha256 = "0ikyp6pdlw2c1gr1n1snjbdmblm0fs5swx5awy36jskii99q6kr1";
+
+  buildInputs = with stdenv; lib.optional isDarwin Security;
+
+  meta = with stdenv.lib; {
+    description = "Sync personal and work git repositories from multiple providers";
+    homepage = "https://github.com/orf/git-workspace";
+    license = with licenses; [ mit ];
+    platforms = platforms.all;
+    maintainers = with maintainers; [ misuzu ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix
new file mode 100644
index 000000000000..9c1a01f42ae8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -0,0 +1,348 @@
+{ fetchurl, stdenv, buildPackages
+, curl, openssl, zlib, expat, perlPackages, python3, gettext, cpio
+, gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc
+, openssh, pcre2
+, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
+, libxslt, tcl, tk, makeWrapper, libiconv
+, svnSupport, subversionClient, perlLibs, smtpPerlLibs
+, perlSupport ? true
+, guiSupport
+, withManual ? true
+, pythonSupport ? true
+, withpcre2 ? true
+, sendEmailSupport
+, darwin
+, withLibsecret ? false
+, pkgconfig, glib, libsecret
+, gzip # needed at runtime by gitweb.cgi
+}:
+
+assert sendEmailSupport -> perlSupport;
+assert svnSupport -> perlSupport;
+
+let
+  version = "2.26.2";
+  svn = subversionClient.override { perlBindings = perlSupport; };
+
+  gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
+in
+
+stdenv.mkDerivation {
+  pname = "git";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
+    sha256 = "0j685w6pzkn926z5nf5r8fij4ziipvw4c9yb0wc577nzf4j16rbd";
+  };
+
+  outputs = [ "out" ];
+
+  hardeningDisable = [ "format" ];
+
+  enableParallelBuilding = true;
+
+  ## Patch
+
+  patches = [
+    ./docbook2texi.patch
+    ./git-sh-i18n.patch
+    ./ssh-path.patch
+    ./git-send-email-honor-PATH.patch
+    ./installCheck-path.patch
+  ];
+
+  postPatch = ''
+    for x in connect.c git-gui/lib/remote_add.tcl ; do
+      substituteInPlace "$x" \
+        --subst-var-by ssh "${openssh}/bin/ssh"
+    done
+
+    # Fix references to gettext introduced by ./git-sh-i18n.patch
+    substituteInPlace git-sh-i18n.sh \
+        --subst-var-by gettext ${gettext}
+  '';
+
+  nativeBuildInputs = [ gettext perlPackages.perl ]
+    ++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
+         docbook_xsl docbook_xml_dtd_45 libxslt ];
+  buildInputs = [curl openssl zlib expat cpio makeWrapper libiconv]
+    ++ stdenv.lib.optionals perlSupport [ perlPackages.perl ]
+    ++ stdenv.lib.optionals guiSupport [tcl tk]
+    ++ stdenv.lib.optionals withpcre2 [ pcre2 ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ]
+    ++ stdenv.lib.optionals withLibsecret [ pkgconfig glib libsecret ];
+
+  # required to support pthread_cancel()
+  NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s"
+              + stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr";
+
+  configureFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+    "ac_cv_fread_reads_directories=yes"
+    "ac_cv_snprintf_returns_bogus=no"
+    "ac_cv_iconv_omits_bom=no"
+    "ac_cv_prog_CURL_CONFIG=${curl.dev}/bin/curl-config"
+  ];
+
+  preBuild = ''
+    makeFlagsArray+=( perllibdir=$out/$(perl -MConfig -wle 'print substr $Config{installsitelib}, 1 + length $Config{siteprefixexp}') )
+  '';
+
+  makeFlags = [
+    "prefix=\${out}"
+    "SHELL_PATH=${stdenv.shell}"
+  ]
+  ++ (if perlSupport then ["PERL_PATH=${perlPackages.perl}/bin/perl"] else ["NO_PERL=1"])
+  ++ (if pythonSupport then ["PYTHON_PATH=${python3}/bin/python"] else ["NO_PYTHON=1"])
+  ++ stdenv.lib.optionals stdenv.isSunOS ["INSTALL=install" "NO_INET_NTOP=" "NO_INET_PTON="]
+  ++ (if stdenv.isDarwin then ["NO_APPLE_COMMON_CRYPTO=1"] else ["sysconfdir=/etc"])
+  ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl ["NO_SYS_POLL_H=1" "NO_GETTEXT=YesPlease"]
+  ++ stdenv.lib.optional withpcre2 "USE_LIBPCRE2=1"
+  # git-gui refuses to start with the version of tk distributed with
+  # macOS Catalina. We can prevent git from building the .app bundle
+  # by specifying an invalid tk framework. The postInstall step will
+  # then ensure that git-gui uses tcl/tk from nixpkgs, which is an
+  # acceptable version.
+  #
+  # See https://github.com/Homebrew/homebrew-core/commit/dfa3ccf1e7d3901e371b5140b935839ba9d8b706
+  ++ stdenv.lib.optional stdenv.isDarwin "TKFRAMEWORK=/nonexistent";
+
+
+  postBuild = ''
+    make -C contrib/subtree
+  '' + (stdenv.lib.optionalString perlSupport ''
+    make -C contrib/diff-highlight
+  '') + (stdenv.lib.optionalString stdenv.isDarwin ''
+    make -C contrib/credential/osxkeychain
+  '') + (stdenv.lib.optionalString withLibsecret ''
+    make -C contrib/credential/libsecret
+  '');
+
+
+  ## Install
+
+  # WARNING: Do not `rm` or `mv` files from the source tree; use `cp` instead.
+  #          We need many of these files during the installCheckPhase.
+
+  installFlags = [ "NO_INSTALL_HARDLINKS=1" ];
+
+  preInstall = (stdenv.lib.optionalString stdenv.isDarwin ''
+    mkdir -p $out/bin
+    ln -s $out/share/git/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin/
+    rm -f $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain.o
+  '') + (stdenv.lib.optionalString withLibsecret ''
+    mkdir -p $out/bin
+    ln -s $out/share/git/contrib/credential/libsecret/git-credential-libsecret $out/bin/
+    rm -f $PWD/contrib/credential/libsecret/git-credential-libsecret.o
+  '');
+
+  postInstall =
+    ''
+      notSupported() {
+        unlink $1 || true
+      }
+
+      # Install git-subtree.
+      make -C contrib/subtree install ${stdenv.lib.optionalString withManual "install-doc"}
+      rm -rf contrib/subtree
+
+      # Install contrib stuff.
+      mkdir -p $out/share/git
+      cp -a contrib $out/share/git/
+      mkdir -p $out/share/bash-completion/completions
+      ln -s $out/share/git/contrib/completion/git-completion.bash $out/share/bash-completion/completions/git
+      mkdir -p $out/etc/bash_completion.d
+      ln -s $out/share/git/contrib/completion/git-prompt.sh $out/etc/bash_completion.d/
+      mkdir -p $out/share/zsh/site-functions
+      ln -s $out/share/git/contrib/completion/git-completion.zsh $out/share/zsh/site-functions/_git
+
+      # Patch the zsh completion script so it can find the Bash completion script.
+      sed -i -e "/locations=(/a \${"\t\t"}'$out/share/git/contrib/completion/git-completion.bash'" \
+        $out/share/git/contrib/completion/git-completion.zsh
+
+      # grep is a runtime dependency, need to patch so that it's found
+      substituteInPlace $out/libexec/git-core/git-sh-setup \
+          --replace ' grep' ' ${gnugrep}/bin/grep' \
+          --replace ' egrep' ' ${gnugrep}/bin/egrep'
+
+      # Fix references to the perl, sed, awk and various coreutil binaries used by
+      # shell scripts that git calls (e.g. filter-branch)
+      SCRIPT="$(cat <<'EOS'
+        BEGIN{
+          @a=(
+            '${gnugrep}/bin/grep', '${gnused}/bin/sed', '${gawk}/bin/awk',
+            '${coreutils}/bin/cut', '${coreutils}/bin/basename', '${coreutils}/bin/dirname',
+            '${coreutils}/bin/wc', '${coreutils}/bin/tr'
+            ${stdenv.lib.optionalString perlSupport ", '${perlPackages.perl}/bin/perl'"}
+          );
+        }
+        foreach $c (@a) {
+          $n=(split("/", $c))[-1];
+          s|(?<=[^#][^/.-])\b''${n}(?=\s)|''${c}|g
+        }
+      EOS
+      )"
+      perl -0777 -i -pe "$SCRIPT" \
+        $out/libexec/git-core/git-{sh-setup,filter-branch,merge-octopus,mergetool,quiltimport,request-pull,submodule,subtree,web--browse}
+
+
+      # Also put git-http-backend into $PATH, so that we can use smart
+      # HTTP(s) transports for pushing
+      ln -s $out/libexec/git-core/git-http-backend $out/bin/git-http-backend
+    '' + stdenv.lib.optionalString perlSupport ''
+      # wrap perl commands
+      makeWrapper "$out/share/git/contrib/credential/netrc/git-credential-netrc.perl" $out/bin/git-credential-netrc \
+                  --set PERL5LIB   "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
+      wrapProgram $out/libexec/git-core/git-cvsimport \
+                  --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
+      wrapProgram $out/libexec/git-core/git-add--interactive \
+                  --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
+      wrapProgram $out/libexec/git-core/git-archimport \
+                  --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
+      wrapProgram $out/libexec/git-core/git-instaweb \
+                  --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
+      wrapProgram $out/libexec/git-core/git-cvsexportcommit \
+                  --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
+
+      # gzip (and optionally bzip2, xz, zip) are runtime dependencies for
+      # gitweb.cgi, need to patch so that it's found
+      sed -i -e "s|'compressor' => \['gzip'|'compressor' => ['${gzip}/bin/gzip'|" \
+          $out/share/gitweb/gitweb.cgi
+      # Give access to CGI.pm and friends (was removed from perl core in 5.22)
+      for p in ${stdenv.lib.concatStringsSep " " gitwebPerlLibs}; do
+          sed -i -e "/use CGI /i use lib \"$p/${perlPackages.perl.libPrefix}\";" \
+              "$out/share/gitweb/gitweb.cgi"
+      done
+    ''
+
+   + (if svnSupport then ''
+        # wrap git-svn
+        wrapProgram $out/libexec/git-core/git-svn                                                                                \
+                     --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath (perlLibs ++ [svn.out])}" \
+                     --prefix PATH : "${svn.out}/bin" ''
+       else '' # replace git-svn by notification script
+        notSupported $out/libexec/git-core/git-svn
+     '')
+
+   + (if sendEmailSupport then ''
+        # wrap git-send-email
+        wrapProgram $out/libexec/git-core/git-send-email \
+                     --set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath smtpPerlLibs}"
+      '' else ''
+        # replace git-send-email by notification script
+        notSupported $out/libexec/git-core/git-send-email
+      '')
+
+   + stdenv.lib.optionalString withManual ''# Install man pages and Info manual
+       make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-info \
+         -C Documentation ''
+
+   + (if guiSupport then ''
+       # Wrap Tcl/Tk programs
+       for prog in bin/gitk libexec/git-core/{git-gui,git-citool,git-gui--askpass}; do
+         sed -i -e "s|exec 'wish'|exec '${tk}/bin/wish'|g" \
+                -e "s|exec wish|exec '${tk}/bin/wish'|g" \
+                "$out/$prog"
+       done
+       ln -s $out/share/git/contrib/completion/git-completion.bash $out/share/bash-completion/completions/gitk
+     '' else ''
+       # Don't wrap Tcl/Tk, replace them by notification scripts
+       for prog in bin/gitk libexec/git-core/git-gui; do
+         notSupported "$out/$prog"
+       done
+     '')
+   + stdenv.lib.optionalString stdenv.isDarwin ''
+    # enable git-credential-osxkeychain by default if darwin
+    cat > $out/etc/gitconfig << EOF
+    [credential]
+      helper = osxkeychain
+    EOF
+  '';
+
+
+  ## InstallCheck
+
+  doCheck = false;
+  doInstallCheck = true;
+
+  installCheckTarget = "test";
+
+  # see also installCheckFlagsArray
+  installCheckFlags = [
+    "DEFAULT_TEST_TARGET=prove"
+    "PERL_PATH=${buildPackages.perl}/bin/perl"
+  ];
+
+  preInstallCheck = ''
+    installCheckFlagsArray+=(
+      GIT_PROVE_OPTS="--jobs $NIX_BUILD_CORES --failures --state=failed,save"
+      GIT_TEST_INSTALLED=$out/bin
+      ${stdenv.lib.optionalString (!svnSupport) "NO_SVN_TESTS=y"}
+    )
+
+    function disable_test {
+      local test=$1 pattern=$2
+      if [ $# -eq 1 ]; then
+        mv t/{,skip-}$test.sh || true
+      else
+        sed -i t/$test.sh \
+          -e "/^ *test_expect_.*$pattern/,/^ *' *\$/{s/^/#/}"
+      fi
+    }
+
+    # Shared permissions are forbidden in sandbox builds.
+    disable_test t0001-init shared
+    disable_test t1301-shared-repo
+
+    # Our patched gettext never fallbacks
+    disable_test t0201-gettext-fallbacks
+
+    ${stdenv.lib.optionalString (!sendEmailSupport) ''
+      # Disable sendmail tests
+      disable_test t9001-send-email
+    ''}
+
+    # XXX: I failed to understand why this one fails.
+    # Could someone try to re-enable it on the next release ?
+    # Tested to fail: 2.18.0 and 2.19.0
+    disable_test t1700-split-index "null sha1"
+
+    # Tested to fail: 2.18.0
+    disable_test t9902-completion "sourcing the completion script clears cached --options"
+
+    ${stdenv.lib.optionalString (!perlSupport) ''
+      # request-pull is a Bash script that invokes Perl, so it is not available
+      # when NO_PERL=1, and the test should be skipped, but the test suite does
+      # not check for the Perl prerequisite.
+      disable_test t5150-request-pull
+    ''}
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # XXX: Some tests added in 2.24.0 fail.
+    # Please try to re-enable on the next release.
+    disable_test t7816-grep-binary-pattern
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    # Test fails (as of 2.17.0, musl 1.1.19)
+    disable_test t3900-i18n-commit
+    # Fails largely due to assumptions about BOM
+    # Tested to fail: 2.18.0
+    disable_test t0028-working-tree-encoding
+  '';
+
+  stripDebugList = [ "lib" "libexec" "bin" "share/git/contrib/credential/libsecret" ];
+
+
+  meta = {
+    homepage = "https://git-scm.com/";
+    description = "Distributed version control system";
+    license = stdenv.lib.licenses.gpl2;
+    changelog = "https://raw.githubusercontent.com/git/git/${version}/Documentation/RelNotes/${version}.txt";
+
+    longDescription = ''
+      Git, a popular distributed version control system designed to
+      handle very large projects with speed and efficiency.
+    '';
+
+    platforms = stdenv.lib.platforms.all;
+    maintainers = with stdenv.lib.maintainers; [ peti wmertens globin ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch
new file mode 100644
index 000000000000..f8f8ab86a9ce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/docbook2texi.patch
@@ -0,0 +1,38 @@
+This patch does two things: (1) use the right name for `docbook2texi',
+and (2) make sure `gitman.info' isn't produced since it's broken (duplicate
+node names).
+
+diff --git a/Documentation/Makefile b/Documentation/Makefile
+index 26a2342bea..ceccd67ebb 100644
+--- a/Documentation/Makefile
++++ b/Documentation/Makefile
+@@ -132,7 +132,7 @@ HTML_REPO = ../../git-htmldocs
+ 
+ MAKEINFO = makeinfo
+ INSTALL_INFO = install-info
+-DOCBOOK2X_TEXI = docbook2x-texi
++DOCBOOK2X_TEXI = docbook2texi
+ DBLATEX = dblatex
+ ASCIIDOC_DBLATEX_DIR = /etc/asciidoc/dblatex
+ DBLATEX_COMMON = -p $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR)/asciidoc-dblatex.sty
+@@ -250,7 +250,7 @@ man1: $(DOC_MAN1)
+ man5: $(DOC_MAN5)
+ man7: $(DOC_MAN7)
+ 
+-info: git.info gitman.info
++info: git.info
+ 
+ pdf: user-manual.pdf
+ 
+@@ -266,10 +266,9 @@ install-man: man
+ 
+ install-info: info
+ 	$(INSTALL) -d -m 755 $(DESTDIR)$(infodir)
+-	$(INSTALL) -m 644 git.info gitman.info $(DESTDIR)$(infodir)
++	$(INSTALL) -m 644 git.info $(DESTDIR)$(infodir)
+ 	if test -r $(DESTDIR)$(infodir)/dir; then \
+ 	  $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) git.info ;\
+-	  $(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) gitman.info ;\
+ 	else \
+ 	  echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \
+ 	fi
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch
new file mode 100644
index 000000000000..9603d8e27c5c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch
@@ -0,0 +1,28 @@
+diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
+index 1afe9fc858..05dd7c3a90 100644
+--- a/Documentation/git-send-email.txt
++++ b/Documentation/git-send-email.txt
+@@ -215,8 +215,7 @@ a password is obtained using 'git-credential'.
+ 	specify a full pathname of a sendmail-like program instead;
+ 	the program must support the `-i` option.  Default value can
+ 	be specified by the `sendemail.smtpServer` configuration
+-	option; the built-in default is to search for `sendmail` in
+-	`/usr/sbin`, `/usr/lib` and $PATH if such program is
++	option; the built-in default is to search in $PATH if such program is
+ 	available, falling back to `localhost` otherwise.
+ 
+ --smtp-server-port=<port>::
+diff --git a/git-send-email.perl b/git-send-email.perl
+index 8eb63b5a2f..74a61d8213 100755
+--- a/git-send-email.perl
++++ b/git-send-email.perl
+@@ -956,8 +956,7 @@ sub expand_one_alias {
+ }
+ 
+ if (!defined $smtp_server) {
+-	my @sendmail_paths = qw( /usr/sbin/sendmail /usr/lib/sendmail );
+-	push @sendmail_paths, map {"$_/sendmail"} split /:/, $ENV{PATH};
++	my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH};
+ 	foreach (@sendmail_paths) {
+ 		if (-x $_) {
+ 			$smtp_server = $_;
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch
new file mode 100644
index 000000000000..721f2aa099c4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/git-sh-i18n.patch
@@ -0,0 +1,23 @@
+diff --git a/git-sh-i18n.sh b/git-sh-i18n.sh
+index e1d917fd27..e90f8e1414 100644
+--- a/git-sh-i18n.sh
++++ b/git-sh-i18n.sh
+@@ -26,7 +26,7 @@ then
+ elif test -n "$GIT_INTERNAL_GETTEXT_TEST_FALLBACKS"
+ then
+ 	: no probing necessary
+-elif type gettext.sh >/dev/null 2>&1
++elif type @gettext@/bin/gettext.sh >/dev/null 2>&1
+ then
+ 	# GNU libintl's gettext.sh
+ 	GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+@@ -43,7 +43,8 @@ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+ case "$GIT_INTERNAL_GETTEXT_SH_SCHEME" in
+ gnu)
+ 	# Use libintl's gettext.sh, or fall back to English if we can't.
+-	. gettext.sh
++	. @gettext@/bin/gettext.sh
++	export PATH=@gettext@/bin:$PATH
+ 	;;
+ gettext_without_eval_gettext)
+ 	# Solaris has a gettext(1) but no eval_gettext(1)
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch
new file mode 100644
index 000000000000..4b73d11744ba
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/installCheck-path.patch
@@ -0,0 +1,13 @@
+diff --git a/t/test-lib.sh b/t/test-lib.sh
+index 8665b0a9b6..8bb892b1af 100644
+--- a/t/test-lib.sh
++++ b/t/test-lib.sh
+@@ -1227,7 +1227,7 @@ elif test -n "$GIT_TEST_INSTALLED"
+ then
+ 	GIT_EXEC_PATH=$($GIT_TEST_INSTALLED/git --exec-path)  ||
+ 	error "Cannot run git from $GIT_TEST_INSTALLED."
+-	PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$PATH
++	PATH=$GIT_TEST_INSTALLED:$GIT_BUILD_DIR/t/helper:$GIT_BUILD_DIR:$PATH
+ 	GIT_EXEC_PATH=${GIT_TEST_EXEC_PATH:-$GIT_EXEC_PATH}
+ else # normal case, use ../bin-wrappers only unless $with_dashes:
+ 	if test -n "$no_bin_wrappers"
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch
new file mode 100644
index 000000000000..71cdc694ac31
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/ssh-path.patch
@@ -0,0 +1,26 @@
+diff --git a/connect.c b/connect.c
+index 4813f005ab..b3f12f3268 100644
+--- a/connect.c
++++ b/connect.c
+@@ -1183,7 +1183,7 @@ static void fill_ssh_args(struct child_process *conn, const char *ssh_host,
+ 
+ 		ssh = getenv("GIT_SSH");
+ 		if (!ssh)
+-			ssh = "ssh";
++			ssh = "@ssh@";
+ 		variant = determine_ssh_variant(ssh, 0);
+ 	}
+ 
+diff --git a/git-gui/lib/remote_add.tcl b/git-gui/lib/remote_add.tcl
+index 480a6b30d0..7817204241 100644
+--- a/git-gui/lib/remote_add.tcl
++++ b/git-gui/lib/remote_add.tcl
+@@ -139,7 +139,7 @@ method _add {} {
+ 		# Parse the location
+ 		if { [regexp {(?:git\+)?ssh://([^/]+)(/.+)} $location xx host path]
+ 		     || [regexp {([^:][^:]+):(.+)} $location xx host path]} {
+-			set ssh ssh
++			set ssh @ssh@
+ 			if {[info exists env(GIT_SSH)]} {
+ 				set ssh $env(GIT_SSH)
+ 			}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git/update.sh b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/update.sh
new file mode 100755
index 000000000000..54574722b02b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/update.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl common-updater-scripts jq git
+
+set -eu -o pipefail
+
+oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion git" | tr -d '"')"
+latestTag="$(git ls-remote --tags --sort="v:refname" https://github.com/git/git.git | grep -v '\{\}' | grep -v '\-rc' | tail -1 | sed 's|^.*/v\(.*\)|\1|')"
+targetVersion="${1:-$latestTag}"
+
+if [ ! "${oldVersion}" = "${targetVersion}" ]; then
+  update-source-version git "${targetVersion}"
+  nixpkgs="$(git rev-parse --show-toplevel)"
+  default_nix="$nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix"
+  nix-build -A git
+  git add "${default_nix}"
+  git commit -m "git: ${oldVersion} -> ${targetVersion}"
+else
+  echo "git is already up-to-date"
+fi
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix
new file mode 100644
index 000000000000..34417cfaa8c8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix
@@ -0,0 +1,23 @@
+{ fetchgit, stdenv, perl }:
+
+stdenv.mkDerivation {
+  name = "git2cl-20080827";
+
+  src = fetchgit {
+    url = "git://repo.or.cz/git2cl.git";
+    rev = "8373c9f74993e218a08819cbcdbab3f3564bbeba";
+    sha256 = "b0d39379640c8a12821442431e2121f7908ce1cc88ec8ec6bede218ea8c21f2f";
+  };
+
+  buildInputs = [ perl ];
+  installPhase = ''
+    install -D -m755 git2cl $out/bin/git2cl
+    install -D -m644 README $out/share/doc/git2cl/README
+  '';
+
+  meta = {
+    homepage = "https://savannah.nongnu.org/projects/git2cl";
+    description = "Convert git logs to GNU style ChangeLog files";
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gita/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gita/default.nix
new file mode 100644
index 000000000000..c9d188e10e5a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gita/default.nix
@@ -0,0 +1,28 @@
+{ lib
+, buildPythonApplication
+, fetchPypi
+, pyyaml
+, setuptools
+}:
+
+buildPythonApplication rec {
+  version = "0.10.5";
+  pname = "gita";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1xggslmrrfszpl190klkc97fnl88gml1bnkmkzp6aimdch66g4jg";
+  };
+
+  propagatedBuildInputs = [
+    pyyaml
+    setuptools
+  ];
+
+  meta = with lib; {
+    description = "A command-line tool to manage multiple git repos";
+    homepage = "https://github.com/nosarthur/gita";
+    license = licenses.mit;
+    maintainers = with maintainers; [ seqizz ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix
new file mode 100644
index 000000000000..2b372cc0e213
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  pname = "gitbatch-unstable";
+  version = "2019-12-19";
+
+  goPackagePath = "github.com/isacikgoz/gitbatch";
+
+  goDeps = ./deps.nix;
+
+  src = fetchFromGitHub {
+    owner = "isacikgoz";
+    repo = "gitbatch";
+    rev = "381b0df7f86056c625c0d4d2d979733c1ee5def7";
+    sha256 = "sha256:0613vfqdn3k0w7fm25rqnqdr67w9vii3i56dfslqcn1vqjfrff3q";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Running git UI commands";
+    homepage = "https://github.com/isacikgoz/gitbatch";
+    license = licenses.mit;
+    maintainers = with maintainers; [ teto ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/deps.nix
new file mode 100644
index 000000000000..53784b4eacf0
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/deps.nix
@@ -0,0 +1,543 @@
+# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
+[
+  {
+    goPackagePath = "github.com/alcortesm/tgz";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alcortesm/tgz";
+      rev = "9c5fe88206d7";
+      sha256 = "04dcwnz2c2i4wbq2vx3g2wrdgqpncr2r1h6p1k08rdwk4bq1h8c5";
+    };
+  }
+  {
+    goPackagePath = "github.com/alecthomas/template";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alecthomas/template";
+      rev = "a0175ee3bccc";
+      sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj";
+    };
+  }
+  {
+    goPackagePath = "github.com/alecthomas/units";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alecthomas/units";
+      rev = "2efee857e7cf";
+      sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl";
+    };
+  }
+  {
+    goPackagePath = "github.com/anmitsu/go-shlex";
+    fetch = {
+      type = "git";
+      url = "https://github.com/anmitsu/go-shlex";
+      rev = "648efa622239";
+      sha256 = "10rgdp5d106iisgz25ic8k6f44s9adh4sjh6fyxq9ccm21gw49b7";
+    };
+  }
+  {
+    goPackagePath = "github.com/armon/consul-api";
+    fetch = {
+      type = "git";
+      url = "https://github.com/armon/consul-api";
+      rev = "eb2c6b5be1b6";
+      sha256 = "1j6fdr1sg36qy4n4xjl7brq739fpm5npq98cmvklzjc9qrx98nk9";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/etcd";
+      rev = "v3.3.10";
+      sha256 = "1x2ii1hj8jraba8rbxz6dmc03y3sjxdnzipdvg6fywnlq1f3l3wl";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-etcd";
+      rev = "v2.0.0";
+      sha256 = "1xb34hzaa1lkbq5vkzy9vcz6gqwj7hp6cdbvyack2bf28dwn33jj";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-semver";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-semver";
+      rev = "v0.2.0";
+      sha256 = "1gghi5bnqj50hfxhqc1cxmynqmh2yk9ii7ab9gsm75y5cp94ymk0";
+    };
+  }
+  {
+    goPackagePath = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev = "v1.1.1";
+      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
+    };
+  }
+  {
+    goPackagePath = "github.com/emirpasic/gods";
+    fetch = {
+      type = "git";
+      url = "https://github.com/emirpasic/gods";
+      rev = "v1.9.0";
+      sha256 = "1zhkppqzy149fp561pif8d5d92jd9chl3l9z4yi5f8n60ibdmmjf";
+    };
+  }
+  {
+    goPackagePath = "github.com/fatih/color";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fatih/color";
+      rev = "v1.7.0";
+      sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
+    };
+  }
+  {
+    goPackagePath = "github.com/flynn/go-shlex";
+    fetch = {
+      type = "git";
+      url = "https://github.com/flynn/go-shlex";
+      rev = "3f9db97f8568";
+      sha256 = "1j743lysygkpa2s2gii2xr32j7bxgc15zv4113b0q9jhn676ysia";
+    };
+  }
+  {
+    goPackagePath = "github.com/fsnotify/fsnotify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsnotify/fsnotify";
+      rev = "v1.4.7";
+      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
+    };
+  }
+  {
+    goPackagePath = "github.com/gliderlabs/ssh";
+    fetch = {
+      type = "git";
+      url = "https://github.com/gliderlabs/ssh";
+      rev = "v0.1.1";
+      sha256 = "0bylkc7yg8bxxffhchikcnzwli5n95cfmbji6v2a4mn1h5n36mdm";
+    };
+  }
+  {
+    goPackagePath = "github.com/google/go-cmp";
+    fetch = {
+      type = "git";
+      url = "https://github.com/google/go-cmp";
+      rev = "v0.2.0";
+      sha256 = "1fbv0x27k9sn8svafc0hjwsnckk864lv4yi7bvzrxvmd3d5hskds";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/hcl";
+      rev = "v1.0.0";
+      sha256 = "0q6ml0qqs0yil76mpn4mdx4lp94id8vbv575qm60jzl1ijcl5i66";
+    };
+  }
+  {
+    goPackagePath = "github.com/jbenet/go-context";
+    fetch = {
+      type = "git";
+      url = "https://github.com/jbenet/go-context";
+      rev = "d14ea06fba99";
+      sha256 = "0q91f5549n81w3z5927n4a1mdh220bdmgl42zi3h992dcc4ls0sl";
+    };
+  }
+  {
+    goPackagePath = "github.com/jessevdk/go-flags";
+    fetch = {
+      type = "git";
+      url = "https://github.com/jessevdk/go-flags";
+      rev = "v1.4.0";
+      sha256 = "0algnnigph27spgn655zm4723yfjxjjvlf4k14z9drj3682df25a";
+    };
+  }
+  {
+    goPackagePath = "github.com/jroimartin/gocui";
+    fetch = {
+      type = "git";
+      url = "https://github.com/jroimartin/gocui";
+      rev = "v0.4.0";
+      sha256 = "1b1cbjg925l1c5v3ls8amni9716190yzf847cqs9wjnj82z8qa47";
+    };
+  }
+  {
+    goPackagePath = "github.com/kevinburke/ssh_config";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kevinburke/ssh_config";
+      rev = "81db2a75821e";
+      sha256 = "0hwmv2h83aa7r6l7yqwsxdyldnlhb4gbbkc3ww9nys7impjcjnsp";
+    };
+  }
+  {
+    goPackagePath = "github.com/konsorten/go-windows-terminal-sequences";
+    fetch = {
+      type = "git";
+      url = "https://github.com/konsorten/go-windows-terminal-sequences";
+      rev = "v1.0.1";
+      sha256 = "1lchgf27n276vma6iyxa0v1xds68n2g8lih5lavqnx5x6q5pw2ip";
+    };
+  }
+  {
+    goPackagePath = "github.com/kr/pretty";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kr/pretty";
+      rev = "v0.1.0";
+      sha256 = "18m4pwg2abd0j9cn5v3k2ksk9ig4vlwxmlw9rrglanziv9l967qp";
+    };
+  }
+  {
+    goPackagePath = "github.com/kr/pty";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kr/pty";
+      rev = "v1.1.1";
+      sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6";
+    };
+  }
+  {
+    goPackagePath = "github.com/kr/text";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kr/text";
+      rev = "v0.1.0";
+      sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1";
+    };
+  }
+  {
+    goPackagePath = "github.com/magiconair/properties";
+    fetch = {
+      type = "git";
+      url = "https://github.com/magiconair/properties";
+      rev = "v1.8.0";
+      sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn";
+    };
+  }
+  {
+    goPackagePath = "github.com/mattn/go-colorable";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-colorable";
+      rev = "v0.1.1";
+      sha256 = "0l640974j804c1yyjfgyxqlsivz0yrzmbql4mhcw2azryigkp08p";
+    };
+  }
+  {
+    goPackagePath = "github.com/mattn/go-isatty";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-isatty";
+      rev = "v0.0.7";
+      sha256 = "1i77aq4gf9as03m8fpfh8fq49n4z9j7548blrcsidm1xhslzk5xd";
+    };
+  }
+  {
+    goPackagePath = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev = "v0.0.4";
+      sha256 = "00b3ssm7wiqln3k54z2wcnxr3k3c7m1ybyhb9h8ixzbzspld0qzs";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/go-homedir";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/go-homedir";
+      rev = "v1.0.0";
+      sha256 = "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev = "v1.1.2";
+      sha256 = "03bpv28jz9zhn4947saqwi328ydj7f6g6pf1m2d4m5zdh5jlfkrr";
+    };
+  }
+  {
+    goPackagePath = "github.com/nsf/termbox-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/nsf/termbox-go";
+      rev = "288510b9734e";
+      sha256 = "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-buffruneio";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-buffruneio";
+      rev = "v0.2.0";
+      sha256 = "0l83p1gg6g5mmhmxjisrhfimhbm71lwn1r2w7d6siwwqm9q08sd2";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-toml";
+      rev = "v1.2.0";
+      sha256 = "1fjzpcjng60mc3a4b2ql5a00d5gah84wj740dabv9kq67mpg8fxy";
+    };
+  }
+  {
+    goPackagePath = "github.com/pkg/errors";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pkg/errors";
+      rev = "v0.8.0";
+      sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
+    };
+  }
+  {
+    goPackagePath = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev = "v1.0.0";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+  {
+    goPackagePath = "github.com/sergi/go-diff";
+    fetch = {
+      type = "git";
+      url = "https://github.com/sergi/go-diff";
+      rev = "v1.0.0";
+      sha256 = "0swiazj8wphs2zmk1qgq75xza6m19snif94h2m6fi8dqkwqdl7c7";
+    };
+  }
+  {
+    goPackagePath = "github.com/sirupsen/logrus";
+    fetch = {
+      type = "git";
+      url = "https://github.com/sirupsen/logrus";
+      rev = "v1.4.0";
+      sha256 = "1y1qjcg19z7q9sy32rhc148kdql2aw7xkcm9d6r1blrl0mdgpx0w";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/afero";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/afero";
+      rev = "v1.1.2";
+      sha256 = "0miv4faf5ihjfifb1zv6aia6f6ik7h1s4954kcb8n6ixzhx9ck6k";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cast";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cast";
+      rev = "v1.3.0";
+      sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/jwalterweatherman";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/jwalterweatherman";
+      rev = "v1.0.0";
+      sha256 = "093fmmvavv84pv4q84hav7ph3fmrq87bvspjj899q0qsx37yvdr8";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "v1.0.3";
+      sha256 = "1cj3cjm7d3zk0mf1xdybh0jywkbbw7a6yr3y22x9sis31scprswd";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/viper";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/viper";
+      rev = "v1.3.2";
+      sha256 = "1829hvf805kda65l59r17wvid7y0vr390s23zfhf4w7vdb4wp3zh";
+    };
+  }
+  {
+    goPackagePath = "github.com/src-d/gcfg";
+    fetch = {
+      type = "git";
+      url = "https://github.com/src-d/gcfg";
+      rev = "v1.4.0";
+      sha256 = "044j95skmyrwjw5fwjk6ka32rjgsg0ar0mfp9np19sh1acwv4x4r";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/objx";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/objx";
+      rev = "v0.1.1";
+      sha256 = "0iph0qmpyqg4kwv8jsx6a56a7hhqq8swrazv40ycxk9rzr0s8yls";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "v1.2.2";
+      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
+    };
+  }
+  {
+    goPackagePath = "github.com/ugorji/go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/ugorji/go";
+      rev = "d75b2dcb6bc8";
+      sha256 = "0di1k35gpq9bp958ywranpbskx2vdwlb38s22vl9rybm3wa5g3ps";
+    };
+  }
+  {
+    goPackagePath = "github.com/xanzy/ssh-agent";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xanzy/ssh-agent";
+      rev = "v0.2.0";
+      sha256 = "069nlriymqswg52ggiwi60qhwrin9nzhd2g65a7h59z2qbcvk2hy";
+    };
+  }
+  {
+    goPackagePath = "github.com/xordataexchange/crypt";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xordataexchange/crypt";
+      rev = "b2862e3d0a77";
+      sha256 = "04q3856anpzl4gdfgmg7pbp9cx231nkz3ymq2xp27rnmmwhfxr8y";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "505ab145d0a9";
+      sha256 = "1vbsvcvmjz6c00p5vf8ls533p52fx2y3gy6v4k5qrdlzl4wf0i5s";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/net";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/net";
+      rev = "161cd47e91fd";
+      sha256 = "0254ld010iijygbzykib2vags1dc0wlmcmhgh4jl8iny159lhbcv";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sync";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sync";
+      rev = "e225da77a7e6";
+      sha256 = "0bh3583smcfw6jw3w6lp0za93rz7hpxfdz8vhxng75b7a6vdlw4p";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "a9d3bda3a223";
+      sha256 = "1w45zc13xrjzl19s1sx74r5mg3lf2z2nm13wygcdq5r5pyjlhdz9";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "v0.3.0";
+      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/alecthomas/kingpin.v2";
+      rev = "v2.2.6";
+      sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/check.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/check.v1";
+      rev = "788fd7840127";
+      sha256 = "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/src-d/go-billy.v4";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/src-d/go-billy.v4";
+      rev = "v4.2.1";
+      sha256 = "1n8nc0m2hidbrlcl643cd0bdm07pjr0qji47gbfpfj99791sv1d1";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/src-d/go-git-fixtures.v3";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/src-d/go-git-fixtures.v3";
+      rev = "v3.1.1";
+      sha256 = "1fq3j5chck6883jbn33gwm6dxdgzsphjq97psyn81hz9bc1ili8p";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/src-d/go-git.v4";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/src-d/go-git.v4";
+      rev = "v4.10.0";
+      sha256 = "18bx3m5ddvb20figd8pc3lgf9hn85pifc6xy72bb83lv2nxii2rx";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/warnings.v0";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/warnings.v0";
+      rev = "v0.1.2";
+      sha256 = "1kzj50jn708cingn7a13c2wdlzs6qv89dr2h4zj8d09647vlnd81";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "v2.2.2";
+      sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
new file mode 100644
index 000000000000..1307573990a9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
@@ -0,0 +1,41 @@
+{ pkgs, stdenv, fetchFromGitHub }:
+
+with pkgs.lib;
+
+stdenv.mkDerivation rec {
+  pname = "gitflow";
+  version = "1.12.2";
+
+  src = fetchFromGitHub {
+    owner = "petervanderdoes";
+    repo = pname;
+    rev = version;
+    sha256 = "0smwlc1wa4ndvspc9x6f4jwnzr58achysrhhip402j98d7di8hw5";
+  };
+
+  buildInputs = [ pkgs.makeWrapper ];
+
+  preBuild = ''
+    makeFlagsArray+=(prefix="$out")
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/git-flow \
+      --set FLAGS_GETOPT_CMD ${pkgs.getopt}/bin/getopt \
+      --suffix PATH : ${pkgs.git}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/petervanderdoes/gitflow";
+    description = "Extend git with the Gitflow branching model";
+    longDescription = ''
+      A set of scripts that provide high-level repository operations
+      for managing feature/release/hotfix branches in a Git repository,
+      particularly suited to be utilised to follow Vincent Driessen's
+      branching model.
+    '';
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ offline ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix
new file mode 100644
index 000000000000..eab382386ef6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix
@@ -0,0 +1,30 @@
+{ callPackage, stdenv, fetchFromGitHub, ...}:
+
+stdenv.mkDerivation {
+  pname = "gitstatus";
+  version = "unstable-2020-04-21";
+
+  src = fetchFromGitHub {
+    owner = "romkatv";
+    repo = "gitstatus";
+    rev = "3494f25b0b3b2eac241cf669d1fea2b49ea42fb3";
+    sha256 = "0b4g14dkkgih6zps2w1krl9xf44ysj02617zj1k51z127v2lpm1f";
+  };
+
+  buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
+  patchPhase = ''
+    sed -i "1i GITSTATUS_DAEMON=$out/bin/gitstatusd" gitstatus.plugin.zsh
+  '';
+  installPhase = ''
+    install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
+    install -Dm444 gitstatus.plugin.zsh $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "10x faster implementation of `git status` command";
+    homepage = "https://github.com/romkatv/gitstatus";
+    license = [ licenses.gpl3 ];
+
+    maintainers = with maintainers; [ mmlb hexa ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix
new file mode 100644
index 000000000000..e4cd58bf0f02
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix
@@ -0,0 +1,21 @@
+{ fetchFromGitHub, libgit2, ...}:
+
+libgit2.overrideAttrs (oldAttrs: {
+  cmakeFlags = oldAttrs.cmakeFlags ++ [
+    "-DBUILD_CLAR=OFF"
+    "-DBUILD_SHARED_LIBS=OFF"
+    "-DREGEX_BACKEND=builtin"
+    "-DUSE_BUNDLED_ZLIB=ON"
+    "-DUSE_HTTPS=OFF"
+    "-DUSE_HTTP_PARSER=builtin"  # overwritten from libgit2
+    "-DUSE_ICONV=OFF"
+    "-DUSE_SSH=OFF"
+    "-DZERO_NSEC=ON"
+  ];
+  src = fetchFromGitHub {
+    owner = "romkatv";
+    repo = "libgit2";
+    rev = "bb77509f4436901f3958e30272026f63d2247d7d";
+    sha256 = "06iypr0sc6g11xipwfbgm6f039d4qy9krmwb3zww8k4y004s5jcv";
+  };
+})
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitui/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitui/default.nix
new file mode 100644
index 000000000000..aebff6a07ab6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitui/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, rustPlatform, fetchFromGitHub, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "gitui";
+  version = "0.2.1";
+
+  src = fetchFromGitHub {
+    owner = "extrawurst";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0ln959zsdn0w15kfyp5i4524hzzk23l31n9smi1md4jfj7jycbh1";
+  };
+
+  cargoSha256 = "128g23pcccy07jcb4phlfag9ixh5fkwkaiyd7mxjh3wmhppjcx0i";
+
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  meta = with stdenv.lib; {
+    description = "Blazing fast terminal-ui for git written in rust";
+    homepage = "https://github.com/extrawurst/gitui";
+    license = licenses.mit;
+    maintainers = with maintainers; [ filalex77 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix
new file mode 100644
index 000000000000..b6659b5f539f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, buildEnv, git, fetchFromGitHub
+, gitwebTheme ? false }:
+
+let
+  gitwebThemeSrc = fetchFromGitHub {
+    owner = "kogakure";
+    repo = "gitweb-theme";
+    rev = "049b88e664a359f8ec25dc6f531b7e2aa60dd1a2";
+    extraPostFetch = ''
+      mkdir -p "$TMPDIR/gitwebTheme"
+      mv "$out"/* "$TMPDIR/gitwebTheme/"
+      mkdir "$out/static"
+      mv "$TMPDIR/gitwebTheme"/* "$out/static/"
+    '';
+    sha256 = "17hypq6jvhy6zhh26lp3nyi52npfd5wy5752k6sq0shk4na2acqi";
+  };
+in buildEnv {
+  name = "gitweb-${stdenv.lib.getVersion git}";
+
+  ignoreCollisions = true;
+  paths = stdenv.lib.optional gitwebTheme gitwebThemeSrc
+       ++ [ "${git}/share/gitweb" ];
+
+  meta = git.meta // {
+    maintainers = with stdenv.lib.maintainers; [ gnidorah ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix
new file mode 100644
index 000000000000..64a4f8a823ce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, buildGoPackage, fetchFromGitHub, curl, ncurses, pkgconfig, readline
+, cmake }:
+let
+  version = "0.3.2";
+in
+buildGoPackage {
+  pname = "grv";
+  inherit version;
+
+  buildInputs = [ ncurses readline curl ];
+  nativeBuildInputs = [ pkgconfig cmake ];
+
+  goPackagePath = "github.com/rgburke/grv";
+
+  src = fetchFromGitHub {
+    owner = "rgburke";
+    repo = "grv";
+    rev = "v${version}";
+    sha256 = "0bpjsk35rlp56z8149z890adnhmxyh743vsls3q86j4682b83kyf";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    rm util/update_latest_release.go
+  '';
+
+  postConfigure = ''
+    cd $NIX_BUILD_TOP/go/src/$goPackagePath
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+    make build-only
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -D grv $out/bin/grv
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "GRV is a terminal interface for viewing Git repositories";
+    homepage = "https://github.com/rgburke/grv";
+    license = licenses.gpl3;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ andir ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix
new file mode 100644
index 000000000000..22ffd442fdc9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, utillinux }:
+
+buildGoPackage rec {
+  pname = "hub";
+  version = "2.14.2";
+
+  goPackagePath = "github.com/github/hub";
+
+  # Only needed to build the man-pages
+  excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
+
+  src = fetchFromGitHub {
+    owner = "github";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1qjab3dpia1jdlszz3xxix76lqrm4zbmqzd9ymld7h06awzsg2vh";
+  };
+
+  nativeBuildInputs = [ groff installShellFiles utillinux ];
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  postInstall = ''
+    cd go/src/${goPackagePath}
+    installShellCompletion --zsh --name _hub etc/hub.zsh_completion
+    installShellCompletion --bash --name hub etc/hub.bash_completion.sh
+    installShellCompletion --fish --name hub.fish etc/hub.fish_completion
+
+    LC_ALL=C.UTF8 \
+    make man-pages
+    installManPage share/man/man[1-9]/*.[1-9]
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Command-line wrapper for git that makes you better at GitHub";
+    license = licenses.mit;
+    homepage = "https://hub.github.com/";
+    maintainers = with maintainers; [ globin ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix
new file mode 100644
index 000000000000..5a00d6b1f86f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "lab";
+  version = "0.17.2";
+
+  src = fetchFromGitHub {
+    owner = "zaquestion";
+    repo = "lab";
+    rev = "v${version}";
+    sha256 = "0zkwvmzgj7h8lc8jkg2a81392b28c8hkwqzj6dds6q4asbmymx5c";
+  };
+
+  subPackages = [ "." ];
+
+  modSha256 = "03fqa7s6729g0a6ffiyc61dkldpi7vg8pvvpqak4c0mqi1dycivd";
+
+  buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
+
+  postInstall = ''
+    mkdir -p "$out/share/bash-completion/completions" "$out/share/zsh/site-functions"
+    export LAB_CORE_HOST=a LAB_CORE_USER=b LAB_CORE_TOKEN=c
+    $out/bin/lab completion bash > $out/share/bash-completion/completions/lab
+    $out/bin/lab completion zsh > $out/share/zsh/site-functions/_lab
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab";
+    homepage = "https://zaquestion.github.io/lab";
+    license = licenses.cc0;
+    maintainers = with maintainers; [ marsam dtzWill ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix
new file mode 100644
index 000000000000..9fc89d520ae9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "lefthook";
+  version = "0.7.1";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "Arkweid";
+    repo = "lefthook";
+    sha256 = "14rcvbzzrx0m3xijl8qhw5l2h0q10hqzad2hqm3079g893f2qad0";
+  };
+
+  modSha256 = "0ih11gw2y9dhv3zw1fzjmdfjln5h6zg1bj7sl68cglf6743siqnq";
+
+  meta = with stdenv.lib; {
+    description = "Fast and powerful Git hooks manager for any type of projects";
+    homepage = "https://github.com/Arkweid/lefthook";
+    license = licenses.mit;
+    maintainers = with maintainers; [ rencire ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/legit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/legit/default.nix
new file mode 100644
index 000000000000..7dbdd6071a57
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/legit/default.nix
@@ -0,0 +1,30 @@
+{ lib, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "legit";
+  version = "1.2.0";
+  src = python3Packages.fetchPypi {
+    inherit pname version;
+    sha256 = "0ngh3ar6v15516f52j21k6qz7hykmxfjadhb2rakvl27b5xvjy1c";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    click
+    clint
+    crayons
+    GitPython
+    six
+  ];
+
+  # Prevent tests from trying to create configuration in /homeless-shelter.
+  preCheck = ''
+    export HOME=$PWD/test-home
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/frostming/legit";
+    description = "Git for Humans, Inspired by GitHub for Mac";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ ryneeverett ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix
new file mode 100644
index 000000000000..5c4ece7c9e51
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, buildPythonApplication, fetchFromGitHub, pyxdg }:
+
+buildPythonApplication rec {
+  pname   = "pass-git-helper";
+  version = "0.4";
+
+  src = fetchFromGitHub {
+    owner  = "languitar";
+    repo   = "pass-git-helper";
+    rev    = version;
+    sha256 = "1zccbmq5l6asl9qm1f90vg9467y3spmv3ayrw07qizrj43yfd9ap";
+  };
+
+  propagatedBuildInputs = [ pyxdg ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/languitar/pass-git-helper";
+    description = "A git credential helper interfacing with pass, the standard unix password manager";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ vanzef ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix
new file mode 100644
index 000000000000..24743b21a4dd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/qgit/default.nix
@@ -0,0 +1,25 @@
+{ mkDerivation, lib, fetchFromGitHub, cmake, qtbase }:
+
+mkDerivation rec {
+  pname = "qgit";
+  version = "2.9";
+
+  src = fetchFromGitHub {
+    owner = "tibirna";
+    repo = "qgit";
+    rev = "${pname}-${version}";
+    sha256 = "0n4dq9gffm9yd7n5p5qcdfgrmg2kwnfd51hfx10adgj9ibxlnc3z";
+  };
+
+  buildInputs = [ qtbase ];
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    license = licenses.gpl2;
+    homepage = "https://github.com/tibirna/qgit";
+    description = "Graphical front-end to Git";
+    maintainers = with maintainers; [ peterhoeg markuskowa ];
+    inherit (qtbase.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/default.nix
new file mode 100644
index 000000000000..de8cb396b7fc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  pname = "scmpuff";
+  version = "0.3.0";
+  goPackagePath = "github.com/mroth/scmpuff";
+
+  goDeps = ./deps.nix;
+
+  src = fetchFromGitHub {
+    owner = "mroth";
+    repo = pname;
+    rev = "56dc2041f2c45ab15d41e63058c1c44fff905e81";
+    sha256 = "0zrzzcs0i13pfwcqh8qb0sji54vh37rdr7qasg57y56cqpx16vl3";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Add numbered shortcuts to common git commands";
+    homepage = "https://github.com/mroth/scmpuff";
+    license = licenses.mit;
+    maintainers = with maintainers; [ cpcloud ];
+    platforms = concatLists (with platforms; [ linux darwin windows ]);
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/deps.nix
new file mode 100644
index 000000000000..da9052f9bb7b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/deps.nix
@@ -0,0 +1,273 @@
+# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
+[
+  {
+    goPackagePath = "github.com/BurntSushi/toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/BurntSushi/toml";
+      rev = "v0.3.1";
+      sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
+    };
+  }
+  {
+    goPackagePath = "github.com/armon/consul-api";
+    fetch = {
+      type = "git";
+      url = "https://github.com/armon/consul-api";
+      rev = "eb2c6b5be1b6";
+      sha256 = "1j6fdr1sg36qy4n4xjl7brq739fpm5npq98cmvklzjc9qrx98nk9";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/etcd";
+      rev = "v3.3.10";
+      sha256 = "1x2ii1hj8jraba8rbxz6dmc03y3sjxdnzipdvg6fywnlq1f3l3wl";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-etcd";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-etcd";
+      rev = "v2.0.0";
+      sha256 = "1xb34hzaa1lkbq5vkzy9vcz6gqwj7hp6cdbvyack2bf28dwn33jj";
+    };
+  }
+  {
+    goPackagePath = "github.com/coreos/go-semver";
+    fetch = {
+      type = "git";
+      url = "https://github.com/coreos/go-semver";
+      rev = "v0.2.0";
+      sha256 = "1gghi5bnqj50hfxhqc1cxmynqmh2yk9ii7ab9gsm75y5cp94ymk0";
+    };
+  }
+  {
+    goPackagePath = "github.com/cpuguy83/go-md2man";
+    fetch = {
+      type = "git";
+      url = "https://github.com/cpuguy83/go-md2man";
+      rev = "v1.0.10";
+      sha256 = "1bqkf2bvy1dns9zd24k81mh2p1zxsx2nhq5cj8dz2vgkv1xkh60i";
+    };
+  }
+  {
+    goPackagePath = "github.com/davecgh/go-spew";
+    fetch = {
+      type = "git";
+      url = "https://github.com/davecgh/go-spew";
+      rev = "v1.1.1";
+      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
+    };
+  }
+  {
+    goPackagePath = "github.com/fsnotify/fsnotify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fsnotify/fsnotify";
+      rev = "v1.4.7";
+      sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g";
+    };
+  }
+  {
+    goPackagePath = "github.com/hashicorp/hcl";
+    fetch = {
+      type = "git";
+      url = "https://github.com/hashicorp/hcl";
+      rev = "v1.0.0";
+      sha256 = "0q6ml0qqs0yil76mpn4mdx4lp94id8vbv575qm60jzl1ijcl5i66";
+    };
+  }
+  {
+    goPackagePath = "github.com/inconshreveable/mousetrap";
+    fetch = {
+      type = "git";
+      url = "https://github.com/inconshreveable/mousetrap";
+      rev = "v1.0.0";
+      sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152";
+    };
+  }
+  {
+    goPackagePath = "github.com/magiconair/properties";
+    fetch = {
+      type = "git";
+      url = "https://github.com/magiconair/properties";
+      rev = "v1.8.0";
+      sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/go-homedir";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/go-homedir";
+      rev = "v1.1.0";
+      sha256 = "0ydzkipf28hwj2bfxqmwlww47khyk6d152xax4bnyh60f4lq3nx1";
+    };
+  }
+  {
+    goPackagePath = "github.com/mitchellh/mapstructure";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mitchellh/mapstructure";
+      rev = "v1.1.2";
+      sha256 = "03bpv28jz9zhn4947saqwi328ydj7f6g6pf1m2d4m5zdh5jlfkrr";
+    };
+  }
+  {
+    goPackagePath = "github.com/pelletier/go-toml";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pelletier/go-toml";
+      rev = "v1.2.0";
+      sha256 = "1fjzpcjng60mc3a4b2ql5a00d5gah84wj740dabv9kq67mpg8fxy";
+    };
+  }
+  {
+    goPackagePath = "github.com/pmezard/go-difflib";
+    fetch = {
+      type = "git";
+      url = "https://github.com/pmezard/go-difflib";
+      rev = "v1.0.0";
+      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
+    };
+  }
+  {
+    goPackagePath = "github.com/russross/blackfriday";
+    fetch = {
+      type = "git";
+      url = "https://github.com/russross/blackfriday";
+      rev = "v1.5.2";
+      sha256 = "0jzbfzcywqcrnym4gxlz6nphmm1grg6wsl4f0r9x384rn83wkj7c";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/afero";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/afero";
+      rev = "v1.1.2";
+      sha256 = "0miv4faf5ihjfifb1zv6aia6f6ik7h1s4954kcb8n6ixzhx9ck6k";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cast";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cast";
+      rev = "v1.3.0";
+      sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/cobra";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/cobra";
+      rev = "v0.0.4";
+      sha256 = "1k7dq78fjz94lzifsprkmiv93swwzwcbg1vd64v20wvnga8v254b";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/jwalterweatherman";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/jwalterweatherman";
+      rev = "v1.0.0";
+      sha256 = "093fmmvavv84pv4q84hav7ph3fmrq87bvspjj899q0qsx37yvdr8";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/pflag";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/pflag";
+      rev = "v1.0.3";
+      sha256 = "1cj3cjm7d3zk0mf1xdybh0jywkbbw7a6yr3y22x9sis31scprswd";
+    };
+  }
+  {
+    goPackagePath = "github.com/spf13/viper";
+    fetch = {
+      type = "git";
+      url = "https://github.com/spf13/viper";
+      rev = "v1.3.2";
+      sha256 = "1829hvf805kda65l59r17wvid7y0vr390s23zfhf4w7vdb4wp3zh";
+    };
+  }
+  {
+    goPackagePath = "github.com/stretchr/testify";
+    fetch = {
+      type = "git";
+      url = "https://github.com/stretchr/testify";
+      rev = "v1.2.2";
+      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
+    };
+  }
+  {
+    goPackagePath = "github.com/ugorji/go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/ugorji/go";
+      rev = "d75b2dcb6bc8";
+      sha256 = "0di1k35gpq9bp958ywranpbskx2vdwlb38s22vl9rybm3wa5g3ps";
+    };
+  }
+  {
+    goPackagePath = "github.com/xordataexchange/crypt";
+    fetch = {
+      type = "git";
+      url = "https://github.com/xordataexchange/crypt";
+      rev = "b2862e3d0a77";
+      sha256 = "04q3856anpzl4gdfgmg7pbp9cx231nkz3ymq2xp27rnmmwhfxr8y";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/crypto";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/crypto";
+      rev = "505ab145d0a9";
+      sha256 = "1vbsvcvmjz6c00p5vf8ls533p52fx2y3gy6v4k5qrdlzl4wf0i5s";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/sys";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/sys";
+      rev = "a5c9d58dba9a";
+      sha256 = "02qv5i7yps35p7fa81345qz7k8i73gkigj69anwmpw9rhpmzayf9";
+    };
+  }
+  {
+    goPackagePath = "golang.org/x/text";
+    fetch = {
+      type = "git";
+      url = "https://go.googlesource.com/text";
+      rev = "v0.3.0";
+      sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/check.v1";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/check.v1";
+      rev = "20d25e280405";
+      sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/yaml.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/yaml.v2";
+      rev = "v2.2.2";
+      sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
+    };
+  }
+]
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
new file mode 100644
index 000000000000..2cd4adce9397
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, python2, git }:
+
+let
+  name = "stgit-${version}";
+  version = "0.22";
+in
+stdenv.mkDerivation {
+  inherit name;
+
+  src = fetchFromGitHub {
+    owner = "ctmarinas";
+    repo = "stgit";
+    rev = "v${version}";
+    sha256 = "0xpvs5fa50rrvl2c8naha1nblk5ip2mgg63a9srqqxfx6z8qmrfz";
+  };
+
+  buildInputs = [ python2 git ];
+
+  makeFlags = [ "prefix=$$out" ];
+
+  postInstall = ''
+    mkdir -p "$out/etc/bash_completion.d/"
+    ln -s ../../share/stgit/completion/stgit-completion.bash "$out/etc/bash_completion.d/"
+  '';
+
+  doCheck = false;
+  checkTarget = "test";
+
+  meta = with stdenv.lib; {
+    description = "A patch manager implemented on top of Git";
+    homepage = "http://procode.org/stgit/";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix
new file mode 100644
index 000000000000..1fd70aab4611
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, unzip, makeWrapper, jre }:
+
+stdenv.mkDerivation rec {
+  name = "subgit-3.3.9";
+
+  meta = {
+    description = "A tool for a smooth, stress-free SVN to Git migration";
+    longDescription = "Create writable Git mirror of a local or remote Subversion repository and use both Subversion and Git as long as you like. You may also do a fast one-time import from Subversion to Git.";
+    homepage = "http://subgit.com";
+    license = stdenv.lib.licenses.unfree;
+    platforms = stdenv.lib.platforms.all;
+  };
+
+  nativeBuildInputs = [ unzip makeWrapper ];
+
+  installPhase = ''
+    mkdir $out;
+    cp -r bin lib $out;
+    wrapProgram $out/bin/subgit --set JAVA_HOME ${jre};
+  '';
+
+  src = fetchurl {
+    url = "https://subgit.com/download/${name}.zip";
+    sha256 = "0dwd2kymmprci3b61ayr6axzlkc8zgbc40jqxvvyzschfxw9y0v5";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix
new file mode 100644
index 000000000000..75f6a9608412
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, qmake, qtbase, qttools, subversion, apr }:
+
+let
+  version = "1.0.18";
+in
+stdenv.mkDerivation {
+  pname = "svn-all-fast-export";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "svn-all-fast-export";
+    repo = "svn2git";
+    rev = version;
+    sha256 = "1b5yx2316hbyvw3v30vn1ljma9yd21nd59wis1gi34g92lgvqcd6";
+  };
+
+  nativeBuildInputs = [ qmake qttools ];
+  buildInputs = [ apr.dev subversion.dev qtbase ];
+
+  qmakeFlags = [
+    "VERSION=${version}"
+    "APR_INCLUDE=${apr.dev}/include/apr-1"
+    "SVN_INCLUDE=${subversion.dev}/include/subversion-1"
+  ];
+
+  NIX_LDFLAGS = "-lsvn_fs-1";
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/svn-all-fast-export/svn2git";
+    description = "A fast-import based converter for an svn repo to git repos";
+    license = licenses.gpl3;
+    platforms = platforms.all;
+    maintainers = [ maintainers.flokli ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
new file mode 100644
index 000000000000..b61ae80bbee1
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, ruby, makeWrapper, git }:
+
+let
+  version = "2.4.0";
+in
+stdenv.mkDerivation {
+  pname = "svn2git";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://github.com/nirvdrum/svn2git/archive/v${version}.tar.gz";
+    sha256 = "0ly2vrv6q31n0xhciwb7a1ilr5c6ndyi3bg81yfp4axiypps7l41";
+  };
+
+  buildInputs = [ ruby makeWrapper ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r lib $out/
+
+    mkdir -p $out/bin
+    substituteInPlace bin/svn2git --replace '/usr/bin/env ruby' ${ruby}/bin/ruby
+    cp bin/svn2git $out/bin/
+    chmod +x $out/bin/svn2git
+
+    wrapProgram $out/bin/svn2git \
+      --set RUBYLIB $out/lib \
+      --prefix PATH : ${git}/bin
+  '';
+
+  meta = {
+    homepage = "https://github.com/nirvdrum/svn2git";
+    description = "Tool for importing Subversion repositories into git";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/default.nix
new file mode 100644
index 000000000000..4a02baa465c6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, fetchFromGitHub
+, crystal_0_33
+}:
+
+let
+  crystal = crystal_0_33;
+
+in crystal.buildCrystalPackage rec {
+  pname = "thicket";
+  version = "0.1.3";
+
+  src = fetchFromGitHub {
+    owner = "taylorthurlow";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0hkmmssiwipx373d0zw9a2yn72gqzqzcvwkqbs522m5adz6qmkzw";
+  };
+
+  format = "shards";
+
+  shardsFile = ./shards.nix;
+  crystalBinaries.thicket.src = "src/thicket.cr";
+
+  # there is one test that tries to clone a repo
+  doCheck = false;
+
+  meta = with lib; {
+    description = "A better one-line git log";
+    homepage = "https://github.com/taylorthurlow/thicket";
+    license = licenses.mit;
+    maintainers = with maintainers; [ filalex77 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/shards.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/shards.nix
new file mode 100644
index 000000000000..c8839651a26d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/thicket/shards.nix
@@ -0,0 +1,8 @@
+{
+  ameba = {
+    owner = "veelenga";
+    repo = "ameba";
+    rev = "v0.10.0";
+    sha256 = "1yjxzwdhigsyjn0qp362jkj85qvg4dsyzal00pgr1srnh2xry912";
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix
new file mode 100644
index 000000000000..cb03a9b42a25
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, ncurses, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45
+, readline, makeWrapper, git, libiconv, autoreconfHook, findXMLCatalogs, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tig";
+  version = "2.5.1";
+
+  src = fetchFromGitHub {
+    owner = "jonas";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "0wxcbfqsk8p84zizy6lf3gp5j122wrf8c7xlipki6nhcfhksn33b";
+  };
+
+  nativeBuildInputs = [ makeWrapper autoreconfHook asciidoc xmlto docbook_xsl docbook_xml_dtd_45 findXMLCatalogs pkgconfig ];
+
+  autoreconfFlags = "-I tools -v";
+
+  buildInputs = [ ncurses readline git ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
+
+  # those files are inherently impure, we'll handle the corresponding dependencies.
+  postPatch = ''
+      rm -f contrib/config.make-*
+  '';
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    make install
+    make install-doc
+
+    # fixes tig-completion __git-complete dependency
+    sed -i '1s;^;source ${git}/share/bash-completion/completions/git\n;' contrib/tig-completion.bash
+
+    substituteInPlace contrib/tig-completion.zsh \
+      --replace 'e=$(dirname ''${funcsourcetrace[1]%:*})/tig-completion.bash' "e=$out/share/bash-completion/completions/tig"
+
+    install -D contrib/tig-completion.bash $out/share/bash-completion/completions/tig
+    install -D contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig
+    cp contrib/vim.tigrc $out/etc/
+
+    wrapProgram $out/bin/tig \
+      --prefix PATH ':' "${git}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://jonas.github.io/tig/";
+    description = "Text-mode interface for git";
+    maintainers = with maintainers; [ bjornfor domenkozar qknight globin ];
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix
new file mode 100644
index 000000000000..0da0cfa02b63
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, git, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "topgit";
+  version = "0.19.12";
+
+  src = fetchFromGitHub {
+    owner = "mackyle";
+    repo = "topgit";
+    rev = "${pname}-${version}";
+    sha256 = "1wvf8hmwwl7a2fr17cfs3pbxjccdsjw9ngzivxlgja0gvfz4hjd5";
+  };
+
+  makeFlags = [ "prefix=${placeholder "out"}" ];
+
+  nativeBuildInputs = [ perl git ];
+
+  postInstall = ''
+    install -Dm644 README -t"$out/share/doc/${pname}-${version}/"
+    install -Dm755 contrib/tg-completion.bash -t "$out/etc/bash_completion.d/"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "TopGit manages large amount of interdependent topic branches";
+    homepage = "https://github.com/mackyle/topgit";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ marcweber ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix
new file mode 100644
index 000000000000..589d53b3cfaa
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub, git, makeWrapper, openssl, coreutils, utillinux, gnugrep, gnused, gawk }:
+
+stdenv.mkDerivation rec {
+  pname = "transcrypt";
+  version = "1.1.0";
+
+  src = fetchFromGitHub {
+    owner = "elasticdog";
+    repo = "transcrypt";
+    rev = "v${version}";
+    sha256 = "1dkr69plk16wllk5bzlkchrzw63pk239dgbjhrb3mb61i065jdam";
+  };
+
+  buildInputs = [ makeWrapper git openssl coreutils utillinux gnugrep gnused gawk ];
+
+  patches = [ ./helper-scripts_depspathprefix.patch ];
+
+  installPhase = ''
+    install -m 755 -D transcrypt $out/bin/transcrypt
+    install -m 644 -D man/transcrypt.1 $out/share/man/man1/transcrypt.1
+    install -m 644 -D contrib/bash/transcrypt $out/share/bash-completion/completions/transcrypt
+    install -m 644 -D contrib/zsh/_transcrypt $out/share/zsh/site-functions/_transcrypt
+
+    wrapProgram $out/bin/transcrypt \
+      --prefix PATH : "${stdenv.lib.makeBinPath [ git openssl coreutils utillinux gnugrep gnused gawk ]}"
+
+    cat > $out/bin/transcrypt-depspathprefix << EOF
+    #!${stdenv.shell}
+    echo "${stdenv.lib.makeBinPath [ git openssl coreutils gawk ]}:"
+    EOF
+    chmod +x $out/bin/transcrypt-depspathprefix
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Transparently encrypt files within a Git repository";
+    longDescription = ''
+      A script to configure transparent encryption of sensitive files stored in
+      a Git repository. Files that you choose will be automatically encrypted
+      when you commit them, and automatically decrypted when you check them
+      out. The process will degrade gracefully, so even people without your
+      encryption password can safely commit changes to the repository's
+      non-encrypted files.
+    '';
+    homepage = "https://github.com/elasticdog/transcrypt";
+    license = licenses.mit;
+    maintainers = [ maintainers.elasticdog ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/helper-scripts_depspathprefix.patch b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/helper-scripts_depspathprefix.patch
new file mode 100644
index 000000000000..925aadab3dd5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/helper-scripts_depspathprefix.patch
@@ -0,0 +1,37 @@
+diff --git a/transcrypt b/transcrypt
+index a0b562d..7888f5d 100755
+--- a/transcrypt
++++ b/transcrypt
+@@ -278,6 +278,7 @@ save_helper_scripts() {
+ 
+ 	cat <<-'EOF' > "${GIT_DIR}/crypt/clean"
+ 		#!/usr/bin/env bash
++		PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH"
+ 		filename=$1
+ 		# ignore empty files
+ 		if [[ -s $filename ]]; then
+@@ -300,6 +301,7 @@ save_helper_scripts() {
+ 
+ 	cat <<-'EOF' > "${GIT_DIR}/crypt/smudge"
+ 		#!/usr/bin/env bash
++		PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH"
+ 		tempfile=$(mktemp 2> /dev/null || mktemp -t tmp)
+ 		trap 'rm -f "$tempfile"' EXIT
+ 		cipher=$(git config --get --local transcrypt.cipher)
+@@ -309,6 +311,7 @@ save_helper_scripts() {
+ 
+ 	cat <<-'EOF' > "${GIT_DIR}/crypt/textconv"
+ 		#!/usr/bin/env bash
++		PATH="$(transcrypt-depspathprefix 2>/dev/null)$PATH"
+ 		filename=$1
+ 		# ignore empty files
+ 		if [[ -s $filename ]]; then
+@@ -351,7 +354,7 @@ save_configuration() {
+ 	git config merge.renormalize 'true'
+ 
+ 	# add a git alias for listing encrypted files
+-	git config alias.ls-crypt "!git ls-files | git check-attr --stdin filter | awk 'BEGIN { FS = \":\" }; /crypt$/{ print \$1 }'"
++	git config alias.ls-crypt "!PATH=\"\$(transcrypt-depspathprefix 2>/dev/null)\$PATH\"; git ls-files | git check-attr --stdin filter | awk 'BEGIN { FS = \":\" }; /crypt$/{ print \$1 }'"
+ }
+ 
+ # display the current configuration settings