git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Another use of "@"?

From
Duy Nguyen <pclouds@gmail.com>
Date
May 3, 2013, 06:51 UTC
Message-ID
<CACsJy8Btz6=4ZUjW3OR2v-LDaDcDaiK=7ucf8rO8MsG9cXt++g@mail.gmail.com>
In-Reply-To
<7vfvy4zhy5.fsf@alter.siamese.dyndns.org>
On Fri, May 3, 2013 at 4:38 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Duy Nguyen <pclouds@gmail.com> writes:
>>
>>> My setup is a bit peculiar where I do git development on three
>>> different machines. Say I updated branch long-branch-name on machine
>>> A. Then I continue my work on machine B. I would want to hard reset
>>> that long-branch-name on machine B before resuming my work. What I
>>> usually do is
>>>
>>> git co long-branch-name
>>> git diff A/long-branch-name
>>> git reset --hard A/long-branch-name
>>
>> Perhaps
>>
>>     git checkout long-bra<TAB>
>>     git diff A/!$
>>     git reset --hard !$
"diff" does not have to follow "checkout".
Show 9 quoted lines
>> In any case, not a Git question, I would have to say.
>
> As a Git question, probably the answers are
>
>         git co long-bra<TAB>
>         git diff @{u}
>         git reset --hard @{u}
>
> with an appropriate setting of the upstream, perhaps?

and @{u} can't be used because I might want to resume from machine C instead of A. I don't have a single upstream. -- Duy

Previous: Junio C HamanoNext: Thomas Rast
Message 4 of 11 in “Another use of "@"?”
  1. Duy NguyenMay 3, 2013
  2. Junio C HamanoMay 3, 2013
  3. Junio C HamanoMay 3, 2013
  4. Duy NguyenMay 3, 2013
  5. Thomas RastMay 3, 2013
  6. Matthieu MoyMay 3, 2013
  7. Duy NguyenMay 4, 2013
  8. Duy NguyenMay 4, 2013
  9. Felipe ContrerasMay 3, 2013
  10. Ramkumar RamachandraMay 4, 2013
  11. Matthieu MoyMay 4, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.