IRCloggy #git 2024-08-16

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2024-08-16

Gab36 left00:01
vrach left00:05
intelfx left00:06
thuna` joined00:25
jacobk joined00:29
Sazhen86 left00:38
error27_ left00:44
error27__ joined00:44
dlh404 left00:44
dlh4041 joined00:44
jaredce joined00:52
hbautista joined00:53
Che-Anarch left00:53
Che-Anarch joined00:54
davispuh left00:54
memset left00:55
memset joined00:57
jaredce left00:57
tocrlisoal^ left00:57
ptrck5 left01:02
Che-Anarch left01:02
ptrck5 joined01:02
Che-Anarch joined01:02
troyt joined01:08
mingdao left01:10
mingdao joined01:10
pete443_ joined01:23
pete443 left01:24
peirik joined01:24
skered joined01:25
hbautista left01:27
peirik left01:29
dviola joined01:48
spit joined01:52
Che-Anarch left02:07
Che-Anarch joined02:08
lucasta joined02:10
gas51627 left02:15
thuna` left02:24
bbailey joined02:25
wobbol left02:44
gast0n left02:47
peirik joined02:47
peirik left02:52
ChmEarl left02:55
hdh left02:55
jmd joined02:55
lucasta left02:57
gsi joined03:09
gsi_ left03:11
Lord_of_Life left03:14
JupiterBig joined03:14
Lord_of_Life joined03:16
JupiterBig left03:20
cero joined03:22
kiwiirc joined03:33
jmd left03:36
jmd joined03:37
Betal left03:37
kiwiirc left03:48
jaredce joined03:50
dlh4041 left03:53
jaredce left03:55
Erisa1 left03:57
Erisa1 joined03:57
ackyshake left03:58
Erisa1 left03:58
Erisa1 joined03:59
Erisa1 left04:05
Erisa1 joined04:06
Minvera left04:07
Erisa1 left04:10
jmd left04:10
jmd joined04:11
Erisa1 joined04:12
jmd left04:14
jmd joined04:15
JordiGH left04:16
jmd left04:20
jmd joined04:20
jmd left04:21
jmd joined04:21
mooz left04:41
Erisa1 left04:45
Erisa1 joined04:47
stagas joined04:49
ali1234 left04:49
ali1234 joined04:50
Spr0cket joined04:52
lemuria joined04:53
gryffus_ left04:56
kjartan_ left04:56
kjartan_ joined05:02
mooz joined05:10
stagas left05:12
pabs3 left05:15
pabs3 joined05:16
gryffus_ joined05:17
cixx joined05:19
kale joined05:29
maret joined05:34
maret left05:34
maret joined05:35
jmd left05:39
jiffe3 left05:41
jiffe3 joined05:43
Guest71 joined05:47
pedahzur joined05:48
jaredce joined05:51
peirik joined05:52
maret left05:54
jaredce left05:56
FH_thecat left06:00
Erisa1 left06:01
Erisa1 joined06:02
Blasius joined06:09
SArpnt left06:15
pedahzur left06:18
vrach joined06:26
bookworm_ joined06:28
masoudd joined06:29
FH_thecat joined06:31
peirik left06:32
bookworm_bookworm06:32
Blasius_ joined06:37
demonspork left06:41
Blasius left06:41
theoceaniscool joined06:46
peirik joined06:49
cycoder left06:51
danse-nr3 joined06:51
jaredce joined06:52
becm joined06:52
ackyshake joined06:54
fdan joined06:54
cycoder joined06:55
jaredce left06:58
gandhibobandhi_ joined07:03
Baniola joined07:03
Baniola left07:07
Baniola joined07:11
Mooncairn_ joined07:14
Baniola left07:15
Baniola joined07:16
stagas_ joined07:16
bob_x1 joined07:16
bob_x1 good day. I have bare repository and trying to clone it. I see next warning. Does it mean I lost my code ?07:17
Warning: Remote HEAD referst to nonexistent ref, unable to checkount07:18
jaredce joined07:18
osse Do you have the repo locally?07:18
ferdinandyb joined07:19
Baniola left07:21
bob_x1 yes I have it somewhere. but these are backups. and backups seems not working07:21
and I have several repos with this error07:21
j416 bob_x1: what's under objects/ in those repos?07:22
bob_x1 j416: folders 02,11,1b ... etc...07:23
jaredce left07:23
j416 so there's _something_ at least, that's reassuring.07:23
does 'git log' work?07:23
bob_x1 in bare repo ?07:23
j416 yeah07:23
a6IO left07:24
bob_x1 yes it works07:24
j416 git fsck --full07:25
ferdinandyb Hi, is there a setting for clone that essentially runs "git remote set-head -a origin" on cloning?07:25
j416 (aha, --full is now default, didn't know; 'git fsck' then)07:25
theoceaniscool left07:25
j416 ferdinandyb: since clone is a read thing, I would doubt it07:26
ferdinandyb: curious, what do you need that for?07:26
bob_x1 j416: one dangling commit07:27
ferdinandyb j416: wdym by "read thing"? it already sets a bunch of refs and does a checkout, or is there some inherent thing I'm missing here?07:28
j416 bob_x1: dangling commits are fine07:28
ferdinandyb j416: the use case is that I never know if a project is main/master/trunk whatever07:28
Baniola joined07:29
bob_x1 j416: then git fsck works fine07:29
ferdinandyb j416: so I try not to hard code things like origin/master in an alias an instead use "refs/remotes/origin/HEAD"07:30
j416 ferdinandyb: ah, I was under the impression that that updated HEAD on the remote, but I suppose it's local07:30
ferdinandyb: I see, makes some sense07:30
my bad.07:30
bob_x1: then by the looks of it, you didn't lose your project07:31
Baniola left07:31
j416 bob_x1: I assume you were able to successfully clone it. Try to check out a branch.07:31
bob_x1 can I checkout a branch from the bare repo ?07:32
j416 from your clone of it07:32
ferdinandyb: fwiw, when I run that, it changes nothing in my local clone07:35
Baniola joined07:35
j416 ferdinandyb: i.e. .git/refs/remotes/origin/HEAD already existed and running 'git remote set-head -a origin' did not change its contents07:36
it did touch it though (it's mtime changed)07:36
its*07:36
bob_x1 j416: no luck. clone of bare repo produces only .git folder and empty list of branches07:36
j416 bob_x1: git branch -r07:36
bob_x1 but something changed. now it does not show error 'Unable to checkount'07:37
ferdinandyb j416: hmm, I'm pretty sure I ran into this at some point, but it may have been in an older version? let me check07:37
j416 this is 2.46.0 fwiw07:37
bob_x1 j416: ah yeah... now works. and code restored07:37
thank you very much.07:37
j416 ferdinandyb: repo cloned from github, not sure if that matters or not07:37
bob_x1: o/07:38
danse-nr3 left07:38
bob_x1 j416: what has happened? can you explain ?07:39
j416 bob_x1: I don't know how you ended up like that. sorry.07:40
bob_x1 ok07:40
j416 I don't think I've seen that error before07:40
bob_x1 thank you once again. very good channel07:40
bob_x1 left07:40
j416 but, remote's HEAD is just a reference07:40
and he left07:40
danse-nr3 joined07:40
skapata left07:45
danse-nr3 left07:45
Baniola left07:45
john_johnk joined07:46
kjartan_ left07:48
ferdinandyb j416: I just checked on a github repo and indeed it is set07:51
john_johnk left07:52
ferdinandyb and it's also set on an sr.ht clone, so I guess what I ran into earlier was a one-time or something07:52
kjartan joined07:53
j416 I wonder how it might have happened07:53
I bet it wasn't set in bob's case above07:54
ferdinandyb j416: actually I do have an idea07:57
git blame to the rescue 😄07:57
j416 do tell if you find it07:57
ferdinandyb https://github.com/ferdinandyb/dotfiles/commit/a3eb7d948b70e8cc52760e698f213163c21da6df07:57
j416 ooh07:58
obviously07:58
not set on 'git init' even if a remote is added, then07:58
but set if you clone the repo; makes sense07:58
ferdinandyb yeah, so in this case, I'm looking for a git add setting 😄07:59
I mean git remote add setting07:59
j416 I like your relatively neat history for your dotfiles.08:00
helps in times of these :)08:00
ferdinandyb there's already a "git remote add -m master origin" that manually adds HEAD, I think "git remote add -a origin" would make sense08:00
j416 huh08:01
why master08:01
that's odd08:01
jaredce joined08:01
ferdinandyb j416: thanks, I got into the habit in general, and try to do it for my dotfiles especially when I feel that it's something not quite obvious08:02
j416 sane unless remote's HEAD can be found to be something else, I suppose08:02
Gamah left08:02
ferdinandyb j416: master is just the examples in man git-remote08:02
gitinfo j416: the git-remote manpage is available at https://gitirc.eu/git-remote.html08:02
j416 ferdinandyb: yeah, I do that too. best ever.08:02
ferdinandyb LOL08:03
nice bot08:03
🙂08:03
osse gitinfo: cookie08:03
j416 ferdinandyb: oh, my bad. I was reading the man page and didn't understand that by <master> they meant whatever you put08:03
osse aww08:03
j416 !botsnack08:03
gitinfo Om nom nom08:03
osse ah08:03
j416 !cookie08:03
warmana joined08:03
Gamah joined08:03
ikke !ping08:05
gitinfo I only respond to !reply_time08:05
ferdinandyb j416: sooo, what's the preferred way of requesting features08:05
?08:05
daru left08:05
j416 ferdinandyb: mailing list08:05
osse If I understand you correctly you want to change the config of a remote repo upon clone?08:09
j416 they want a way to set refs/remotes/origin/HEAD automatically to the remote HEAD not only on clone, but also when adding a remote, I think08:10
osse Ah08:10
I thought that already happened, heh08:10
ferdinandyb osse: j416 exactly, yes, I just want to automatically have git remote add set refs/remotes/<remote>/HEAD08:11
j416 or, maybe you want fetch to do it08:11
remote add afaik does not use the network08:11
ferdinandyb j416: that maybe makes more sense actually, yes08:12
considering I made the alias fetchall to do just that08:13
j416 :)08:13
ferdinandyb ok, so the actual feature I want is for "git fetch" to have a setting, flag whatever to set the remote/HEAD08:14
j416 it'd need to be updated on every fetch then I suppose08:15
I have a feeling this should already be the way it works; maybe it's not. ¯\_(ツ)_/¯08:15
also afaik (I may be mistaken), there's no way from the remote HEAD to know for sure which branch it corresponds to, because it points at a hash, not a ref, so Git has to guess which ref it might be08:16
Guest71 left08:16
Baniola joined08:17
ferdinandyb j416: I'm not sure I follow, cat .git/refs/remotes/origin/HEAD -> ref: refs/remotes/origin/maste08:17
Baniola left08:18
j416 ferdinandyb: locally yes, but the remote HEAD. See output of git ls-remote08:18
derpydoo joined08:19
ferdinandyb https://0x0.st/X44m.txt, you mean if multiple branches were pointed to a726909879d we could not know which branch?08:20
j416 that's my understanding08:20
ferdinandyb most forges only allow for a single "default" branch, so I'd guess there's at least a convention of not doing that08:20
kale left08:22
j416 I created a github repo just now with three branches 'master', 'x', 'y' pointing at the same commit, and set the default branch in github's UI to 'x'. A fresh clone checks out branch 'x'. I changed the default branch (in the UI) to be 'y', and a fresh clone again correctly checks out branch 'y'. I don't know what sorcery is happening here.08:23
warmana1 joined08:23
gas51627 joined08:23
j416 ls-remote says https://x0.at/SKpz.txt08:24
ferdinandyb then there's probably somethign else going on, yeah08:24
warmana left08:25
warmana1warmana08:25
warmana1 joined08:26
j416 ah, it actually stores it, it just doesn't show it in the output of ls-remote08:27
odd, I wonder where I picked up that it tries to guess it.08:27
git ls-remote --symref08:27
danse-nr3 joined08:28
j416 sorry for the noise and thanks, I learnt something.08:28
ferdinandyb j416: me too 🙂08:29
j416 \^^/08:30
KnoP joined08:30
warmana left08:30
warmana1warmana08:30
ferdinandyb ok, so fetch does _not_ set remote/HEAD08:30
for sure08:30
rustyshackleford left08:31
j416 --symref is new-ish (only 8 years old) git::99c08d4eb28f08:33
gitinfo Git web link: https://github.com/git/git/commit/99c08d4eb28f08:33
ferdinandyb "newish"08:35
TIL that detached head is when your head is _not_ a symref08:36
so, next up writing to the ML08:38
cixx left08:38
j416 indeed; detached HEAD means HEAD points directly to a commit08:39
Baniola joined08:39
fdan left08:40
Baniola left08:42
jmjl left08:44
jmjl joined08:44
gryffus_ left08:44
redbool joined08:45
gryffus_ joined08:48
Baniola joined08:55
ferdna left08:59
kale joined09:01
danse-nr3 left09:03
danse-nr3 joined09:04
jacobk left09:04
jacobk joined09:05
Baniola left09:08
Cork left09:08
Baniola joined09:11
ferdna joined09:12
Baniola left09:13
danse-nr3 left09:19
danse-nr3 joined09:21
Baniola joined09:26
hiroot joined09:30
hiroot left09:31
tlatelolco3 joined09:32
john_johnk joined09:42
Baniola left09:44
Baniola joined09:45
gnoo joined09:54
Che-Anarch left09:55
pikapika_lunarmilitantorc09:55
Che-Anarch joined09:55
danse-nr3 left10:07
ferdna left10:11
danse-nr3 joined10:11
xandris left10:12
xandris joined10:14
epicout joined10:14
Baniola left10:15
Baniola joined10:17
Baniola left10:24
stagas_ left10:26
Baniola joined10:26
masoudd left10:26
Walex ferdinandyb: "if multiple branches were pointed to a726909879d we could not know which branch?": 'git' has no branches, as such, they are just a way of saying... Usually that way of talking works, in some cases it does not reflect well what is happening.10:31
haliaeetus joined10:31
derpydoo left10:32
spit left10:36
Saksham_Baba joined10:45
Saksham_Baba left10:45
Saksham_Baba joined10:45
john_johnk left10:47
spit joined10:48
Betal joined10:55
epicout left10:56
Maestro joined10:59
john_johnk joined11:05
danse-nr3 left11:05
Baniola left11:05
peirik left11:10
gryffus_ left11:13
dviola left11:14
osse ferdinandyb: y u no write to list yet >:((((11:16
krumelmonster I messed up in git mergetool (vimdiff) and I want to go back to before I called git mergetool. I did not write any changes but still the file moved from "both modified" to "modified" so I cannot just git mergetool over11:16
gryffus_ joined11:16
osse krumelmonster: git checkout --merge path/to/file11:17
Baniola joined11:17
ferdinandyb krumelmonster: git reset ORIG_HEAD11:17
osse That'll "restore" the file to the state it had immediately after failing the merge11:17
ferdinandyb osse: not yet, but will do so11:18
krumelmonster thank you osse that did it11:18
john_johnk left11:21
dviola joined11:24
lacrymology joined11:24
JordiGH joined11:24
lacrymology left11:25
lacrymology joined11:25
ferdinandyb osse: which one is the correct mailing list for this? [email@hidden.address]11:27
osse ferdinandyb: yes11:27
!list11:27
gitinfo [!mailing_list] The mailing list can be reached via [email@hidden.address] You don't need to subscribe to the list, you will always be put in cc on reply. Read archives at http://public-inbox.org/git11:27
ferdinandyb ack11:27
osse AFAIK that is the only list11:27
ackyshake left11:27
osse Remember to send plaintext or else the grumpy old guys don't like it11:28
ferdinandyb uses aerc and is also grumpy about unnecessary html 😄11:30
Gab87 joined11:30
Gab87 hey guys , i have a question11:30
say i have created a hotfix branch , and i have merged it already into my master branch11:31
but i want to undo that action11:31
mrpops2ko left11:31
Gab87 like it didnt exist before11:31
how can i achieve this11:31
i have read there are several ways , git revert , git reset but i am not sure which one is the proper one to choose for my case11:32
Foxboron Gab87: Are others reading from master?11:32
Gab87 what do you mean ?11:32
Foxboron Are other developers using "git pull" on the master branch?11:33
Gab87 ah i'm not there yet , i am just trying to create a repository that represents this diagram , like a task to learn about gitflow11:33
https://cdn.hashnode.com/res/hashnode/image/upload/v1668069961266/fI6dAXt_8.png11:33
Foxboron okay, then the proper way to do this is with "git revert" and get a revert commit11:34
Gab87 so you see , in this diagram , i merged hotfix too early , i should have created feature for after 1.0 first11:34
Foxboron "git reset" should only be done on local branches that others are not reading from11:34
Gab87 according to the timeline11:34
alexherbo2 joined11:34
Gab87 if you don't mind , can you explain a little more11:35
about git reset11:35
why do we use git revert and not git reset11:35
Saksham_Baba left11:35
Foxboron "git reset" alters history, while "git revert" creates a commit that removes the changes with a new commit11:35
You don't alter history of branches that other people are also working towards11:36
Saksham_Baba joined11:36
Gab87 by creating a new commit , wouldn't that change the structure of the repository ?11:36
and prevent me from achieving the goal , thus is having a repo similar to the diagram11:36
osse ferdinandyb: you mean you "use aerc btw" ? :P11:38
AmR joined11:39
krumelmonster I think I finally did the merge in vimdiff as mergetool. I mostly copied over "REMOTE". I'm still in the four pane vimdiff mode (and it's very hard to read for me still). I would now like to check a final diff of REMOTE and the merged file to check for mistakes. Either still in vim or out in the shell11:39
lacrymology left11:39
Gab87 but if i use git reset to delete my hotfix branch , how does that alter history of branches that other people are working also on . is it because the merge commit will be deleted in the master branch , which the is the branch that other people are working on11:39
Chipzz krumelmonster: you can commit locally and compare your local and remote commit btw11:40
ferdinandyb osse: lol 😄 we should make that a catchphrase11:40
Chipzz if your lcoal commit is not what you want you cna still amend it11:40
alfredb joined11:41
krumelmonster hmm11:42
ferdinandyb is there a way to reference the current branches remote? like @{u}, but not the actual upstream branch, rather basically I'd like to access refs/remotes/[currentremote]/HEAD11:42
Foxboron ferdinandyb: @{push}?11:42
krumelmonster status says modified: mergedfile. can't I git diff mergedfile against the commit I'm still in the process of merging in?11:43
Gab87 Foxboron can you look at my question11:43
Chipzz krumelmonster: also: "git diff file origin/master -- file" I think on top of my head11:43
Saksham_Baba left11:43
Saksham_Baba joined11:43
Baniola left11:44
Foxboron Gab87: You have several. I'm not sure how to answer them in an educational fashion as you don't *really* want to use "git reset" to fix these mistakes.11:44
Chipzz Gab87: git reset doesn't delete any branches. And even if it would, that would only affect your local repo. If you pushed to a repo before and other people cloned that, they would not be affected. But you would be "behind"11:45
ferdinandyb Foxboron: "In a non-triangular workflow, @{push} is the same as @{upstream}, and there is no need for it."11:45
Gab87 okay , so as i am understanding , git revert does not undo the history , it brings it forward , say i want to delete commit A , it will create a new commit where Commit A was deleted11:45
but then , that changes the structure of my repository , doesn't it ?11:46
i am trying to achieve this :11:46
https://cdn.hashnode.com/res/hashnode/image/upload/v1668069961266/fI6dAXt_8.png11:46
Foxboron ferdinandyb: hrmmmm11:46
ferdinandyb Foxboron: consider you're on a branch that has upstream as "gitlab/mybranch", the project also has another remote called origin. I want to "git log gitlab/HEAD^.."11:47
Gab87 Chipzz i dont want to delete the branch , i just want to undo the merge commit that was merged into master branch , without changing the structure of my repository , if you get what i mean11:47
so by using git revert , wouldn't it create extra commits on the main branch ?11:48
maybe , if you check out this image , you'll understand what i mean11:48
https://cdn.hashnode.com/res/hashnode/image/upload/v1668069961266/fI6dAXt_8.png11:48
Baniola joined11:48
krumelmonster Chipzz: `git diff --staged <hash of the cherry picked commit> -- file` did the trick, wonder if there'd been a way that didn't have me research the commit hash first... (I'm cherry picking a series)11:49
Foxboron ferdinandyb: whats the purpose?11:49
ferdinandyb Foxboron: well that particular example I gave lists the commits on your branch not on remote/HEAD, if there are some forks or not automatically updated mirror lying around it might make sense to not check this against origin/HEAD but currentremote/HEAD11:51
Foxboron ferdinandyb: so is the push remote origin or currentremote? and is upstream suppose to be origin or currentremote?11:53
because to *me* it sounds like you are describing the triangular setup as the manpage is explaining11:54
(vim-fugitive actually displays this properly in :Git status if you set it up properly. Which is quite neat)11:55
Chipzz Foxboron: you should note that the name origin is merely a convention (and a pretty vague one at that too), you can name it whatever you want11:55
(and in the case of a triangular setup you should probably rename it to be less confusing)11:56
Foxboron Chipzz: Sure, but is that relevant to this problem?11:56
ferdinandyb the @{upstream} of the current branch is "currentremote/mybranch". I want to run "git log currentremote/HEAD^..", but in an alias. This means I need to do some scripting to get the current upstream, find the name of the remote from there and construct the string"currentremote/HEAD". In practice, I currently just have "origin" hardcoded.11:58
Foxboron: so this is not the difference between pull and push URL-s if that is what you are asking11:59
@{push} and @{origin} are the same11:59
JupiterBig joined12:00
Foxboron right, got it12:01
JupiterBig left12:02
Chipzz krumelmonster: right I assumed you saved the file to disk12:05
dlh404 joined12:07
Gab87 left12:09
Saksham_Baba left12:11
Foxboron ferdinandyb: Okay, i got busy with geoguessr, but I also can't seem to figure out how to generally get the push remote name?12:15
jaredce left12:21
davispuh joined12:23
Baniola left12:24
Maestro left12:25
pagios hello all, i am looking for a book and/or resource to understand how to design my web application. mainly would like to know when to use classes, functions, helper functions etc, something that can organize and help me create modular app. Any recommendations? i am using js12:26
gsish got better chances asking that in a place where web developers are?12:29
stagas joined12:29
yctn left12:29
Baniola joined12:33
AmR left12:33
AmR joined12:34
JupiterBig joined12:34
jaredce joined12:34
ws2k3 joined12:36
user_oreloznog joined12:37
Baniola left12:38
ferdinandyb Foxboron: yeah, I think you have script that with something currently12:38
error27__error2712:38
Foxboron ferdinandyb: I suspect something like git config --local branch.$(git branch --show-current).remote12:38
to get the value, else you need to parse the output of show-refs or something12:38
mrpops2ko joined12:39
jaredce left12:39
ferdinandyb osse: https://public-inbox.org/git/D3HBD7C1FR14.74FL1Q1S9UCB@ferdinandy.com/T/#u12:40
Foxboron oh, this is a problem I've had!12:41
Cork joined12:41
error27 left12:42
error27 joined12:42
osse ferdinandyb: *sniff* it's beautiful :´)12:47
PlasmaHH joined12:47
skered left12:48
skered joined12:49
rsx joined12:49
PlasmaHH Hi, I am doing something like code quality in a project, where I create commits way faster than we can review and especially merge stuff... so my idea was to bundle things into small enough pieces so that people feel able to rewview and merge them chunk by chunk. now in terms of my branch of things, I was wondering how to set it up or if there is a common thing done in similar situations:12:51
I could either have my branch, then when its "full" create a new one on top of that, and when its merged rebase onto mainline. or I could have one huge branch with all my changes and from that cherry pick into a "presentation branch" and when that is merged rebase from mainline...12:51
gandhibobandhi__ joined12:51
jaredce joined12:52
osc4rpt joined12:54
Foxboron PlasmaHH: the latter approach is often refered to as "stacked branches", fwiw12:54
jmjl left12:54
Baniola joined12:54
Foxboron git recently got better support for this with rebase.updateRefs so it's a reasonable approach12:55
gandhibobandhi_ left12:55
Foxboron or rather, what you are describing isn't exaclty stacked branches. But it's the approach you probably want12:56
exactly*12:56
gryffus_ left12:57
gryffus_ joined12:57
Chipzz Foxboron: you should be aware that different web frontends (including github) have varying levels of support for stacked branches when recommending them12:58
PlasmaHH Foxboron: ah intresting, update-refs seems to be a really useful thing there12:58
Chipzz if he happens to be on one that doesn't support stacked branches very well it may not be a good suggestion12:59
Baniola left12:59
PlasmaHH Chipzz: we use gitlab however I don't care much about how it is displayed there, all git operations are to be done locally usually12:59
Foxboron Chipzz: This isn't relevant for the question13:00
ikke PlasmaHH: I sometimes use git machete13:00
Foxboron forge is orthogonal to the question "how do i solve this in git"13:00
the forge is*13:00
Chipzz Foxboron: I think it is13:01
ikke gitlab-cli recently also included a feature to help with a stacked workflow13:01
Chipzz his diffs still need to be reviewed13:01
Foxboron Chipzz: Then you should inform them instead of trying to interject the person providing the support13:02
PlasmaHH Chipzz: we use gitlab merge requests for reviews, I don't see how that could be a problem13:02
Chipzz PlasmaHH: there's several things to consider wrt the forge, ie how does it handle changes in lower parts of your branch stack13:04
PlasmaHH ikke: it seems that git machete only works on local branches?13:04
Chipzz how does reviewing work when you're reviewing different parts13:04
PlasmaHH Chipzz: there would only ever be one merge request from the stack be active13:05
Chipzz PlasmaHH: it really depends on your workflow (and that of your colleagues), but people may want to review different parts of your stack independently and at different times\13:07
PlasmaHH Chipzz: we only do reviews of merge requests13:07
Chipzz PlasmaHH: that's bad then13:08
PlasmaHH Chipzz: why?13:08
Chipzz lets say you're working on a feature, and your stack is 1) add new API to existing classes 2) use the new API to actually build the new feature13:08
you would want to review the new API separately to see if it makes sense13:09
the reason to have stacked diffs is to split up a big change into smaller changes that are easier to digest, and that may affect different teams in your company13:10
PlasmaHH Chipzz: which is why I dont issue a merge request for the branch that is using the api before I added the new api (besides that these kinds of changes wont happen for my current use case anyways)13:10
it would not make sense to merge in the usage of the new api when the code implementing it is not yet there...13:11
Chipzz so you're not really using stacked diffs then?13:11
PlasmaHH Chipzz: I am not using anything, I have asked for what is the best way to do in my situation13:11
and while certainly sometimes one branch branches from another, this isnt a particular named or defined workflow here13:12
ikke PlasmaHH: it syncs them with the upstream branches as well13:13
PlasmaHH ikke: just skimmed the docs etc. and tried "git machete discover" which only uses locals but couldnt find anything to make it see those on origin too13:14
danse-nr3 joined13:14
Chipzz PlasmaHH: I would say it all really depends on what the desired workflow is, for both you and your colleagues13:16
PlasmaHH Chipzz: well thats why I asked above from my point which works better. for the colleagues it is as usual, reviewing the merge requests, and I control which pieces of my code I "reveal" to them via those.13:17
anything not in merge requests is considered nonexistent for official code reviews13:18
rainystorm joined13:18
Chipzz maybe committing the API part of your feature separately works for you, but it's probably not a good idea. Using stacked branches allows your colleagues to request last minute changes to your API for example13:18
it greatly improves the chance both parts of your feautre are coherent, and you won't need commits later to fix design mistakes13:19
PlasmaHH Chipzz: sure, that doesnt seem to be a problem. we do that, and then have to adapt the part using that api too.13:19
kjetilho PlasmaHH: since you call it merge requests, have you looked at merge trains in GitLab?13:20
it is a thorny problem to be able to continue working while waiting for MR's to be accepted and merged :/13:20
kale left13:21
Chipzz PlasmaHH: it all really depends on what kind of software you're working on I guess. it may work in your case, as you say, and it may not work in other cases13:23
or maybe you just haven't encountered cases yet where it won't work out very well13:23
PlasmaHH kjetilho: for one I am quite limited in what I can use and configure there, and also I think I remember those only working witihn the same repo?13:23
Minvera joined13:24
Chipzz PlasmaHH: in the end it's sth you'll have to evaluate for yourself, only you (and your colleagues) can be the judge of that13:25
kjetilho PlasmaHH: hrm - but if it is in different repos, you don't need them to reduce rebase work?13:25
Chipzz PlasmaHH: one concrete example is this: you have a WIP branch with part 1 and 2, someone is reviewing part 1 and comments on certain parts of the diff, you make changes and rewrite that part. The commit the reviewer was reviewing is no longer relevant, where do the comments he made go?13:27
PlasmaHH kjetilho: its not to reduce rebase work but to make smaller "packages" of changes for review and merges to happen... its was basically impossible the last time I did something similar, where I had ~ 1700 changes all over the codebase and I had to find ways to break it into smaller changes to have people review and merge them13:28
Chipzz is gitlab smart enough to recognize your rebased part 1 is the same part as the previous part 1 and retain the comments?13:28
kjetilho Chipzz: yes, if you commit the change to the MR branch13:28
Chipzz anyway those are the kind of things you need to keep in mind when evaluating if stacked diffs are right for you or not13:29
PlasmaHH Chipzz: isnt that example more of a question whether to use rebases or not? we almost always rebase before a merge13:31
Chipzz different kind of rebase13:31
I'm guessing you're rebasing on master before merging?13:31
PlasmaHH we rebase on the branch that the merge targets13:32
Chipzz right, but that's not what I was referring to13:32
what I was referring to is rewriting parts of your stack13:32
or maybe inserting extra commits out of order13:33
kjetilho ideally these parts should be independent. if not, well, more rebasing.13:34
Chipzz lets say you have Base <- API <- feature13:34
colleague reviews API and requests changes13:34
now you have Base <- API' <- feature'13:35
or maybe you have Base <- API1 <- API2 <- feature'13:36
PlasmaHH and your point is that comments attached to API MR will not be there anymore because gitlab doesnt know how to put them in API' ?13:37
kjetilho that would be false. GitLab will keep track of that.13:38
Chipzz like kjetilho pointed out they will be there if you do it right, but yes13:38
that's historically been a problem with some of the forges, not sure what the current status is and if things improved13:38
PlasmaHH seems to be a nonproblem then for me13:40
Chipzz a search in the group of former engineers of a company I worked in before has had multiple discussions about how to work with stacked diffs over the years13:40
PlasmaHH I would be happy if people would at least try to get their heads around submodules here... people dont like git much mostly here13:41
Chipzz PlasmaHH: what programming language are you working in?13:42
PlasmaHH Chipzz: C++13:42
(mostly)13:42
Chipzz PlasmaHH: cmake + vcpkg. vcpkg enables you to make overlay ports. no more submodules needed13:43
or chances are the need for them will be reduced, at least13:43
PlasmaHH Chipzz: vcpkg has been rejected because it makes the build process slow and more importantly it makes it much more involved to do the API+feature simultaneous change thing13:44
Baniola joined13:44
Chipzz personally I dislike using strategies like submodules for embedded code copies13:44
PlasmaHH: if it makes it slow then your engineers did a bad job. If they would have done their job corretcly they would have set up a cache which would actually have increased build sppeds13:45
PlasmaHH Chipzz: I dont know the specifics they tried. but the main point was really making the development too much involved when changing libraries13:48
Chipzz WDYM changing libraries?13:49
PlasmaHH Chipzz: you see, our code base consists of several product repositories and several library repositories for shared parts13:49
alfredb left13:51
Chipzz "several library repositories" sounds like a good match for a vcpkg registry13:53
PlasmaHH Chipzz: I wasnt involved in that experiment but it seems that it was deemed too convoluted to properly develop a feature in a library together with the code that is using it because you had to publish it etc. instead of just pushing it to the right branch in the submodule13:55
Chipzz hmmm I get what you're saying13:57
Left_Turn joined13:57
Chipzz but it sounds like a mess either way13:58
because in the end you would still have to push from your submodule13:58
doesn't sound like fun either13:59
PlasmaHH its not the greatest thing and at all kinds of places and we gradually try to improve it but getting enough developers to change is hard ;)13:59
well its at least just one operation instead of whatever is necessary to create the package and then possibly have to wait for it to be ready or I dont know14:00
Chipzz I'm really not sure if using a submodule is that much better than using a separate checkout for the library involved14:00
lucasta joined14:00
Chipzz You don't have to wait for a package to be ready at all14:00
You can use overlay ports in vcpkg14:00
PlasmaHH the submodule has the advantage that with one git command everything is there14:00
Chipzz which are ports thaht are local to the git repo you're working in14:00
PlasmaHH you meann like pip install -e and virtual environments? well either way I dont have the influence there to revise that decision at the moment14:03
also I dont see what the advantage could be, you have seperate repos either way, its just how they are glued together, you still have to check into one before being able to use it in the other14:04
alexherbo2 left14:14
JupiterBig left14:18
jensen joined14:18
JupiterBig joined14:21
jfsimon left14:26
JupiterB2g joined14:26
jfsimon joined14:26
Turn_Left joined14:26
Left_Turn left14:30
spit left14:31
dsimic left14:34
john_johnk joined14:35
dsimic joined14:36
Baniola left14:39
misanthropos joined14:46
gblfxt joined14:47
rustyshackleford joined14:47
JupiterBig left14:48
JupiterB2g left14:48
jmjl joined14:48
AmR left14:49
Mooncairn_ left14:50
tlatelolco3 left14:50
kurahaupo left14:56
tavares joined14:56
epicout joined15:00
PlasmaHH left15:02
JupiterB1g joined15:03
JupiterB2g joined15:04
haliaeetus left15:04
john_johnk left15:06
thuna` joined15:08
jmd joined15:11
danse-nr3 left15:12
error27 left15:14
error27 joined15:14
jmd left15:14
jmd joined15:14
stagas left15:15
AmR joined15:16
fonini joined15:22
JupiterB2g left15:26
JupiterB1g left15:26
KnoP left15:36
SArpnt joined15:36
gast0n joined15:39
Ox7C5 left15:42
JupiterB1g joined15:43
JupiterB2g joined15:43
JordiGH left15:46
jfsimon left15:46
Mooncairn joined15:47
ChmEarl joined15:48
IceMicha- joined15:53
IceMicha- left15:56
IceMicha- joined16:00
Che-Anarch left16:00
Che-Anarch joined16:00
rsx left16:01
JupiterB2g left16:01
JupiterB1g left16:01
rainystorm left16:01
de-facto left16:02
de-facto joined16:06
john_johnk joined16:07
osc4rpt left16:13
Traneptora left16:14
jaredce left16:15
darth joined16:16
jmd left16:20
warmana left16:20
thiago left16:21
darth left16:22
pgnd joined16:22
jmd joined16:22
DarthChillash joined16:22
Traneptora joined16:26
jmd left16:26
jmd joined16:26
jensenaNr216:36
Left_Turn joined16:36
jmd left16:36
jmd joined16:37
jmd left16:38
Turn_Left left16:38
hdh joined16:42
jmd joined16:45
john_johnk left16:45
skapata joined16:47
jaredce joined16:52
Turn_Left joined16:52
gandhibobandhi__ left16:54
ackyshake joined16:56
Left_Turn left16:56
jaredce left16:57
thuna` left17:01
mooz left17:07
mooz joined17:13
thelounge6897480 joined17:18
ferdna joined17:25
hdh left17:27
hdh joined17:30
gryffus_ left17:35
crabbedhaloablut left17:40
Che-Anarch left17:42
crabbedhaloablut joined17:42
hamburgler left17:42
Che-Anarch joined17:42
gryffus_ joined17:43
hamburgler joined17:46
jaredce joined17:53
becm left17:53
SArpnt left17:58
jaredce left17:58
PantelicGR joined18:01
jaredce joined18:11
gryffus_ left18:16
jaredce left18:16
wootehfoot joined18:35
AmR_ joined18:38
duxsco joined18:39
gryffus_ joined18:40
AmR_ left18:40
AmR_ joined18:41
alexherbo2 joined18:41
wootehfoot left18:41
wootehfoot joined18:42
AmR left18:42
thuna` joined18:43
ash_worksi left18:43
rainystorm joined18:46
thiago joined18:57
Che-Anarch left19:00
Che-Anarch joined19:00
Left_Turn joined19:04
Turn_Left left19:07
Turn_Left joined19:13
Left_Turn left19:17
Turn_Left left19:18
Left_Turn joined19:18
duxsco left19:21
Jck_true left19:24
Jck_true joined19:25
alexherbo2 left19:31
pgnd left19:37
quesker how can I pop the stash and just overwrite this file, not merge?19:38
j416 quesker: git checkout yourstash -- yourfile19:39
quesker ok thanks19:39
j416 ...then delete the stash.19:40
quesker oh I want to keep it. weird after pop it was still there19:41
ferdna left19:45
toric left19:49
wootehfoot left20:00
jacobk left20:00
jacobk joined20:01
duxsco joined20:13
duxsco left20:15
thiago left20:19
memset left20:23
memset joined20:23
lucasta left20:26
haliaeetus joined20:26
SuperLag left20:27
SuperLag joined20:34
cbreak_cbreak20:34
gryffus_ left20:34
AmR_ left20:35
gryffus_ joined20:38
greybaloon joined20:39
duxsco joined20:45
theobjectivedad left20:50
qgnox joined20:51
duxsco left20:52
theobjectivedad joined20:52
duxsco joined20:53
rainystorm left20:54
jacobk left20:55
jacobk_ joined20:55
greybaloon left20:58
m0viefreak joined21:00
gast0n left21:04
duxsco left21:06
jmd left21:08
gast0n joined21:08
greybaloon joined21:10
masoudd joined21:16
YuGiOhJCJ joined21:17
memset left21:32
memset joined21:32
wootehfoot joined21:40
fonini left21:46
memset left21:48
memset joined21:49
Che-Anarch left21:50
Che-Anarch joined21:50
greybaloon left21:59
Che-Anarch left22:05
wootehfoot left22:05
DrVortex joined22:05
randm joined22:06
Che-Anarch joined22:06
Gab2 joined22:07
Gab2 hello22:07
need some urgent help22:07
i have created a local repo that looks like this :22:07
https://cdn.hashnode.com/res/hashnode/image/upload/v1668069961266/fI6dAXt_8.png22:07
howdoi joined22:08
Gab2 then i wanted to push the local repo to github22:08
i first added an origin22:08
then i accidently did git push origin master22:08
which pushed only the master branch22:08
how do i undo this22:08
i have to push other branches as well ( everything ) . how to do this22:09
can anyone assist?22:09
shailangsa joined22:10
DrVortex left22:14
weaksauce Gab2 just push the other branches or use --all to push every branch22:21
Gab2 yeah i got it already ! thankss22:22
so now in my repo22:22
there's alot of button saying22:22
compare and pull request22:22
whats that for22:22
Gab2 left22:29
masoudd left22:31
lucasta joined22:31
paddymahoney joined22:33
user_oreloznog left22:33
Left_Turn left22:39
PantelicGR left22:54
epicout left22:58
demonspork joined23:02
Vonter left23:11
thiago joined23:31
SJrX left23:32
SJrX joined23:34
jaredce joined23:41
JupiterBig joined23:43
jaredce left23:45
qgnox left23:46
JupiterBig left23:48
Gary_Sinise joined23:51
davispuh left23:54

Logs Search ←Prev date Next date→ Channels Documentation