21 Apr 2021 |
jochensp | though git is assuming that origin is upstream and makes some things easier if you follow that | 10:01:56 |
@freenode_izzy:matrix.org | origin git@gitlab.com:IzzySoft/issuebot.git // upstream git@gitlab.com:fdroid/issuebot.git | 10:02:02 |
@freenode_izzy:matrix.org | no, thanks – that would mean reconfiguring quite a bunch of local copies and then messing things up later when I forgot. Whenever I clone one of my repos, "origin" points there. So if I fork from fdroid and then clone that fork… voila. | 10:03:22 |
@freenode_izzy:matrix.org | That would just result in a mess. | 10:03:41 |
jochensp | then just adopt the names whenever you read documentation, it is just names after all :) | 10:04:17 |
@freenode_izzy:matrix.org | Yupp, just putting your hints to my cheat-sheet now while adapting them. | 10:06:39 |
@freenode_izzy:matrix.org | Just wondering: if you say "origin" is always "upstream", what is "upstream" then? Always a specific name of that repo's owner? | 10:07:28 |
jochensp | not sure I get you | 10:08:47 |
jochensp | I have origian = where the software is maintained, released and MRs/PRs go to | 10:09:26 |
jochensp | *origin | 10:09:31 |
@freenode_izzy:matrix.org | See? That gets confusing. You wouldn't have "upstream" then (as that's "origin" for you) but a name for your own forks… | 10:09:40 |
jochensp | I don't need upstream | 10:09:54 |
jochensp | I have a number of forks as the repos owner | 10:10:06 |
jochensp | so git remote lists origin, jspricke, izzy... | 10:10:34 |
@freenode_izzy:matrix.org | Because that's what you call "origin". What does "git remote" give for your issuebot copy? | 10:10:36 |
jochensp | that ^ | 10:10:43 |
@freenode_izzy:matrix.org | Ah. That I meant. | 10:10:44 |
@freenode_izzy:matrix.org | Different strategy. When I started with Git, the references I had used "origin" (as that's what a clone always names it) and "upstream". So switching would mean complete rethinking for me ;) | 10:12:09 |
jochensp | shrug | 10:12:20 |
jochensp | (I switched a number of times when I started with git and than found that git has some shortcuts if you use it as I proposed) | 10:13:06 |
@freenode_izzy:matrix.org | So your "git push --force-with-lease fork origin/master:master" would take the "HEAD" of origin/master and push that to your fork at e.g. GitLab, right? | 10:13:14 |
jochensp | yes | 10:13:29 |
@freenode_izzy:matrix.org | (if it's proposed that "origin" should point to "upstream" I'm confused why it isn't done that way when I clone my fork ;) | 10:14:12 |
@freenode_izzy:matrix.org | thanks! | 10:14:15 |
jochensp | how should git now that you didn't clone the upstream first? ;) | 10:15:05 |
_hc | I've never heard of --force-with-lease fork , there are so many optinos in git, its crazy sometimes | 10:23:23 |
_hc | I guess its a safer --force | 10:24:20 |
jochensp | yeah, https://blog.developer.atlassian.com/force-with-lease/ | 10:25:00 |
_hc | huh, that's for a workflow I don't know, where multiple people are force pushing to a repo. I never force push to shared repos, only to my forks | 10:33:07 |
_hc | I guess that's for shared dev branches in a single git repo | 10:34:17 |