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.nix82
-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/delta/default.nix39
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix57
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix66
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gh/default.nix42
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/ghorg/default.nix37
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/ghr/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix34
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix33
-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.nix23
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix27
-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-chglog/default.nix22
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix54
-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-delete-merged-branches/default.nix28
-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.nix36
-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.nix28
-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.nix35
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix24
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-interactive-rebase-tool/default.nix28
-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-codecommit/default.nix31
-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.nix32
-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-subset/default.nix26
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix24
-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-vanity-hash/default.nix27
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-when-merged/default.nix40
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix30
-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.nix57
-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/gitin/default.nix32
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitin/deps.nix121
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix82
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix22
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/gitui/default.nix26
-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/glab/default.nix28
-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.nix47
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix38
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix30
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/legit/default.nix28
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix26
-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/radicle-upstream/default.nix64
-rw-r--r--nixpkgs/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix33
-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.nix30
-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.nix56
-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
109 files changed, 4931 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..1ffc06536750
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bfg-repo-cleaner/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchurl, jre, makeWrapper }:
+
+let
+  version = "1.13.0";
+  jarName = "bfg-${version}.jar";
+  mavenUrl = "mirror://maven/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 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..695250a5cc47
--- /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 "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..844291b09054
--- /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";
+  };
+}
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..47d31d6c18f6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/bump2version/default.nix
@@ -0,0 +1,31 @@
+{ 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 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..f48fe4b1ec4c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/cgit/default.nix
@@ -0,0 +1,82 @@
+{ lib, stdenv, fetchurl, openssl, zlib, asciidoc, libxml2, libxslt
+, docbook_xsl, pkg-config, 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 = [ pkg-config ] ++ [ 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 : '${lib.makeBinPath [ coreutils gnused ]}'
+    done
+  '';
+
+  stripDebugList = [ "cgit" ];
+
+  meta = {
+    homepage = "https://git.zx2c4.com/cgit/about/";
+    repositories.git = "git://git.zx2c4.com/cgit";
+    description = "Web frontend for git repositories";
+    license = lib.licenses.gpl2;
+    platforms = lib.platforms.linux;
+    maintainers = with 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..f4b7d38bebcf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/darcs-to-git/default.nix
@@ -0,0 +1,80 @@
+{ lib, 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 = lib.licenses.mit;
+    platforms = lib.platforms.unix;
+  };
+}
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..4b7785374694
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/delta/default.nix
@@ -0,0 +1,39 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, rustPlatform
+, installShellFiles
+, libiconv
+, Security
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "delta";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "dandavison";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-cEVYU7vMgVxVIKztL6LHcvQjrNRRMrB5XMP/7gPCr5A=";
+  };
+
+  cargoSha256 = "sha256-iD3Cr1vo0FNyWvAN5m6ND+8sGyekgbkYmIxGTJkPEYE=";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  postInstall = ''
+    installShellCompletion --bash --name delta.bash etc/completion/completion.bash
+    installShellCompletion --zsh --name _delta etc/completion/completion.zsh
+  '';
+
+  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 zowoq ];
+  };
+}
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..a1daf3db4487
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/diff-so-fancy/default.nix
@@ -0,0 +1,57 @@
+{lib, stdenv, git, perl, ncurses, coreutils, fetchFromGitHub, makeWrapper, ...}:
+
+stdenv.mkDerivation rec {
+  pname = "diff-so-fancy";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "so-fancy";
+    repo = "diff-so-fancy";
+    rev = "v${version}";
+    sha256 = "sha256-//n7kOANVHRSjxclxDcMnpMVzUcd/U6fFsP8acRjVWA=";
+  };
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  buildInputs = [
+    perl # needed for patchShebangs
+  ];
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    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"
+
+    runHook postInstall
+  '';
+
+  meta = with 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..5aea15769c0b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/fast-export/default.nix
@@ -0,0 +1,66 @@
+{lib, stdenv, fetchFromGitHub, git, mercurial, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "fast-export";
+  version = "200213";
+
+  src = fetchFromGitHub {
+    owner = "frej";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0hzyh66rlawxip4n2pvz7pbs0cq82clqv1d6c7hf60v1drjxw287";
+  };
+
+  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 : "${git}/bin":"${mercurial.python}/bin":$libexec \
+        --prefix PYTHONPATH : "${mercurial}/${mercurial.python.sitePackages}":$sitepackagesPath
+    done
+  '';
+
+  doInstallCheck = true;
+  # deliberately not adding git or hg into installCheckInputs - package should
+  # be able to work without them in runtime env
+  installCheckPhase = ''
+    mkdir repo-hg
+    pushd repo-hg
+    ${mercurial}/bin/hg init
+    echo foo > bar
+    ${mercurial}/bin/hg add bar
+    ${mercurial}/bin/hg commit --message "baz"
+    popd
+
+    mkdir repo-git
+    pushd repo-git
+    ${git}/bin/git init
+    ${git}/bin/git config core.ignoreCase false  # for darwin
+    $out/bin/hg-fast-export.sh -r ../repo-hg/ --hg-hash
+    for s in "foo" "bar" "baz" ; do
+      (${git}/bin/git show | grep $s > /dev/null) && echo $s found
+    done
+    popd
+  '';
+
+  meta = with 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..38413f990a01
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gh/default.nix
@@ -0,0 +1,42 @@
+{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
+
+buildGoModule rec {
+  pname = "gh";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "cli";
+    repo = "cli";
+    rev = "v${version}";
+    sha256 = "1f23b8bn867b4zihz8m91xmkclcw1jnqkwi06klhm5576akahigq";
+  };
+
+  vendorSha256 = "00adc0xjrkjrjh0gxk55vhpgxb5x0j5ialzrdvhlrvhpnb44qrcq";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildPhase = ''
+    export GO_LDFLAGS="-s -w"
+    make GH_VERSION=${version} bin/gh manpages
+  '';
+
+  installPhase = ''
+    install -Dm755 bin/gh -t $out/bin
+    installManPage share/man/*/*.[1-9]
+
+    for shell in bash fish zsh; do
+      $out/bin/gh completion -s $shell > gh.$shell
+      installShellCompletion gh.$shell
+    done
+  '';
+
+  # fails with `unable to find git executable in PATH`
+  doCheck = false;
+
+  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/ghorg/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghorg/default.nix
new file mode 100644
index 000000000000..4bfe06fee747
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghorg/default.nix
@@ -0,0 +1,37 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "ghorg";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "gabrie30";
+    repo = "ghorg";
+    rev = version;
+    sha256 = "sha256-OoNHKDxYKTmfm1rrQxG7PnH7DINa2M/NKc/5iKaUybg=";
+  };
+
+  doCheck = false;
+  vendorSha256 = null;
+
+  subPackages = [ "." ];
+
+  buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
+
+  meta = with lib; {
+    description = "Quickly clone an entire org/users repositories into one directory";
+    longDescription = ''
+      ghorg allows you to quickly clone all of an orgs, or users repos into a
+      single directory. This can be useful in many situations including
+      - Searching an orgs/users codebase with ack, silver searcher, grep etc..
+      - Bash scripting
+      - Creating backups
+      - Onboarding
+      - Performing Audits
+    '';
+    homepage = "https://github.com/gabrie30/ghorg";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ vidbina ];
+    platforms = platforms.all;
+  };
+}
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..f56ce386e42b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghq/default.nix
@@ -0,0 +1,34 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "ghq";
+  version = "1.1.5";
+
+  src = fetchFromGitHub {
+    owner = "x-motemen";
+    repo = "ghq";
+    rev = "v${version}";
+    sha256 = "098fik155viylq07az7crzbgswcvhpx0hr68xpvyx0rpri792jbq";
+  };
+
+  vendorSha256 = "0gll132g111vn1hdmdjpkha9rbyppz0qj1ld89gwlk2mqd57jxkd";
+
+  doCheck = false;
+
+  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 lib.maintainers; [ sigma ];
+    license = lib.licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/ghr/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghr/default.nix
new file mode 100644
index 000000000000..be6d64646a59
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/ghr/default.nix
@@ -0,0 +1,30 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "ghr";
+  version = "0.13.0";
+
+  src = fetchFromGitHub {
+    owner = "tcnksm";
+    repo = "ghr";
+    rev = "v${version}";
+    sha256 = "1nm5kdjkqayxh06j9nr5daic9sw9nx9w06y9gaqhdrw9byvjpr1a";
+  };
+
+  vendorSha256 = "14avsngzhl1b8a05i43ph6sxh9vj0jls0acxr9j7r0h3f0vpamcj";
+
+  # Tests require a Github API token, and networking
+  doCheck = false;
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    $out/bin/ghr --version
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/tcnksm/ghr";
+    description = "Upload multiple artifacts to GitHub Release in parallel";
+    license = licenses.mit;
+    maintainers = [ maintainers.ivar ];
+  };
+}
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..2d6d7401e28f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-absorb/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-absorb";
+  version = "0.6.6";
+
+  src = fetchFromGitHub {
+    owner  = "tummychow";
+    repo   = pname;
+    rev    = "refs/tags/${version}";
+    sha256 = "04v10bn24acify34vh5ayymsr1flcyb05f3az9k1s2m6nlxy5gb9";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  cargoSha256 = "0h0vlz4qd8i9bf1mgjr618zbdwfp6bmy7ql9a1xzjmfdpkl3cgk9";
+
+  postInstall = ''
+    installManPage Documentation/git-absorb.1
+    for shell in bash zsh fish; do
+      $out/bin/git-absorb --gen-completions $shell > git-absorb.$shell
+      installShellCompletion git-absorb.$shell
+    done
+  '';
+
+  meta = with 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..4d57820c84eb
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-metadata-gui/default.nix
@@ -0,0 +1,33 @@
+{ lib, buildPythonApplication, fetchFromGitHub, pyqt5, qt5, 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', " ""
+  '';
+
+  nativeBuildInputs = [ qt5.wrapQtAppsHook ];
+
+  preFixup = ''
+    makeWrapperArgs+=("''${qtWrapperArgs[@]}")
+  '';
+
+  propagatedBuildInputs = [ pyqt5 git-annex-adapter ];
+
+  meta = with 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..6d3b65547330
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-b2/default.nix
@@ -0,0 +1,17 @@
+{ lib, buildGoPackage, fetchgit }:
+
+buildGoPackage rec {
+  pname = "git-annex-remote-b2";
+  version = "20151212-${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..843a8d34881a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-remote-rclone/default.nix
@@ -0,0 +1,32 @@
+{ lib, 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 ":" "${lib.makeBinPath [ rclone ]}"
+  '';
+
+  meta = with 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..7ad040a7c17e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-annex-utils/default.nix
@@ -0,0 +1,25 @@
+{ lib, 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 = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ woffs ];
+    platforms = 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..33580712932c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-appraise/default.nix
@@ -0,0 +1,23 @@
+{ lib, 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 = lib.licenses.asl20;
+    maintainers = [ 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..35aada8b870f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-big-picture/default.nix
@@ -0,0 +1,27 @@
+{ python3Packages, lib, git, graphviz }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "git-big-picture";
+  version = "1.1.1";
+  format = "wheel";
+
+  src = python3Packages.fetchPypi {
+    inherit format version;
+    pname = "git_big_picture";  # underscores needed for working download URL
+    python = "py3";  # i.e. no Python 2.7
+    sha256 = "a20a480057ced1585c4c38497d27a5012f12dd29697313f0bb8fa6ddbb5c17d8";
+  };
+
+  postFixup = ''
+    wrapProgram $out/bin/git-big-picture \
+      --prefix PATH ":" ${ lib.makeBinPath [ git graphviz ]  }
+    '';
+
+  meta = {
+    description = "Tool for visualization of Git repositories";
+    homepage = "https://github.com/git-big-picture/git-big-picture";
+    license = lib.licenses.gpl3Plus;
+    platforms = lib.platforms.linux;
+    maintainers = [ 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..7a24fe8e0359
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bug/default.nix
@@ -0,0 +1,38 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "git-bug";
+  version = "0.7.1"; # the `rev` below pins the version of the source to get
+  rev = "2d64b85db71a17ff3277bbbf7ac9d8e81f8e416c";
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "MichaelMure";
+    repo = "git-bug";
+    sha256 = "01ab3mlwh5g1vr3x85fppflg18gb8ip9mjfsp2b5rfigd9lxyyns";
+  };
+
+  vendorSha256 = "0c8b47lj4wl3s21lm0vx4z7hznylm8c4fb8b8gxm278kn3zys607";
+
+  doCheck = false;
+
+  buildFlagsArray = ''
+    -ldflags=
+      -X github.com/MichaelMure/git-bug/commands.GitCommit=${rev}
+      -X github.com/MichaelMure/git-bug/commands.GitLastTag=${version}
+      -X github.com/MichaelMure/git-bug/commands.GitExactTag=${version}
+  '';
+
+  postInstall = ''
+    install -D -m 0644 misc/bash_completion/git-bug "$out/share/bash-completion/completions/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 lib; {
+    description = "Distributed bug tracker embedded in Git";
+    homepage = "https://github.com/MichaelMure/git-bug";
+    license = licenses.gpl3;
+    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..20e6a993cab2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-bz/default.nix
@@ -0,0 +1,54 @@
+{ lib, 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 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-chglog/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-chglog/default.nix
new file mode 100644
index 000000000000..05d5dfe96056
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-chglog/default.nix
@@ -0,0 +1,22 @@
+{ lib, buildGoPackage, fetchFromGitHub }:
+
+buildGoPackage rec {
+  pname = "git-chglog";
+  version = "0.9.1";
+
+  goPackagePath = "github.com/git-chglog/git-chglog";
+
+  src = fetchFromGitHub {
+    owner = "git-chglog";
+    repo = "git-chglog";
+    rev = version;
+    sha256 = "08x7w1jlvxxvwnz6pvkjmfd3nqayd8n15r9jbqi2amrp31z0gq0p";
+  };
+
+  meta = with lib; {
+    description = "CHANGELOG generator implemented in Go (Golang)";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ldenefle ];
+  };
+}
+
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..e7eea5e43a12
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cinnabar/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, lib, fetchFromGitHub, autoconf, makeWrapper
+, curl, libiconv, mercurial, zlib
+}:
+
+let
+  python3 = mercurial.python;
+in
+
+stdenv.mkDerivation rec {
+  pname = "git-cinnabar";
+  version = "0.5.6";
+
+  src = fetchFromGitHub {
+    owner = "glandium";
+    repo = "git-cinnabar";
+    rev = version;
+    sha256 = "1wbp4xqpkaqhhkjw8rbbsagwiciqffacqqbm4j49q41mlk371ai3";
+    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 = ''
+    runHook preInstall
+
+    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
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/glandium/git-cinnabar";
+    description = "git remote helper to interact with mercurial repositories";
+    license = licenses.gpl2Only;
+    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..5e105ad9dd3a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-cola/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, python3Packages, gettext, git, qt5 }:
+
+let
+  inherit (python3Packages) buildPythonApplication pyqt5 sip pyinotify;
+
+in buildPythonApplication rec {
+  pname = "git-cola";
+  version = "3.8";
+
+  src = fetchFromGitHub {
+    owner = "git-cola";
+    repo = "git-cola";
+    rev = "v${version}";
+    sha256 = "1qxv2k8lxcxpqx46ka7f042xk90xns5w9lc4009cxmsqvcdba03a";
+  };
+
+  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 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..08875dabd0fe
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-crypt/default.nix
@@ -0,0 +1,55 @@
+{ fetchFromGitHub, git, gnupg, makeWrapper, openssl, lib, 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 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-delete-merged-branches/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-delete-merged-branches/default.nix
new file mode 100644
index 000000000000..5193cd2531f4
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-delete-merged-branches/default.nix
@@ -0,0 +1,28 @@
+{ lib, python3Packages, fetchFromGitHub, git }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "git-delete-merged-branches";
+  version = "6.0.5";
+
+  src = fetchFromGitHub {
+    owner = "hartwork";
+    repo = pname;
+    rev = version;
+    sha256 = "1mlmikcpm94nymid35v9rx9dyprhwidgwbdfd5zhsw502d40v0xp";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    colorama
+    clintermission
+  ];
+
+  checkInputs = [ git ]
+    ++ (with python3Packages; [ parameterized ]);
+
+  meta = with lib; {
+    description = "Command-line tool to delete merged Git branches";
+    homepage = "https://pypi.org/project/git-delete-merged-branches/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ SuperSandro2000 ];
+  };
+}
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..fb3f555cb139
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-dit/default.nix
@@ -0,0 +1,58 @@
+{ lib, stdenv
+, fetchFromGitHub
+, openssl_1_0_2
+, zlib
+, libssh
+, cmake
+, perl
+, pkg-config
+, 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
+    pkg-config
+    perl
+  ];
+
+  buildInputs = [
+    openssl_1_0_2
+    libssh
+    zlib
+  ] ++ lib.optionals (stdenv.isDarwin) [
+    curl
+    libiconv
+    CoreFoundation
+    Security
+  ];
+
+  meta = with 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..f2291882b2b8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-extras/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, unixtools, which }:
+
+stdenv.mkDerivation rec {
+  pname = "git-extras";
+  version = "6.1.0";
+
+  src = fetchFromGitHub {
+    owner = "tj";
+    repo = "git-extras";
+    rev = version;
+    sha256 = "12ff9rhgqd71xm72r385hx0h8g75hz0ag0adzqcwfa54k0lhrrrz";
+  };
+
+  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 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 = with maintainers; [ spwhitt 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..4dc9c4f8453d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-fame/default.nix
@@ -0,0 +1,21 @@
+{ lib, bundlerEnv, ruby, bundlerUpdateScript }:
+
+bundlerEnv {
+  inherit ruby;
+
+  pname = "git_fame";
+
+  gemdir = ./.;
+
+  passthru.updateScript = bundlerUpdateScript "git-fame";
+
+  meta = with 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..07dd36ac68a0
--- /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";
+  };
+}
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..864ef51a5881
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-filter-repo/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, pythonPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "git-filter-repo";
+  version = "2.29.0";
+
+  src = fetchurl {
+    url = "https://github.com/newren/git-filter-repo/releases/download/v${version}/${pname}-${version}.tar.xz";
+    sha256 = "00nn7k9jqrybb762486fmigsnbcn9lbvimgpfvvarz4ikdp9y9pb";
+  };
+
+  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 lib; {
+    homepage = "https://github.com/newren/git-filter-repo";
+    description = "Quickly rewrite git repository history (filter-branch replacement)";
+    license = licenses.mit;
+    inherit (pythonPackages.python.meta) platforms;
+    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..c7453aff85bc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-gone/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, makeWrapper, openssl, git, libiconv, Security, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-gone";
+  version = "0.3.7";
+
+  src = fetchFromGitHub {
+    owner = "lunaryorn";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0hhy1yazda9r4n753a5m9jf31fbzmm4v8wvl3pksspj2syglmll8";
+  };
+
+  cargoSha256 = "1g2jijx8y34lid9qwa26v4svab5v9ki6gn9vcfiy61dqa964c3l9";
+
+  nativeBuildInputs = [ pkg-config makeWrapper installShellFiles ];
+
+  buildInputs = [ openssl ]
+    ++ lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  postInstall = ''
+    installManPage git-gone.1
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/git-gone --prefix PATH : "${lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with 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..ac3de7cbc9ec
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-hub/default.nix
@@ -0,0 +1,44 @@
+{ lib, 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 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..b01976f7632e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-ignore/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv, fetchFromGitHub, installShellFiles, rustPlatform, pkg-config, openssl, darwin }:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  pname = "git-ignore";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner = "sondr3";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-bKIBPqGKiS3ey8vH2F4EoleV1H2PTOp+71d/YW3jkT0=";
+  };
+
+  cargoSha256 = "sha256-D1CIITuZSAsKYsK8U0q8HwPsYCyrfkTXZThxufEEkWU=";
+
+  nativeBuildInputs = [ pkg-config installShellFiles ];
+  buildInputs = [ openssl ]
+  ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.Security
+  ];
+
+  outputs = [ "out" "man" ];
+  preFixup = ''
+    installManPage $releaseDir/build/git-ignore-*/out/git-ignore.1
+  '';
+
+  meta = with lib; {
+    description = "Quickly and easily fetch .gitignore templates from gitignore.io";
+    homepage = "https://github.com/sondr3/git-ignore";
+    license = licenses.gpl3Plus;
+    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..e1caede77d8e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-imerge/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildPythonApplication, fetchPypi, installShellFiles }:
+
+buildPythonApplication rec {
+  pname = "git-imerge";
+  version = "1.2.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "df5818f40164b916eb089a004a47e5b8febae2b4471a827e3aaa4ebec3831a3f";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --bash completions/git-imerge
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/mhagger/git-imerge";
+    description = "Perform a merge between two branches incrementally";
+    license = licenses.gpl2Plus;
+    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..f28d49702bce
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-interactive-rebase-tool/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-interactive-rebase-tool";
+  version = "2.0.0";
+
+  src = fetchFromGitHub {
+    owner = "MitMaro";
+    repo = pname;
+    rev = version;
+    sha256 = "117zwxyq2vc33nbnfpjbdr5vc2l5ymf6ln1dm5551ha3y3gdq3bf";
+  };
+
+  cargoSha256 = "051llwk9swq03xdqwyj0hlyv2ywq2f1cnks95nygyy393q7v930x";
+
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
+
+  # external_editor::tests::* tests fail
+  doCheck = false;
+
+  meta = with 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 SuperSandro2000 zowoq ];
+  };
+}
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..7f2163e67d66
--- /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.16.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "00xh3q3gmi88qcl0a61pw532iyw4xcls5h336cjzld70ps2r89g4";
+  };
+
+  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..d8ce7a42bb59
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-my/default.nix
@@ -0,0 +1,29 @@
+{ lib, 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 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..942a12e239b9
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-octopus/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, git, perl, makeWrapper }:
+
+with 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..5e5bba3df728
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-open/default.nix
@@ -0,0 +1,32 @@
+{lib, stdenv, git, xdg-utils, gnugrep, fetchFromGitHub, makeWrapper}:
+
+stdenv.mkDerivation rec {
+  pname = "git-open";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner = "paulirish";
+    repo = "git-open";
+    rev = "v${version}";
+    sha256 = "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  buildPhase = null;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp git-open $out/bin
+    wrapProgram $out/bin/git-open \
+      --prefix PATH : "${lib.makeBinPath [ git xdg-utils gnugrep ]}"
+  '';
+
+  meta = with 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..1cd14aa96927
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-radar/default.nix
@@ -0,0 +1,29 @@
+{lib, 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 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..2ecc5d872b88
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-recent/default.nix
@@ -0,0 +1,35 @@
+{lib, stdenv, git, less, fetchFromGitHub, makeWrapper
+# util-linuxMinimal is included because we need the column command
+, util-linux
+}:
+
+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 : "${lib.makeBinPath [ git less util-linux ]}"
+  '';
+
+  meta = with 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-codecommit/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-codecommit/default.nix
new file mode 100644
index 000000000000..e5e41ac7232a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-codecommit/default.nix
@@ -0,0 +1,31 @@
+{ lib, buildPythonApplication, fetchFromGitHub, isPy3k, botocore, pytest, mock
+, flake8, tox, awscli }:
+
+buildPythonApplication rec {
+  pname = "git-remote-codecommit";
+  version = "1.15.1";
+  disabled = !isPy3k;
+
+  src = fetchFromGitHub {
+    owner = "aws";
+    repo = pname;
+    rev = version;
+    sha256 = "1vvp7i8ghmq72v57f6smh441h35xnr5ar628q2mr40bzvcifwymw";
+  };
+
+  propagatedBuildInputs = [ botocore ];
+
+  checkInputs = [ pytest mock flake8 tox awscli ];
+
+  checkPhase = ''
+    pytest
+  '';
+
+  meta = {
+    description =
+      "Git remote prefix to simplify pushing to and pulling from CodeCommit";
+    maintainers = [ lib.maintainers.zaninime ];
+    homepage = "https://github.com/awslabs/git-remote-codecommit";
+    license = lib.licenses.asl20;
+  };
+}
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..93dc314fa3d8
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-gcrypt/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, docutils, makeWrapper
+, gnupg, curl, rsync, coreutils
+, gawk, gnused, gnugrep
+}:
+
+stdenv.mkDerivation rec {
+  pname = "git-remote-gcrypt";
+  version = "1.4";
+  rev = version;
+
+  src = fetchFromGitHub {
+    inherit rev;
+    owner = "spwhitton";
+    repo = "git-remote-gcrypt";
+    sha256 = "sha256-uHgz8Aj5w8UOo/XbptCRKON1RAdDfFsLL9ZDEF1QrPQ=";
+  };
+
+  outputs = [ "out" "man" ];
+
+  nativeBuildInputs = [ docutils makeWrapper ];
+
+  installPhase = ''
+    prefix="$out" ./install.sh
+    wrapProgram "$out/bin/git-remote-gcrypt" \
+      --prefix PATH ":" "${lib.makeBinPath [ gnupg curl rsync coreutils
+                                                    gawk gnused gnugrep ]}"
+  '';
+
+  meta = with 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..69689a49a929
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix
@@ -0,0 +1,32 @@
+{ lib, fetchFromGitHub, python3Packages
+, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt, libxml2
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "git-remote-hg";
+  version = "unstable-2020-06-12";
+
+  src = fetchFromGitHub {
+    owner = "mnauw";
+    repo = "git-remote-hg";
+    rev = "28ed63b707919734d230cb13bff7d231dfeee8fc";
+    sha256 = "0dw48vbnk7pp0w6fzgl29mq8fyn52pacbya2w14z9c6jfvh5sha1";
+  };
+
+  nativeBuildInputs = [
+    asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt libxml2
+  ];
+  propagatedBuildInputs = with python3Packages; [ mercurial ];
+
+  postInstall = ''
+    make install-doc prefix=$out
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/mnauw/git-remote-hg";
+    description = "Semi-official Mercurial bridge from Git project";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ qyliss ];
+    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..037de14658d6
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-reparent/default.nix
@@ -0,0 +1,33 @@
+{ lib, 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 : "${lib.makeBinPath [ git gnused ]}"
+  '';
+
+  meta = with 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..eea7bed011b0
--- /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.3";
+  repo = "git-secret";
+
+in stdenv.mkDerivation {
+  name = "${repo}-${version}";
+
+  src = fetchFromGitHub {
+    inherit repo;
+    owner = "sobolevn";
+    rev = "v${version}";
+    sha256 = "0hc7yavcp8jmn6b7wngjqhy8kl7f4191sfpik8ycvqghkvvimxj4";
+  };
+
+  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 = lib.licenses.mit;
+    maintainers = [ lib.maintainers.lo1tuma ];
+    platforms = 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..154a4048e0a7
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-secrets/default.nix
@@ -0,0 +1,32 @@
+{ lib, 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 : "${lib.makeBinPath [ git coreutils ]}"
+  '';
+
+  meta = with 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..2bbf7840138d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-standup/default.nix
@@ -0,0 +1,32 @@
+{ lib, 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 : "${lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with 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..aa53529933ff
--- /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/share/bash-completion/completions
+    install -m 0755 git-stree $out/bin/
+    install -m 0644 git-stree-completion.bash $out/share/bash-completion/completions/
+  '';
+
+  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..7fe9883c556d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix
@@ -0,0 +1,58 @@
+{ lib, 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 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-subset/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subset/default.nix
new file mode 100644
index 000000000000..204ded65fd3e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subset/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-subset";
+  version = "0.1.1";
+
+  src = fetchFromGitHub {
+    owner = "jasonwhite";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "02z2r0kcd0nnn1zjslp6xxam5ddbhrmzn67qzxhlamsw0p9vvkbb";
+  };
+
+  cargoSha256 = "1ydrrq35h1h5s59mx8kwwf3bp7lsmla3jl53ccdlsq29x0rj2jhs";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ curl libiconv Security ];
+
+  meta = with lib; {
+    description = "Super fast Git tree filtering";
+    homepage = "https://github.com/jasonwhite/git-subset";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}
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..4e9c3b7a5ccc
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-subtrac/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "git-subtrac";
+  version = "0.04";
+
+  src = fetchFromGitHub {
+    owner = "apenwarr";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0p1n29k2a2rpznwxlwzkmx38ic6g041k9vx7msvick7cydn417fx";
+  };
+
+  vendorSha256 = "0m64grnmhjvfsw7a56474s894sgd24rvcp5kamhzzyc4q556hqny";
+
+  doCheck = false;
+
+  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..87cb7452c75b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-sync/default.nix
@@ -0,0 +1,45 @@
+{ lib, 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 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 lib.maintainers; [ imalison ];
+    license = lib.licenses.cc0;
+    platforms = with 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..624ce5616909
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-test/default.nix
@@ -0,0 +1,33 @@
+{ lib, 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 : "${lib.makeBinPath [ git ]}"
+  '';
+
+  meta = with 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..d470b63a0b7e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-trim/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, libiconv, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-trim";
+  version = "0.4.2";
+
+  src = fetchFromGitHub {
+    owner = "foriequal0";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1rb9dhj7b7mjrhsvm9vw5gzjfxj10idnzv488jkfdz7sfhd3fcvz";
+  };
+
+  cargoSha256 = "1q62gqqhf78ljcvzp7yrnr0vk65rif2f7axzjq0b87prbcsr7ij4";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ openssl ] ++ 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 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-vanity-hash/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix
new file mode 100644
index 000000000000..85a84103118d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-vanity-hash/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-vanity-hash";
+  version = "2020-02-26-unstable";
+
+  src = fetchFromGitHub {
+    owner = "prasmussen";
+    repo = "git-vanity-hash";
+    rev = "000004122124005af8d118a3f379bfc6ecc1e7c7";
+    sha256 = "1wf342zawbphlzvji0yba0qg4f6v67h81nhxqcsir132jv397ma7";
+  };
+
+  cargoSha256 = "0mbdis1kxmgj3wlgznr9bqf5yv0jwlj2f63gr5c99ja0ijccp99h";
+
+  postInstall = ''
+    mkdir -p $out/share/doc/git-vanity-hash
+    cp README.md $out/share/doc/git-vanity-hash
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/prasmussen/git-vanity-hash";
+    description = "Tool for creating commit hashes with a specific prefix";
+    license = [ licenses.mit ];
+    maintainers = [ maintainers.kaction ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/git-when-merged/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-when-merged/default.nix
new file mode 100644
index 000000000000..d020f351fedf
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-when-merged/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "git-when-merged";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "mhagger";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0sw98gmsnd4iki9fx455jga9m80bxvvfgys8i1r2fc7d5whc2qa6";
+  };
+
+  buildInputs = [ python3 ];
+
+  installPhase = ''
+    install -D --target-directory $out/bin/ bin/git-when-merged
+  '';
+
+  meta = with lib; {
+    description =
+      "Helps you figure out when and why a commit was merged into a branch";
+    longDescription = ''
+      If you use standard Git workflows, then you create a feature
+      branch for each feature that you are working on. When the feature
+      is complete, you merge it into your master branch. You might even
+      have sub-feature branches that are merged into a feature branch
+      before the latter is merged.
+
+      In such a workflow, the first-parent history of master consists
+      mainly of merges of feature branches into the mainline. git
+      when-merged can be used to ask, "When (and why) was commit C
+      merged into the current branch?"
+    '';
+    homepage = "https://github.com/mhagger/git-when-merged";
+    license = licenses.gpl2Only;
+    platforms = python3.meta.platforms;
+    maintainers = with maintainers; [ DamienCassou ];
+  };
+}
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..9b2853551c2b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git-workspace/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv
+, fetchFromGitHub
+, rustPlatform
+, Security
+, pkg-config, openssl
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-workspace";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "orf";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-//EyGhuE8rMRL03TtECIi0X51/p/GvTqvr2FRQEIqFA=";
+  };
+
+  cargoSha256 = "sha256-lvxEYjVMJoAFFRG5iVfGwxUeJObIxfEaWokk69l++nI=";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;
+
+  meta = with lib; {
+    description = "Sync personal and work git repositories from multiple providers";
+    homepage = "https://github.com/orf/git-workspace";
+    license = with licenses; [ mit ];
+    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..90f6ba5ac5ac
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git/default.nix
@@ -0,0 +1,348 @@
+{ fetchurl, lib, stdenv, buildPackages
+, fetchpatch
+, curl, openssl, zlib, expat, perlPackages, python3, gettext, cpio
+, gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc
+, openssh, pcre2
+, asciidoctor, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xsl_ns, docbook_xml_dtd_45
+, libxslt, tcl, tk, makeWrapper, libiconv
+, svnSupport, subversionClient, perlLibs, smtpPerlLibs
+, perlSupport ? true
+, nlsSupport ? true
+, guiSupport
+, withManual ? true
+, pythonSupport ? true
+, withpcre2 ? true
+, sendEmailSupport
+, darwin
+, withLibsecret ? false
+, pkg-config, glib, libsecret
+, gzip # needed at runtime by gitweb.cgi
+}:
+
+assert sendEmailSupport -> perlSupport;
+assert svnSupport -> perlSupport;
+
+let
+  version = "2.30.0";
+  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 = "06ad6dylgla34k9am7d5z8y3rryc8ln3ibq5z0d74rcm20hm0wsm";
+  };
+
+  outputs = [ "out" ] ++ lib.optional withManual "doc";
+
+  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 ]
+    ++ lib.optionals withManual [ asciidoctor texinfo xmlto docbook2x
+         docbook_xsl docbook_xsl_ns docbook_xml_dtd_45 libxslt ];
+  buildInputs = [curl openssl zlib expat cpio makeWrapper libiconv]
+    ++ lib.optionals perlSupport [ perlPackages.perl ]
+    ++ lib.optionals guiSupport [tcl tk]
+    ++ lib.optionals withpcre2 [ pcre2 ]
+    ++ lib.optionals stdenv.isDarwin [ darwin.Security ]
+    ++ lib.optionals withLibsecret [ pkg-config glib libsecret ];
+
+  # required to support pthread_cancel()
+  NIX_LDFLAGS = lib.optionalString (!stdenv.cc.isClang) "-lgcc_s"
+              + lib.optionalString (stdenv.isFreeBSD) "-lthr";
+
+  configureFlags = 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"])
+  ++ lib.optionals stdenv.isSunOS ["INSTALL=install" "NO_INET_NTOP=" "NO_INET_PTON="]
+  ++ (if stdenv.isDarwin then ["NO_APPLE_COMMON_CRYPTO=1"] else ["sysconfdir=/etc"])
+  ++ lib.optionals stdenv.hostPlatform.isMusl ["NO_SYS_POLL_H=1" "NO_GETTEXT=YesPlease"]
+  ++ lib.optional withpcre2 "USE_LIBPCRE2=1"
+  ++ lib.optional (!nlsSupport) "NO_GETTEXT=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
+  ++ lib.optional stdenv.isDarwin "TKFRAMEWORK=/nonexistent";
+
+
+  postBuild = ''
+    make -C contrib/subtree
+  '' + (lib.optionalString perlSupport ''
+    make -C contrib/diff-highlight
+  '') + (lib.optionalString stdenv.isDarwin ''
+    make -C contrib/credential/osxkeychain
+  '') + (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 = (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
+  '') + (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 ${lib.optionalString withManual "USE_ASCIIDOCTOR=1 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/share/bash-completion/completions
+      ln -s $out/share/git/contrib/completion/git-prompt.sh $out/share/bash-completion/completions/
+
+      # 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'
+            ${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
+    '' + 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 ${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
+      '')
+
+   + lib.optionalString withManual ''# Install man pages
+       make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES USE_ASCIIDOCTOR=1 PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-html \
+         -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
+     '')
+   + lib.optionalString stdenv.isDarwin ''
+    # enable git-credential-osxkeychain by default if darwin
+    mkdir -p $out/etc
+    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
+      ${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 "/^\s*test_expect_.*$pattern/,/^\s*' *\$/{s/^/: #/}"
+      fi
+    }
+
+    # Shared permissions are forbidden in sandbox builds.
+    disable_test t0001-init shared
+    disable_test t1301-shared-repo
+    disable_test t5324-split-commit-graph 'split commit-graph respects core.sharedrepository'
+    disable_test t4129-apply-samemode 'do not use core.sharedRepository for working tree files'
+
+    # Our patched gettext never fallbacks
+    disable_test t0201-gettext-fallbacks
+
+    ${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"
+
+    ${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
+    ''}
+  '' + 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
+  '' + 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 = 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 = lib.platforms.all;
+    maintainers = with lib.maintainers; [ primeos 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..a1c63538220b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/git2cl/default.nix
@@ -0,0 +1,23 @@
+{ fetchgit, lib, 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 = 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..6f20e4a44c6f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gita/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, buildPythonApplication
+, fetchFromGitHub
+, git
+, pytest
+, pyyaml
+, setuptools
+, installShellFiles
+}:
+
+buildPythonApplication rec {
+  version = "0.11.9";
+  pname = "gita";
+
+  src = fetchFromGitHub {
+    sha256 = "9+zuLAx9lMfltsBqjvsivJ5wPnStPfq11XgGMv/JDpY=";
+    rev = version;
+    repo = "gita";
+    owner = "nosarthur";
+  };
+
+  propagatedBuildInputs = [
+    pyyaml
+    setuptools
+  ];
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postUnpack = ''
+    for case in "\n" ""; do
+        substituteInPlace source/tests/test_main.py \
+         --replace "'gita$case'" "'source$case'"
+    done
+  '';
+
+  checkInputs = [
+    git
+    pytest
+  ];
+
+  checkPhase = ''
+    git init
+    pytest tests
+  '';
+
+  postInstall = ''
+    installShellCompletion --bash --name gita ${src}/.gita-completion.bash
+    installShellCompletion --zsh --name gita ${src}/.gita-completion.zsh
+  '';
+
+  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..25f7e95d184f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitbatch/default.nix
@@ -0,0 +1,25 @@
+{ lib, 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 = "0613vfqdn3k0w7fm25rqnqdr67w9vii3i56dfslqcn1vqjfrff3q";
+  };
+
+  meta = with 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..08bf5eb6ba07
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitflow/default.nix
@@ -0,0 +1,41 @@
+{ pkgs, lib, stdenv, fetchFromGitHub }:
+
+with pkgs.lib;
+
+stdenv.mkDerivation rec {
+  pname = "gitflow";
+  version = "1.12.3";
+
+  src = fetchFromGitHub {
+    owner = "petervanderdoes";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-kHirHG/bfsU6tKyQ0khNSTyChhzHfzib+HyA3LOtBI8=";
+  };
+
+  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 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/gitin/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitin/default.nix
new file mode 100644
index 000000000000..3d429b7c561c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitin/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildGoPackage
+, fetchFromGitHub
+, pkg-config
+, libgit2_0_27
+}:
+
+buildGoPackage rec {
+  version = "0.2.3";
+  pname = "gitin";
+
+  goPackagePath = "github.com/isacikgoz/gitin";
+
+  src = fetchFromGitHub {
+    owner = "isacikgoz";
+    repo = "gitin";
+    rev = "v${version}";
+    sha256 = "00z6i0bjk3hdxbc0cy12ss75b41yvzyl5pm6rdrvsjhzavry2fa3";
+  };
+
+  goDeps = ./deps.nix;
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ libgit2_0_27 ];
+
+  meta = with lib; {
+    homepage = "https://github.com/isacikgoz/gitin";
+    description = "Text-based user interface for git";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ kimat ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/gitin/deps.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitin/deps.nix
new file mode 100644
index 000000000000..908665693b81
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitin/deps.nix
@@ -0,0 +1,121 @@
+# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
+[
+  {
+    goPackagePath = "github.com/alecthomas/template";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alecthomas/template";
+      rev = "fb15b899a75114aa79cc930e33c46b577cc664b1";
+      sha256 = "1vlasv4dgycydh5wx6jdcvz40zdv90zz1h7836z7lhsi2ymvii26";
+    };
+  }
+  {
+    goPackagePath = "github.com/alecthomas/units";
+    fetch = {
+      type = "git";
+      url = "https://github.com/alecthomas/units";
+      rev = "f65c72e2690dc4b403c8bd637baf4611cd4c069b";
+      sha256 = "04jyqm7m3m01ppfy1f9xk4qvrwvs78q9zml6llyf2b3v5k6b2bbc";
+    };
+  }
+  {
+    goPackagePath = "github.com/fatih/color";
+    fetch = {
+      type = "git";
+      url = "https://github.com/fatih/color";
+      rev = "daf2830f2741ebb735b21709a520c5f37d642d85";
+      sha256 = "086z8ssmr1fn9ba4mqnw7pnccfpys6l5yfhvycv1gdrsk7n27mvs";
+    };
+  }
+  {
+    goPackagePath = "github.com/isacikgoz/gia";
+    fetch = {
+      type = "git";
+      url = "https://github.com/isacikgoz/gia";
+      rev = "00556493579ec25f4e199b85ee1e2a73c98d15bb";
+      sha256 = "16nqi4z1pgybcw05wbp3qnbbq407smcr56hq7npnhkirngc5j822";
+    };
+  }
+  {
+    goPackagePath = "github.com/jroimartin/gocui";
+    fetch = {
+      type = "git";
+      url = "https://github.com/jroimartin/gocui";
+      rev = "c055c87ae801372cd74a0839b972db4f7697ae5f";
+      sha256 = "1b1cbjg925l1c5v3ls8amni9716190yzf847cqs9wjnj82z8qa47";
+    };
+  }
+  {
+    goPackagePath = "github.com/justincampbell/timeago";
+    fetch = {
+      type = "git";
+      url = "https://github.com/justincampbell/timeago";
+      rev = "027f40306f1dbe89d24087611680ef95543bf876";
+      sha256 = "1p3va1cn9x5pyvq7k64mnvbxp5zy7h9z49syjyglixgg6avdbp1v";
+    };
+  }
+  {
+    goPackagePath = "github.com/kelseyhightower/envconfig";
+    fetch = {
+      type = "git";
+      url = "https://github.com/kelseyhightower/envconfig";
+      rev = "0b417c4ec4a8a82eecc22a1459a504aa55163d61";
+      sha256 = "1a7b35njpqz94gbd7wvsl3wjzpd5y1fj1lrg2sdh00yq0nax1qj9";
+    };
+  }
+  {
+    goPackagePath = "github.com/mattn/go-runewidth";
+    fetch = {
+      type = "git";
+      url = "https://github.com/mattn/go-runewidth";
+      rev = "14e809f6d78fcf9f48ff9b70981472b64c05f754";
+      sha256 = "1mvlxcdwr0vwp8b2wqs6y7hk72y28sqh03dz5x0xkg48d4y9cplj";
+    };
+  }
+  {
+    goPackagePath = "github.com/nsf/termbox-go";
+    fetch = {
+      type = "git";
+      url = "https://github.com/nsf/termbox-go";
+      rev = "38ba6e5628f1d70bac606cfd210b9ad1a16c3027";
+      sha256 = "03xx5vbnavklsk6wykcc7qhmhvn2074sx0ql06b51vqsxwsa6zw2";
+    };
+  }
+  {
+    goPackagePath = "github.com/sahilm/fuzzy";
+    fetch = {
+      type = "git";
+      url = "https://github.com/sahilm/fuzzy";
+      rev = "d88f8cb825ddd46a2ce86b60382e11645220ee33";
+      sha256 = "0nl4l02s3961p11aj1vgajfy28rqlya2z6af2xjncra59gfhqvlq";
+    };
+  }
+  {
+    goPackagePath = "github.com/waigani/diffparser";
+    fetch = {
+      type = "git";
+      url = "https://github.com/waigani/diffparser";
+      rev = "7391f219313d9175703f67561b222fd2a81bca30";
+      sha256 = "0h3y3ivlghdvkyqsh5lcidqdajhc9g7m1xqm73j9a0ayby0sx1ql";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/alecthomas/kingpin.v2";
+      rev = "947dcec5ba9c011838740e680966fd7087a71d0d";
+      sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
+    };
+  }
+  {
+    goPackagePath = "gopkg.in/libgit2/git2go.v27";
+    fetch = {
+      type = "git";
+      url = "https://gopkg.in/libgit2/git2go.v27";
+      rev = "6cc7d3dc6aec2781fe0239315da215f49c76e2f8";
+      sha256 = "0b2m4rjadngyd675bi1k21pyi9r91dsxngzd4mikacpd7yshgvaq";
+    };
+  }
+]
+
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..f4b74405eba2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/default.nix
@@ -0,0 +1,82 @@
+{ callPackage, lib, stdenv, fetchFromGitHub, git, zsh, ...}:
+
+stdenv.mkDerivation rec {
+  pname = "gitstatus";
+  version = "1.4.4";
+
+  src = fetchFromGitHub {
+    owner = "romkatv";
+    repo = "gitstatus";
+    rev = "v${version}";
+    sha256 = "1w5kpca2v6iii912riywp1jscq7cpr5xv93mglr30pjnar1mk8gs";
+  };
+
+  buildInputs = [ (callPackage ./romkatv_libgit2.nix {}) ];
+  patchPhase = ''
+    sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.sh
+    sed -i '1i GITSTATUS_AUTO_INSTALL=''${GITSTATUS_AUTO_INSTALL-0}' gitstatus.plugin.zsh
+    sed -i "1a GITSTATUS_DAEMON=$out/bin/gitstatusd" install
+  '';
+  installPhase = ''
+    install -Dm755 usrbin/gitstatusd $out/bin/gitstatusd
+    install -Dm444 gitstatus.plugin.sh $out
+    install -Dm444 gitstatus.plugin.zsh $out
+    install -Dm555 install $out
+    install -Dm444 build.info $out
+  '';
+  # Don't install the "install" and "build.info" files, which the end user
+  # should not need to worry about.
+  pathsToLink = [
+    "/bin/gitstatusd"
+    "/gitstatus.plugin.sh"
+    "/gitstatus.plugin.zsh"
+  ];
+
+  # The install check sets up an empty Git repository and a minimal zshrc that
+  # invokes gitstatus.plugin.zsh. It runs zsh against this zshrc and verifies
+  # that the script was sourced successfully and that the "gitstatus_query"
+  # command ran successfully. This tests the binary itself and the zsh
+  # integration.
+  installCheckInputs = [ git zsh ];
+  doInstallCheck = true;
+  installCheckPhase = ''
+    TEMP=$(mktemp -d)
+    cd "$TEMP"
+
+    git init
+
+    echo '
+      GITSTATUS_LOG_LEVEL=DEBUG
+      . $out/gitstatus.plugin.zsh || exit 1
+
+      gitstatus_stop NIX_TEST && gitstatus_start NIX_TEST
+      gitstatus_query NIX_TEST
+      if [[ $? -ne 0 ]]; then
+          print -- "Something went wrong with gitstatus"
+          exit 1
+      elif [[ $VCS_STATUS_RESULT != "ok-sync" ]]; then
+          print -- "Not in a Git repo"
+          exit 1
+      else
+          print -- "OK"
+          exit 0
+      fi
+    ' > .zshrc
+
+    # If we try to run zsh like "zsh -i -c true" or "zsh -i > output" then job
+    # control will be disabled in the shell and the gitstatus plugin script
+    # will fail when it tries to set the MONITOR option. As a workaround, we
+    # run zsh as a full-fledged independent process and then wait for it to
+    # exit. (The "exit" statements in the zshrc ensure that zsh will exit
+    # almost immediately after starting.)
+    ZDOTDIR=. zsh -i &
+    wait $!
+  '';
+
+  meta = with lib; {
+    description = "10x faster implementation of `git status` command";
+    homepage = "https://github.com/romkatv/gitstatus";
+    license = licenses.gpl3Only;
+    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..9c74fa35752f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitstatus/romkatv_libgit2.nix
@@ -0,0 +1,22 @@
+{ fetchFromGitHub, libgit2, ...}:
+
+libgit2.overrideAttrs (oldAttrs: {
+  cmakeFlags = oldAttrs.cmakeFlags ++ [
+    "-DBUILD_CLAR=OFF"
+    "-DBUILD_SHARED_LIBS=OFF"
+    "-DREGEX_BACKEND=builtin"
+    "-DUSE_BUNDLED_ZLIB=ON"
+    "-DUSE_GSSAPI=OFF"
+    "-DUSE_HTTPS=OFF"
+    "-DUSE_HTTP_PARSER=builtin"  # overwritten from libgit2
+    "-DUSE_NTLMCLIENT=OFF"
+    "-DUSE_SSH=OFF"
+    "-DZERO_NSEC=ON"
+  ];
+  src = fetchFromGitHub {
+    owner = "romkatv";
+    repo = "libgit2";
+    rev = "tag-82cefe2b42300224ad3c148f8b1a569757cc617a";
+    sha256 = "1vhnqynqyxizzkq1h5dfjm75f0jm5637jh0gypwqqz2yjqrscza0";
+  };
+})
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..81b2984087bd
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitui/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, rustPlatform, fetchFromGitHub, libiconv, perl, python3, Security, AppKit, openssl, xclip }:
+rustPlatform.buildRustPackage rec {
+  pname = "gitui";
+  version = "0.11.0";
+
+  src = fetchFromGitHub {
+    owner = "extrawurst";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0yq98jslbac87zdzlwqc2kcd6hqy2wnza3l8n3asss1iaqcb0ilh";
+  };
+
+  cargoSha256 = "16riggrhk1f6lg8y46wn89ab5b1iz6lw00ngid20x4z32d2ww70f";
+
+  nativeBuildInputs = [ python3 perl ];
+  buildInputs = [ openssl ]
+    ++ lib.optional stdenv.isLinux xclip
+    ++ lib.optionals stdenv.isDarwin [ libiconv Security AppKit ];
+
+  meta = with lib; {
+    description = "Blazing fast terminal-ui for git written in rust";
+    homepage = "https://github.com/extrawurst/gitui";
+    license = licenses.mit;
+    maintainers = with maintainers; [ Br1ght0ne yanganto ];
+  };
+}
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..1fa2ebc6f74a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/gitweb/default.nix
@@ -0,0 +1,27 @@
+{ lib, 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-${lib.getVersion git}";
+
+  ignoreCollisions = true;
+  paths = lib.optional gitwebTheme gitwebThemeSrc
+       ++ [ "${git}/share/gitweb" ];
+
+  meta = git.meta // {
+    maintainers = with lib.maintainers; [ gnidorah ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/glab/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/glab/default.nix
new file mode 100644
index 000000000000..eae572530c39
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/glab/default.nix
@@ -0,0 +1,28 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "glab";
+  version = "1.14.0";
+
+  src = fetchFromGitHub {
+    owner = "profclems";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-JvHuOMpt62tw7ewDev7unAgZGV+ZSo6wDuiPhWap2v0=";
+  };
+
+  vendorSha256 = "sha256-0nnrH3GJhd4wlRETo9iSlFkXq358m30k7Fsb5haHlpQ=";
+  runVend = true;
+
+  # Tests are trying to access /homeless-shelter
+  doCheck = false;
+
+  subPackages = [ "cmd/glab" ];
+
+  meta = with lib; {
+    description = "An open-source GitLab command line tool";
+    license = licenses.mit;
+    homepage = "https://glab.readthedocs.io/";
+    maintainers = with maintainers; [ freezeboy ];
+  };
+}
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..e43c602d6d91
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/grv/default.nix
@@ -0,0 +1,50 @@
+{ lib, buildGoPackage, fetchFromGitHub, curl, ncurses, pkg-config, readline
+, cmake }:
+let
+  version = "0.3.2";
+in
+buildGoPackage {
+  pname = "grv";
+  inherit version;
+
+  buildInputs = [ ncurses readline curl ];
+  nativeBuildInputs = [ pkg-config 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 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..e0d7e46d22a5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/hub/default.nix
@@ -0,0 +1,47 @@
+{ lib, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, util-linux, nixosTests }:
+
+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 util-linux ];
+
+  postPatch = ''
+    patchShebangs .
+    substituteInPlace git/git.go --replace "cmd.New(\"git\")" "cmd.New(\"${git}/bin/git\")"
+    substituteInPlace commands/args.go --replace "Executable:  \"git\"" "Executable:  \"${git}/bin/git\""
+  '';
+
+  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]
+  '';
+
+  passthru.tests = { inherit (nixosTests) hub; };
+
+  meta = with 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..41c4e653a633
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/lab/default.nix
@@ -0,0 +1,38 @@
+{ lib, buildGoModule, fetchFromGitHub, makeWrapper, xdg-utils, installShellFiles, git }:
+
+buildGoModule rec {
+  pname = "lab";
+  version = "0.19.0";
+
+  src = fetchFromGitHub {
+    owner = "zaquestion";
+    repo = "lab";
+    rev = "v${version}";
+    sha256 = "1l6xsikd1113qd4y0mvjsl64gbi4327m9v4d593f27fxink39j8s";
+  };
+
+  subPackages = [ "." ];
+
+  vendorSha256 = "07zl5xhzgrgr5skba6cds5nal58pllf10gak0ap62j1k9gk2ych2";
+
+  doCheck = false;
+
+  nativeBuildInputs = [ makeWrapper installShellFiles ];
+
+  buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
+
+  postInstall = ''
+    wrapProgram $out/bin/lab --prefix PATH ":" "${lib.makeBinPath [ git xdg-utils ]}";
+    for shell in bash fish zsh; do
+      $out/bin/lab completion $shell > lab.$shell
+      installShellCompletion lab.$shell
+    done
+  '';
+
+  meta = with 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 ];
+  };
+}
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..18f2e5ad4871
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/lefthook/default.nix
@@ -0,0 +1,30 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+# Currently `buildGo114Module` is passed as `buildGoModule` from
+# `../default.nix`. Please remove the fixed 1.14 once a new release has been
+# made and the issue linked below has been closed upstream.
+
+# https://github.com/Arkweid/lefthook/issues/151
+
+buildGoModule rec {
+  pname = "lefthook";
+  version = "0.7.2";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "Arkweid";
+    repo = "lefthook";
+    sha256 = "1ciyxjx3r3dcl8xas49kqsjshs1bv4pafmfmhdfyfdvlaj374hgj";
+  };
+
+  vendorSha256 = "1pdrw4vwbj9cka2pjbjvxviigfvnrf8sgws27ixwwiblbkj4isc8";
+
+  doCheck = false;
+
+  meta = with 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..df2866527115
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/legit/default.nix
@@ -0,0 +1,28 @@
+{ 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
+  ];
+
+  # no tests
+  doCheck = false;
+
+  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..1821dba0f006
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/pass-git-helper/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildPythonApplication, fetchFromGitHub, pyxdg, pytest, pytest-mock }:
+
+buildPythonApplication rec {
+  pname   = "pass-git-helper";
+  version = "1.1.1";
+
+  src = fetchFromGitHub {
+    owner  = "languitar";
+    repo   = "pass-git-helper";
+    rev    = "v${version}";
+    sha256 = "sha256-GdsFPpBdoEaOCmdKxw5xTuFOcGFH94w5q/lV891lCUs=";
+  };
+
+  propagatedBuildInputs = [ pyxdg ];
+  checkInputs = [ pytest pytest-mock ];
+  preCheck = ''
+    export HOME=$(mktemp -d)
+  '';
+
+  meta = with 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..8f84c0db558e
--- /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.gpl2Only;
+    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/radicle-upstream/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
new file mode 100644
index 000000000000..26f46066531e
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/radicle-upstream/default.nix
@@ -0,0 +1,64 @@
+{ lib, stdenv, appimageTools, gsettings-desktop-schemas, gtk3, autoPatchelfHook, zlib, fetchurl }:
+
+let
+  pname = "radicle-upstream";
+  version = "0.1.6";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://releases.radicle.xyz/radicle-upstream-${version}.AppImage";
+    sha256 =  "1s299rxala6gqj69j5q4d4n5wfdk2zsb4r9qrhml0m79b4f79yar";
+  };
+
+  contents = appimageTools.extractType2 { inherit name src; };
+
+  git-remote-rad = stdenv.mkDerivation rec {
+    pname = "git-remote-rad";
+    inherit version;
+    src = contents;
+
+    nativeBuildInputs = [ autoPatchelfHook ];
+    buildInputs = [ zlib ];
+
+    installPhase = ''
+      mkdir -p $out/bin/
+      cp ${contents}/resources/git-remote-rad $out/bin/git-remote-rad
+    '';
+  };
+in
+
+# FIXME: a dependency of the `proxy` component of radicle-upstream (radicle-macros
+# v0.1.0) uses unstable rust features, making a from source build impossible at
+# this time. See this PR for discussion: https://github.com/NixOS/nixpkgs/pull/105674
+appimageTools.wrapType2 {
+  inherit name src;
+
+  profile = ''
+    export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
+  '';
+
+  extraInstallCommands = ''
+    mv $out/bin/${name} $out/bin/${pname}
+
+    # this automatically adds the git-remote-rad binary to the users `PATH` so
+    # they don't need to mess around with shell profiles...
+    ln -s ${git-remote-rad}/bin/git-remote-rad $out/bin/git-remote-rad
+
+    # desktop item
+    install -m 444 -D ${contents}/${pname}.desktop $out/share/applications/${pname}.desktop
+    substituteInPlace $out/share/applications/${pname}.desktop \
+      --replace 'Exec=AppRun' 'Exec=${pname}'
+
+    # icon
+    install -m 444 -D ${contents}/${pname}.png \
+      $out/share/icons/hicolor/512x512/apps/${pname}.png
+  '';
+
+  meta = with lib; {
+    description = "A decentralized app for code collaboration";
+    homepage = "https://radicle.xyz/";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ xwvvvvwx ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix b/nixpkgs/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix
new file mode 100644
index 000000000000..6968508f8c9a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/rs-git-fsmonitor/default.nix
@@ -0,0 +1,33 @@
+{ lib
+, fetchFromGitHub
+, rustPlatform
+, makeWrapper
+, watchman
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rs-git-fsmonitor";
+  version = "0.1.3";
+
+  src = fetchFromGitHub {
+    owner = "jgavris";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "021vdk5i7yyrnh4apn0gnsh6ycnx15wm3g2jrfsg7fycnq8167wc";
+  };
+
+  cargoSha256 = "0kfj09xq1g866507k3gcbm30pyi1xzfr7gca6dab7sjlvf83h9xs";
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  fixupPhase = ''
+    wrapProgram $out/bin/rs-git-fsmonitor --prefix PATH ":" "${lib.makeBinPath [ watchman ]}" ;
+  '';
+
+  meta = with lib; {
+    description = "A fast git core.fsmonitor hook written in Rust";
+    homepage = "https://github.com/jgavris/rs-git-fsmonitor";
+    license = licenses.mit;
+    maintainers = [ maintainers.SuperSandro2000 ];
+  };
+}
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..1e65834f5193
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/scmpuff/default.nix
@@ -0,0 +1,24 @@
+{ lib, 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 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..4ee92c1d5e6a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/stgit/default.nix
@@ -0,0 +1,30 @@
+{ lib, python3Packages, fetchFromGitHub, git, installShellFiles }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "stgit";
+  version = "0.23";
+
+  src = fetchFromGitHub {
+    owner = "ctmarinas";
+    repo = "stgit";
+    rev = "v${version}";
+    sha256 = "1r9y8qnl6kdvq61788pnfhhgyv2xrnyrizbhy4qz4l1bpqkwfr2r";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  checkInputs = [ git ];
+
+  postInstall = ''
+    installShellCompletion $out/share/stgit/completion/stg.fish
+    installShellCompletion --name stg $out/share/stgit/completion/stgit.bash
+    installShellCompletion --name _stg $out/share/stgit/completion/stgit.zsh
+  '';
+
+  meta = with 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..2f275827a2ef
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/subgit/default.nix
@@ -0,0 +1,26 @@
+{ lib, stdenv, fetchurl, unzip, makeWrapper, jre }:
+
+stdenv.mkDerivation rec {
+  name = "subgit-3.3.10";
+
+  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 = lib.licenses.unfree;
+    platforms = 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 = "1z7cmaghfy5yjs50b3y6av9h2d6xmpamyxql7vvr3dy6kflvv8fk";
+  };
+}
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..8c73c00f00c2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn-all-fast-export/default.nix
@@ -0,0 +1,35 @@
+{ lib, 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 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..69742b6d7603
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/svn2git/default.nix
@@ -0,0 +1,39 @@
+{ lib, 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 = lib.licenses.mit;
+    platforms = 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..3129bd2e2083
--- /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.4";
+
+  src = fetchFromGitHub {
+    owner = "taylorthurlow";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-A89E0CbV7VFB7W4ycFcZloP0J/d42agEuD+hs9a6a6E=";
+  };
+
+  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; [ Br1ght0ne ];
+  };
+}
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..1f2a77d20199
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/tig/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchFromGitHub, ncurses, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45
+, readline, makeWrapper, git, libiconv, autoreconfHook, findXMLCatalogs, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "tig";
+  version = "2.5.2";
+
+  src = fetchFromGitHub {
+    owner = "jonas";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "sha256-kkH4px34VpnO/S1VjgQGU9Mm4/VpmiOtvlz2ubtStAk=";
+  };
+
+  nativeBuildInputs = [ makeWrapper autoreconfHook asciidoc xmlto docbook_xsl docbook_xml_dtd_45 findXMLCatalogs pkg-config ];
+
+  autoreconfFlags = "-I tools -v";
+
+  buildInputs = [ ncurses readline git ]
+    ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+  # those files are inherently impure, we'll handle the corresponding dependencies.
+  postPatch = ''
+      rm 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
+
+    install -D contrib/tig-completion.bash $out/share/bash-completion/completions/tig
+    cp contrib/vim.tigrc $out/etc/
+
+    # Note: Until https://github.com/jonas/tig/issues/940 is resolved it is best
+    # not to install the ZSH completion so that the fallback implemenation from
+    # ZSH can be used (Completion/Unix/Command/_git: "_tig () { _git-log }"):
+    #install -D contrib/tig-completion.zsh $out/share/zsh/site-functions/_tig
+
+    wrapProgram $out/bin/tig \
+      --prefix PATH ':' "${git}/bin"
+  '';
+
+  meta = with lib; {
+    homepage = "https://jonas.github.io/tig/";
+    description = "Text-mode interface for git";
+    maintainers = with maintainers; [ bjornfor domenkozar qknight globin ma27 ];
+    license = licenses.gpl2Plus;
+    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..cbb341ae3eb3
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/topgit/default.nix
@@ -0,0 +1,30 @@
+{ lib, 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/share/bash-completion/completions/"
+  '';
+
+  meta = with 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..aebd488fe305
--- /dev/null
+++ b/nixpkgs/pkgs/applications/version-management/git-and-tools/transcrypt/default.nix
@@ -0,0 +1,49 @@
+{ lib, stdenv, fetchFromGitHub, git, makeWrapper, openssl, coreutils, util-linux, 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 util-linux 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 : "${lib.makeBinPath [ git openssl coreutils util-linux gnugrep gnused gawk ]}"
+
+    cat > $out/bin/transcrypt-depspathprefix << EOF
+    #!${stdenv.shell}
+    echo "${lib.makeBinPath [ git openssl coreutils gawk ]}:"
+    EOF
+    chmod +x $out/bin/transcrypt-depspathprefix
+  '';
+
+  meta = with 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