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

  • SEARCH
  • Home
  • 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 8825299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:50:42+00:00 2026-06-14T06:50:42+00:00

What is special about the output message of git fetch command that is printed

  • 0

What is special about the output message of git fetch command that is printed on the console? I’m not able to use grep, xargs, etc. Not able to redirect the output to a file also..

Note: I’m using git fetch --dry-run command

[sangeeth@localhost santest-code]$ 
[sangeeth@localhost santest-code]$ git fetch --dry-run > /tmp/1
From ssh://git.code.sf.net/p/santest/code
   9f068d0..2b9dc4e  master     -> origin/master
[sangeeth@localhost santest-code]$ 
[sangeeth@localhost santest-code]$ cat /tmp/1              <= no data
[sangeeth@localhost santest-code]$  
[sangeeth@localhost santest-code]$ git fetch --dry-run | grep "ssh"     <= output has both lines
From ssh://git.code.sf.net/p/santest/code
   9f068d0..2b9dc4e  master     -> origin/master
[sangeeth@localhost santest-code]$ 
[sangeeth@localhost santest-code]$ git --version 
git version 1.7.11.4
[sangeeth@localhost santest-code]$ 

I’m trying to parse the output of git fetch --dry-run command to check whether the local (master) branch is up-to-date with the remote (origin/master) branch.

  • 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-06-14T06:50:43+00:00Added an answer on June 14, 2026 at 6:50 am

    Some of git’s status output goes to STDERR. If you want to grep through it, merge STDERR into STDOUT like so:

    git fetch --dry-run 2>&1 | grep ssh
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking to write custom authorize attribute and I'm not sure about output caching.
I have a very special question about son manipulation and the as_class parameter by
I've a little question about decoding special characters from a JSon result (in my
What special method(s?) should I redefine in my class so that it handled AttributeError
How to use special characteres like <,>,, and & in XML in Flex? Example:
I would like to capture special characters such as \n from the command line
I have bash script that I use regularly in my job to automate a
So I have this special output: dAmn_Raw('send chat:Sandbox\n\nmsg main\n\nthismessage'); I have a variable: myvariable
I'm confused about the differences between these two special folders. Here's a code snippet
I'm writing some special purpose data structures in Java, intended for use in the

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.