Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7085933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:29:11+00:00 2026-05-28T07:29:11+00:00

Is it possible to execute any git command in silent mode? For instance, can

  • 0

Is it possible to execute any git command in “silent” mode? For instance, can i say “git push origin” and see nothing displayed on the screen?

I suppose i can redirect IO to /dev/null (works fine), but .. does git allow something like this naturally?

Below is a quick script that does automatic EOD commit, used when i need to catch the train and don’t want to leave code on my local computer

  1 clear
  2
  3 cd
  4 cd repo/active
  5
  6 for i in *
  7 do
  8   cd $i
  9   echo "Pushing " $i
 10   git add . -A >> /dev/null 
 11   git commit -a -m "EOD automatic commit" >> /dev/null 
 12   git push origin >> /dev/null 
 13   echo
 14   cd ..
 15 done

Please let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:29:11+00:00Added an answer on May 28, 2026 at 7:29 am

    Redirecting output to /dev/null seems like a natural way of doing it to me. Although I have in the past defined a quiet_git shell function like this for use in cron jobs:

    quiet_git() {
        stdout=$(tempfile)
        stderr=$(tempfile)
    
        if ! git "$@" </dev/null >$stdout 2>$stderr; then
            cat $stderr >&2
            rm -f $stdout $stderr
            exit 1
        fi
    
        rm -f $stdout $stderr
    }
    

    This will suppress stdout and stderr, unless the git command fails. It’s not pretty; in fact the stdout file is ignored and it should just redirect that to /dev/null. Works, though. And then you can just do “quiet_git push” etc. later on in the script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How is it possible to execute a direct SQL command to an ADO.NET connected
Is it possible to execute a JAR file on any OS (like Windows, Linux,
Is it possible to execute iwconfig (or any other shell based program) from a
In gVim for windows it's possible to execute current buffer via :!% command. But,
Possible Duplicate: Java REPL shell Hey, Is there any way to execute Java code
Is it possible to open the command prompt (and I guess any other terminal
Short question . How is it possible to execute servlet filters before any declarative
Is it possible to execute a proc within the context of another object? I
Is it possible to execute an SPDataSource object query in a console app for
Does it possible to execute php file and store its output into some variable?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.