diff --git a/changelogs/unreleased/24187-set-git-terminal-prompt-env-var-in-initializer.yml b/changelogs/unreleased/24187-set-git-terminal-prompt-env-var-in-initializer.yml
new file mode 100644
index 0000000000000000000000000000000000000000..7fe5c8a84af9dc591e6ea53b1b115edd428a3586
--- /dev/null
+++ b/changelogs/unreleased/24187-set-git-terminal-prompt-env-var-in-initializer.yml
@@ -0,0 +1,4 @@
+---
+title: Set GIT_TERMINAL_PROMPT env variable in initializer
+merge_request: 10372
+author:
diff --git a/config/application.rb b/config/application.rb
index f9f01b66473e48580f983f7bd3d5fcc0034c3f34..f2ecc4ce77c7e8e033844bbeb76a309c01162732 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -150,6 +150,7 @@ module Gitlab
 
     # This is needed for gitlab-shell
     ENV['GITLAB_PATH_OUTSIDE_HOOK'] = ENV['PATH']
+    ENV['GIT_TERMINAL_PROMPT'] = '0'
 
     config.generators do |g|
       g.factory_girl false