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

How to pull force just one folder in dev tree?

From
JJ.V. <jvsrvcs@gmail.com>
Date
Jun 5, 2012, 17:41 UTC
Message-ID
<4FCE44D4.6050805@gmail.com>

If I am in my source code tree down deep in a directory at the command line, how do I pull from a repo and force overwrite all files locally (and also get files that I deleted locally, just in the folder I am in?)

I do not want to do this for the entire repo, just the directory that I am in and also on the branch I am in. I am not in the 'master' branch, but another branch.

so
  $git reset --hard HEAD
  Would probably do my entire local repo and from 'master' (even if I am 
not on master)?

--- I want to git force pull from the branch I am on locally (tracked to a branch on a remote bare repo) and force overwrite of all files locally & also get the files I may have deleted locally from the file system (not files deleted through git).

How do I practice this to see what would happen (or revert) your solution if there are problems?

Next: Junio C Hamano
Message 1 of 3 in “How to pull force just one folder in dev tree?”
  1. J.V.Jun 5, 2012
  2. Junio C HamanoJun 5, 2012
  3. Philip OakleyJun 11, 2012

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.