How do you prevent Git from printing "remote:" on each line of output after receiving?

I recently set up an EC2 instance with a Git deployment workflow similar to Heroku, but I can't figure out how Heroku prevents Git from posting a receive hook from the output of "remote:" on each line.

Consider the following two examples (one from my EC2 project and one from Heroku project):

My EC2 project:

git push prod master
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 456 bytes, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: 
remote: Receiving push
remote: Deploying updated files (by resetting HEAD)
remote: HEAD is now at bf17da8 test commit
remote: Running bundler to install gem dependencies
remote: Fetching source index for http://rubygems.org/
remote: Installing rake (0.8.7) 
remote: Installing abstract (1.0.0) 
...
remote: Installing railties (3.0.0) 
remote: Installing rails (3.0.0) 
remote: Your bundle is complete! It was installed into ./.bundle/gems
remote: Launching (by restarting Passenger)... done
remote: 
To ssh://ubuntu@0.0.0.0/~/apps/app_name
   e8bd06f..bf17da8  master -> master

Heroku:

$> git push heroku master 
Counting objects: 179, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (89/89), done.  
Writing objects: 100% (105/105), 42.70 KiB, done. 
Total 105 (delta 53), reused 0 (delta 0)

-----> Heroku receiving push
-----> Rails app detected
-----> Gemfile detected, running Bundler version 1.0.3
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Fetching source index for http://rubygems.org/
       Installing rake (0.8.7) 
       Installing abstract (1.0.0) 
       ...
       Installing railties (3.0.0) 
       Installing rails (3.0.0) 
       Your bundle is complete! It was installed into ./.bundle/gems
       Compiled slug size is 4.8MB
-----> Launching... done
       http://your_app_name.heroku.com deployed to Heroku

To git@heroku.com:your_app_name.git
   3bf6e8d..642f01a  master -> master
+3
source share
2 answers

Is it possible that Heroku emits terminal control codes that overwrite the "remote:" prefix on each line? Sort of"\e[1G-----> line"

+2
source

, , , $'\e[K' ( ), .

echo $'\e[1G\e[K'line , , , remote: ( git, ) .

, , Heroku, , , , -, - , Heroku, , , , OP , .

0

Source: https://habr.com/ru/post/1783759/


All Articles