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 6230749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:48:30+00:00 2026-05-24T09:48:30+00:00

I have the following alias: unpushed== !GIT_CURRENT_BRANCH=$(git name-rev –name-only HEAD) && git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH

  • 0

I have the following alias:

unpushed== !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && 
  git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH --oneline

when I execute this with |wc -l, it tells me that I have 394 unpushed commits.
I use this number to run git diff somecommitid HEAD~394.
This fails with the following error:

fatal: ambiguous argument 'HEAD~394': unknown revision or path not in the working tree.

Strangely, it works right up until the number 358. In another clone, I have 478 commits, and git commands including git show work up until HEAD~411 and then fail. Any clues? I am using git 1.7.5.2 on debian linux.

  • 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-24T09:48:30+00:00Added an answer on May 24, 2026 at 9:48 am

    The best explanation I can think of is that the ~ operator doesn’t follow branches. It only includes the first parents. If you want to refer to the last pushed commit, just use origin/$GIT_CURRENT_BRANCH.

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

Sidebar

Related Questions

Using CentOS5, I have Apache configured with the following directives. Alias /pscript/ /var/www/pscript/ <Directory
Suppose that I have the following mapping with a formula property: <class name=Planet table=planets>
I have the following alias in my .aliases: alias gi grep -i and I
I have the following array: Array ( [userid] => 1 [alias] => rahul [firstname]
I have the following array: Array ( [userid] => 1 [alias] => rahul [firstname]
I have the following grammar (i'm showing only the important sectons) packageDeclaration : PACKAGE
All, I have the following code: Readonly my $CTRL_CHARS => qr{[|!?*]}xsm; my ($dbix_object, $alias,
i have the following alias set in my .bashrc: alias la='ls -laG' but i
I have the following lines of code: myProducts = myProducts.Where(p => !string.IsNullOrEmpty(p.Tags) && p.Tags.Contains(string.Format({0}={1}|,
I have the following code: public class Alert { public string Alias { get;

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.