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

Re: Push from specific directory.

From
Jeff King <peff@peff.net>
Date
Mar 22, 2012, 22:57 UTC
Message-ID
<20120322225747.GB14874@sigill.intra.peff.net>
In-Reply-To
<BLU0-SMTP471329E4F80CD64A569A4F7B1410@phx.gbl>
On Thu, Mar 22, 2012 at 06:04:20PM -0400, Anjib Mulepati wrote:
> 1. Is it always necessary to be in root directory to do the push?

No. You are pushing whole commits, not a particular subset of your working tree. So doing it from anywhere in the repository should have the same effect.

But...
Show 6 quoted lines
> 2. Can I have a folder structure like
>         (a) /Hello-World
>         (b) /Hello-World/gitVersion/GitVersionFile.txt and
>         (c) /Hello-World/nonGitVersion/NonGitVersionFile.txt
> where I give git init for (a) and (c). If Itry to push only from (c)
> is that valid?

You have a repository inside a repository. So when you are in (c), you will be pushing the commits from (c), not from (a). I'm not really sure what you are trying to accomplish with that.

-Peff
Previous: Anjib MulepatiNext: Neal Kreitzinger
Message 2 of 11 in “Push from specific directory.”
  1. Anjib MulepatiMar 22, 2012
  2. Jeff KingMar 22, 2012
  3. Neal KreitzingerMar 22, 2012
  4. Jeff KingMar 22, 2012
  5. Neal KreitzingerMar 22, 2012
  6. Junio C HamanoMar 22, 2012
  7. Neal KreitzingerMar 23, 2012
  8. Neal KreitzingerMar 23, 2012
  9. Neal KreitzingerMar 23, 2012
  10. Holger HellmuthMar 26, 2012
  11. Neal KreitzingerMar 26, 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.