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

RE: Can I Insert some Ancient History into a repo?

From
KRKerry, Richard <richard.kerry@atos.net>
Date
Mar 13, 2021, 09:59 UTC
Message-ID
<AM0PR02MB4081668373AD4AD8C38AE6219C6E9@AM0PR02MB4081.eurprd02.prod.outlook.com>
In-Reply-To
<AM0PR02MB4081BAED92DBEC1F3E33B2059C6F9@AM0PR02MB4081.eurprd02.prod.outlook.com>

And... Just after I sent that email I thought "is that right? I'd better check", and no it isn't right. So to answer my own question.....

From: Kerry, Richard
Sent: 12 March 2021 15:37
Show 11 quoted lines
>
>However, I'm now not able to write the results back to BitBucket.  I've used "remote add" to add the reference to the existing remote >repo where L2 came from.  But when I try "git push origin" it tells me :
>
>fatal: The current branch master has no upstream branch.
>To push the current branch and set the remote as upstream, use
>    git push --set-upstream origin master
>
>Why does it do that?
>If I'm setting up a more conventional local repo to push to a remote it is usually sufficient to do "git remote add origin" and it'll then >push (ie one set-up using a simple fast-import from cvs2git, with the instance on the remote server created there).
>Presumably my current position of generating the local repo from scratch from multiple imports means it's missing something vital.  >What might it be missing?  Is it just that it is aware that it did not originate from a fetch and the above set-upstream is the best way to >fix it?  But other repos that originate from CVS exports are happy with just "remote add".
>Does git know that the repo of the same name on the remote server is somehow "different" from my hand-crafted repo?

I misremembered the details of adding a new item to BitBucket and in that case the required push command does include "-u", which is "--set-upstream". So, sorry for the noise there.

So I've done that and now I'm getting, as possibly expected, a message from BB about it containing work that I don't have locally.  I'll get back onto that next week.  Again presumably a side-effect of building a repo from scratch that doesn't really share history with the remote one.

Regards, Richard.

Previous: Kerry, Richard
Message 5 of 5 in “Can I Insert some Ancient History into a repo?”
  1. Kerry, RichardDec 2, 2020
  2. Johannes SchindelinDec 2, 2020
  3. Ævar Arnfjörð BjarmasonDec 2, 2020
  4. Kerry, RichardMar 12, 2021
  5. Kerry, RichardMar 13, 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.