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

git submodule question

From
LSLaura Smith <n5d9xq3ti233xiyif2vp@protonmail.ch>
Date
May 27, 2020, 15:01 UTC
Message-ID
<Wri_F6OxTiG7HZNvyVdFwGp7qrTWqC7Oipu214kLQ8gGMhna7SU6AXdm_m8tkDaPlMKtXGXc84TSACkN0tigR9satiLkrXn23bfM331g09U=@protonmail.ch>
Hi,
I'm using git submodule to pull some third-party config templates into my git tree, using the following:

git fetch foobar-github master git subtree pull --prefix software/files/perimiter_mail/foobar-github foobar-github master --squash

Now, the question is, when the upstream makes a new commit can I force pull that commit and make git overwrite any changes I've made in the subtree.

At the moment I get bitter complaints from git, e.g. : CONFLICT (content): Merge conflict in.... Automatic merge failed; fix conflicts and then commit the result.

Basically, I want to make myslef an update script that force-pulls the latest upstream repo and then the script will take care of making the necessary modifications (the upstream puts placeholders in their repo, so my script would take care of replacing the placeholders with the real values so that everything works again)
Thanks !
Next: Stefan Moch
Message 1 of 2 in “git submodule question”
  1. Laura SmithMay 27, 2020
  2. Stefan MochJun 10, 2020

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.