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

Re: pull failed - why should I receive this message.

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Sep 24, 2021, 20:45 UTC
Message-ID
<YU4475ZbWfnvKomP@camp.crustytoothpaste.net>
In-Reply-To
<BN6PR15MB1426EBF10C9E8634EF317DDBCBA49@BN6PR15MB1426.namprd15.prod.outlook.com>
On 2021-09-24 at 20:13:15, Russell, Scott wrote:
Show 9 quoted lines
> Brian,
> 
> You are correct.  This is a build system.  And your responses are the most useful so far.
> 
> "git fetch origin" - okay
> 
> For this one, is there a way to specify just the head?   I just want the latest - and don't want to try to figure out what 'Revision' may be.
> 
> "git checkout -f REVISION"

Pretend the branch you want to operate on is called "main". Assuming that your remote is origin, then you can write "git checkout -f origin/main", or, if you want to be more precise, "git checkout -f refs/remotes/origin/main". That will check out whatever's at the tip of main.

Note that doing that will result in a detached HEAD, which probably doesn't matter for you. In case it does, you can check out your local branch to match it by doing "git checkout -f -B main refs/remotes/origin/main". That will make sure you're on a branch called "main" and will reset it to whatever was on the tip of main when you did your fetch. If you wanted your local branch to be called "dev" instead, you could do this:

  git checkout -f -B dev refs/remotes/origin/main
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Russell, ScottNext: Russell, Scott
Message 10 of 11 in “pull failed - why should I receive this message.”
  1. Russell, ScottSep 24, 2021
  2. Emily ShafferSep 24, 2021
  3. Russell, ScottSep 24, 2021
  4. Randall S. BeckerSep 24, 2021
  5. Russell, ScottSep 24, 2021
  6. Emily ShafferSep 24, 2021
  7. Russell, ScottSep 24, 2021
  8. brian m. carlsonSep 24, 2021
  9. Russell, ScottSep 24, 2021
  10. brian m. carlsonSep 24, 2021
  11. Russell, ScottSep 24, 2021

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.