IRCloggy #git 2021-10-01

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.

2021-10-01

zopsi left00:00
ninjin left00:00
ninjin joined00:00
zopsi joined00:00
pyeveryt_ left00:01
jkordani left00:02
Yruama left00:14
christall left00:15
stats4647 joined00:19
stats4647 left00:23
chenqisu1 joined00:25
chenqisu1chenqisu1200:25
christall joined00:43
tejr left00:45
roadie`` joined01:00
christall left01:09
durham left01:14
durham_ joined01:14
roadie`` left01:14
Murr left01:18
Murr joined01:19
wender joined01:19
EvilDMP left01:20
computeiro left01:21
gast0n joined01:21
ferdna joined01:21
jimklimov joined01:22
computeiro joined01:24
wender left01:26
madewokherd left01:30
emf_ joined01:32
emf left01:33
madewokherd joined01:36
emf_ left01:36
ChmEarl left01:40
hqdruxn08 left01:43
hqdruxn08 joined01:43
chenqisu12 left01:44
onizu left01:44
cryptonector joined01:44
chenqisu1 joined01:44
chenqisu1 left01:45
cryptonector why does this not work: git push upstream HEAD:new-branch-name; but this does: git checkout -b new-branch-name && git push upstream HEAD:new-branch-name ?01:45
chenqisu1 joined01:45
cryptonector I don't understand why I should have to have a local branch name in order to be able to create that in a remote01:45
chenqisu1chenqisu1201:46
cryptonector it's... mildly infuriating :-/ -- I've been making do for a long time, but finally I've decided to ask01:46
ninjin- joined01:49
ninjin left01:50
cdown left01:51
xx left01:52
elkalamar left01:54
BSaboia left01:54
jimklimov left01:57
roadie`` joined02:01
Xaldafax left02:03
roadie`` left02:05
durham_ left02:11
durham joined02:13
hbautista__ joined02:13
alzgh left02:22
Samian joined02:23
skapata left02:27
nyah left02:28
betelgeuse left02:28
Samian left02:30
chenqisu12 left02:31
chenqisu12 joined02:32
pyeveryt_ joined02:32
pyeveryt_ left02:37
ColdKeyboard left02:39
jimklimov joined02:41
durham left02:41
durham joined02:42
antone joined02:44
Samian joined02:52
junktext left02:56
roadie`` joined03:00
FinnElija left03:01
Samian left03:02
FinnElija joined03:03
gnoo cryptonector: it should work with git push -u03:04
roadie`` left03:05
christall joined03:06
antone left03:09
antone joined03:09
roadie`` joined03:15
ttree joined03:24
dermoth left03:26
roadie`` left03:29
JibStyle joined03:32
dermoth joined03:39
keypusher left03:40
christall left03:44
zebrag left03:45
stevenix1 left03:50
durham left03:53
durham joined03:55
adlternative left03:55
adlternative joined03:55
antone left03:56
saroy joined03:56
nightstrike left03:56
wender joined04:04
bket left04:05
computeiro left04:06
elibrokeit cryptonector: as documented by man git push -- it cannot infer what you expect new-branch-name to be, if HEAD doesn't unambiguously resolve to a ref beginning with refs/heads/ or refs/tags/ and new-branch-name doesn't exist on the remote04:06
gitinfo cryptonector: the git-push manpage is available at https://gitirc.eu/git-push.html04:06
bket joined04:07
elibrokeit however, if HEAD is a branch, even if that branch is, say, master, you can push HEAD:new-branch-name and it can successfully determine that you mean to push a branch, so it treats new-branch-name as a branch04:07
computeiro joined04:10
elibrokeit gnoo: what does --set-upstream have to do with this?04:10
The_Blode left04:11
wender left04:11
elibrokeit cryptonector: incidentally, as I do use detached heads fairly frequently for this sort of thing, I sort of got resigned to specifying git push myfork HEAD^:refs/heads/new-branch-name04:12
dayday joined04:14
gnoo elibrokeit: i thought the question was about different branch names locally and remotely (seeing checkout -b new-branch-name)04:14
elibrokeit nope, you can push those just fine :p04:14
the question stated "why does push fail", not "why doesn't it set up so that push later works without specifying options"04:15
The_Blode joined04:16
dayday Hi! Curious about some basic workflow stuff here. I got this repo that only I use (commandline), so instead of committing new features and fixes incrementally like I would if I was working with a team, I just rebase back and forth between my main commits like "Add Feature A", "Add Feature B" etc.04:23
Unfortunately I often run into merge conflicts (duh), and sometimes I get sloppy and miss a spot, causing commits to contain code that isn't theirs. So I have to rebase, re-rebase etc. -- it always works out in the end but it's extremely time-consuming, and I have without doubt spent more time on my Git history than on my project itself :-)04:23
Are there any ways to simplify this workflow? Maybe some UI tool I managed to miss out on?04:23
elibrokeit dayday: what does that even mean "rebase back and forth between my main commits"?04:25
dayday Say I want to fix something in commit "Add Feature A", then I just rebase back to that commit and apply the fix there and amend the commit. As opposed to making an entirely new commit ie. "Fix this or that in Feature A". Hope that made sense!04:27
roadie`` joined04:28
elibrokeit ah, so basically the same as if you did git commit --fixup=feature-A-commit04:28
dayday Really???04:28
elibrokeit but you're asking if there is advice on simplifying the process of autosquashing the commits together04:28
dayday Oh man :-)04:28
elibrokeit git commit --fixup creates a new commit with a magic oneline description beginning with "fixup!"04:29
and that tells git rebase -i --autosquash how to automatically sort and mark the commits for squash/fixup04:29
actually resolving conflicts is still going to be a challenge, sadly :(04:30
vishal left04:30
elibrokeit however -- you do not need to keep going back and forth to amend old commits, you can commit stuff piece by piece and then glue it back together after the fact04:31
e.g. typically I don't want to checkout an old commit just so I can work on fixing it up04:31
I fix it on the latest commit, commit --fixup, and immediately rebase --autosquash to fold it into the commit it belongs in04:32
jazzy2 joined04:32
dayday Very cool :-) Thank you so much elibrokeit04:32
vishal joined04:34
jazzy left04:34
dayday I've been doing it wrong this whole time! This fixup stuff is brilliant!04:37
elibrokeit it is pretty handy :) especially since it means you can now use git add -p to add only part of the current set of edits to an old commit04:38
rather than, idk, stashing everything, copying files around, re-creating changes after checking out an old commit, and G-d knows what else04:38
hbautista__ left04:40
ThorMojito1 joined04:44
emf joined04:45
dayday hehe04:45
That's pretty much what I've been doing, yeah :-)04:46
emf left04:46
dayday Boy am I glad I joined #git and ran into you tonight elibrokeit!04:46
elibrokeit happy to help :)04:46
dayday :D04:47
ThorMojito left04:47
rsrx joined04:48
cryptonector gno, elibrokeit: thanks!04:49
elibrokeit: yes, I work in detached head state a lot04:50
git push myfork HEAD^:refs/heads/new-branch-name -- I'll have to remember it04:50
elibrokeit great minds think alike, eh04:50
cryptonector elibrokeit: I mean, branches are crutches often04:51
madewokherd` joined04:53
YuGiOhJCJ left04:55
elibrokeit cryptonector: I mainly do this for pushing individual changesets to github04:55
madewokherd left04:55
elibrokeit as PR branches04:55
cryptonector right, me too04:56
elibrokeit elsewhere I might just use one branch called "patchqueue" and send patches via git send-email04:56
cryptonector for example, if I'm rebasing an OpenJDK branch onto a newer OpenJDK, then I'll get into detached head state, git rebase --onto, and when I'm gone fixing conflicts I'll create a branch and push it04:57
it's just, I might want to push to a new remote branch and not keep a local one04:57
so, ok, you taught me something04:57
elibrokeit I wouldn't be opposed to git adding an option to always assume if it cannot figure out what you are trying to push, assume it is a branch. But it's not really up to me...04:59
cryptonector I'd like that; anyways, gtg, thanks04:59
elibrokeit (this ambiguity is essentially because "well technically you could want to push it as a lightweight tag")04:59
elibrokeit skeptical05:00
emf joined05:01
ferdna left05:02
jazzy2jazzy05:02
nightstrike joined05:14
nightstrike Timvde: what is autostash?05:15
(sorry, my client disconnected a few hours ago)05:15
ikke option to automatically stash changes when you rebabse and apply the stash again after rebase05:15
emf_ joined05:16
emf_ left05:17
emf left05:18
roadie`` left05:21
chenqisu12 left05:26
davit left05:28
pulse left05:33
vysn joined05:34
wender joined05:34
thiago left05:34
Guest34 joined05:35
computeiro left05:36
gast0n left05:37
computeiro joined05:39
christall joined05:41
davit joined05:41
wender left05:41
nightstrike that's convenient05:46
ThomasD13 joined05:46
rsrx left05:48
emf joined05:51
cvmn joined05:51
Guest34 left05:54
roadie`` joined06:00
thekingofbandit left06:03
ouzel8___ joined06:03
thelounge66195 joined06:04
birkoff left06:06
lucerne left06:06
llh left06:06
LiENUS left06:06
shailangsa left06:06
avarab left06:06
wolfshappen left06:06
starfarer left06:06
magic_ninja left06:06
nivag left06:06
thelounge6619 left06:06
ouzel8_ left06:06
wacko left06:06
Fabricio20_ joined06:06
wacko_ joined06:06
vikonen2 joined06:06
raffaele_ joined06:06
JibStyle left06:06
rtjure left06:06
acidtonic_ left06:06
fjmorazan left06:06
NeatNit left06:06
vikonen2vikonen06:07
bodiccea_ left06:07
Fabricio20 left06:07
ilogger2 joined06:25
wagle_ joined06:26
shailangsa_ joined06:26
roadie`` joined06:26
miikak elibrokeit: I'm building it in docker container on same machine06:26
Gustavo6046 joined06:26
miikak elibrokeit: can I somehow pass it as a flag to make?06:26
kenanmarasli joined06:27
gxt_ joined06:28
lessless joined06:29
elibrokeit docker is by definition not "the same machine"06:30
it is a different machine, perhaps with a newer version of glibc ;)06:31
Vonter joined06:32
aniruddha joined06:32
miikak elibrokeit: yea, on the host I have 2.17 and in container I have 2.2806:32
xlei joined06:32
rfuentess joined06:35
troyt joined06:36
SpacePlod joined06:36
shailangsa_ left06:39
cvmn joined06:41
AnapodoPsalidi joined06:47
wender joined06:49
cvmn left06:49
jast joined06:49
pieguy128_ joined06:49
glider_ joined06:50
ChemicalRascal joined06:51
mikeputnam joined06:52
Erisa joined06:53
ChemicalRascal_ joined06:54
Dragoon joined06:54
computeiro joined06:54
theoceaniscool joined06:55
ChemicalRascal_ left06:56
wender left06:56
ChemicalRascal left06:56
ThorMojito joined06:56
wender joined06:59
shailangsa joined07:00
computeiro left07:01
diverdude joined07:02
Vonter left07:03
Vonter joined07:03
computeiro joined07:05
emf joined07:05
wender left07:06
emf left07:07
vysn joined07:10
mcfrd joined07:11
vikonen4 joined07:12
matthewcroughan joined07:12
SuperLag joined07:12
vikonen4vikonen07:12
blmt joined07:13
qsx joined07:13
avar joined07:14
mika joined07:14
mcfrdmcfrdy07:14
henk joined07:15
Assault joined07:17
AsenMx joined07:18
Assault hi. I already made some commits to develop branch (but did not push the commits to remote). Now realised I should have created a new branch for the commits. Is it possible to somehow move the commits to new branch at this point?07:18
limon_ joined07:18
michele_ joined07:18
i8c joined07:18
Murr joined07:18
matthewcroughan_ joined07:18
blaisebool_ joined07:19
tmz joined07:19
OMGOMG_ joined07:19
diverdud1 joined07:20
matthewcroughan left07:21
diverdude left07:21
AsenMx left07:21
qsx left07:21
qsx joined07:21
t3nj1n_ joined07:21
dskull joined07:22
Masklin_Gurder joined07:22
jab416171 left07:22
berndj joined07:22
barlas joined07:23
vancz joined07:23
elkalamar joined07:23
waldeck_ joined07:24
eggbean_ joined07:24
de-vri-es joined07:25
jab416171 joined07:25
xkr47_ joined07:26
xkr47_xkr4707:27
EPic_ joined07:27
rudi_s Assault: Sure, just create a new branch with `git branch new-branch` and then "remove" the commits from the old branch with git reset --hard origin/develop or similar. NOTE: The --hard will remove uncommitted changes in your working tree. So only do this if `git status` shows no pending changes.07:27
miikak Assault: I have done it as follows: reset with --soft flag, checkout new branch and commit changes there07:28
jim87 joined07:29
Aleksejs_Home joined07:31
blaisebool_ left07:31
nomicon_ joined07:32
blaisebool joined07:32
tomek_ joined07:32
Henry151_ joined07:33
phylaz joined07:34
vysn left07:34
emf joined07:35
vysn joined07:35
christall joined07:35
pyeverything joined07:36
TomyWork joined07:37
wender joined07:39
christall left07:40
pyeverything left07:41
computeiro left07:41
rsx joined07:42
miikak hm07:43
lemontre1 joined07:44
stoned joined07:44
computeiro joined07:45
stonedHash07:45
justache joined07:45
SpeakerToMeat joined07:46
robertparkerx_ joined07:46
wender left07:46
velix joined07:46
Industrial[m] joined07:47
ericnoan joined07:47
themill joined07:47
wender joined07:49
Optimus joined07:49
drogas joined07:49
swistak joined07:49
computeiro left07:51
af joined07:55
theoceaniscool left07:57
aidalgol joined07:57
EvilDMP joined07:58
Vonter left07:59
computeiro joined08:00
emf_ joined08:00
Vonter joined08:00
alkino joined08:00
wender left08:01
darkstardevx joined08:02
af left08:02
otisolsen70 joined08:03
emf left08:04
emf joined08:04
Assault got it, thanks!08:06
emf_ left08:06
af joined08:08
Guest1 joined08:08
Guest1 how do i revert to the previous commit as my master?08:08
vysn left08:11
Guest1 how do i under a hard reset?08:14
*undo08:14
alkino left08:16
Strom- joined08:16
alkino joined08:17
blaisebool left08:17
osse git reseting back to where you started from08:18
you can use the reflog to see where that is if you need to08:18
Guest1 did i just delete a months work of work?08:18
osse if it was committed, no.08:18
Guest1 this was the command i ran: git reset --hard master~108:19
osse were you on master at the time?08:19
Guest1 i wasn't08:19
i was on another branch, but i had committed to it08:20
osse do 'git reflog HEAD' and find the commit you were on. Unless you've done some other stuff in the meantime it should be HEAD@{1}08:20
soifou joined08:20
osse or you can do 'git reflog branchnameyoureactuallyon'08:20
Guest1 do i checkout one of the listed HEADs?08:21
osse no08:22
you git reset --hard that-thing08:22
cluelessperson joined08:24
Guest1 want to make sure i get this right, so this is what git reflog shows:08:24
aaaaaaa (HEAD -> feature/skeletons) HEAD@{0}: checkout: moving from master to feature/skeletons08:24
bbbbbbb (master) HEAD@{1}: checkout: moving from feature/skeletons to master08:24
aaaaaaa (HEAD -> feature/skeletons) HEAD@{2}: reset: moving to master~108:24
ccccccc HEAD@{3}: Branch: renamed refs/heads/feature/refactor to refs/heads/feature/skeletons08:24
ccccccc HEAD@{5}: commit: started skeletons, not working08:24
so i run 'git reset --hard HEAD@{0}'?08:24
rfuentess_ joined08:25
jimklimov1 joined08:26
rfuentess left08:26
osse (by the way, it would make more sense to censor the branch names than the sha1s :P)08:26
jancoow2 joined08:26
LewisCawte joined08:26
itok joined08:26
hqdruxn08_ joined08:26
LewisCawteLcawte08:27
brw joined08:27
fxrs_ joined08:27
pizdets_ joined08:28
sandipan joined08:28
ztrawhcse joined08:28
osse Anyway, we can see that aaaaaaa (aka. HEAD@{2}) is the commit that you reset *to*, and the commit immediately before that is ccccccc (aka. HEAD@{3})08:28
just to make sure, you can 'git reflog feature/skeletons' (i assume that's the branch you're on) and verify that feature/skeletons@{1} is the same sha1 as HEAD@{3} from that output08:28
jancoow2jancoow08:28
osse that's the sha1 you'll want to reset --hard to, to get back to where you started08:28
Guest1 osse: next time xD08:28
Techcable joined08:29
Duckle joined08:29
roxlu joined08:29
sahilister joined08:29
hnOsmium0001 joined08:29
bencevans joined08:29
retro_ joined08:29
aniruddha left08:29
aniruddha joined08:29
LordLion joined08:30
JayDoubleu joined08:30
DrowningElysium joined08:30
osse where did 0 come from?08:30
Guest1 so what happened is i was on my feature/skeletons branch, realized i didn't want to keep the work there, and tried to revert back to the previous commit, so i ran that reset command, then checkout'd master, and then checkout'd feature/skeletons again08:31
i think the command i used for that was either "git reflog HEAD" or "git reflog" (while on master perhaps)?08:33
unmanbearpig joined08:33
rahl joined08:33
osse run them again ,then08:34
unmanbearpig left08:34
unmanbearpig joined08:34
unmanbearpig left08:35
Guest1 `git reflog HEAD` while in the feature/skeletons branch?08:35
unmanbearpig joined08:35
unmanbearpig left08:36
unmanbearpig joined08:36
Guest1 osse: ok, that paste was the output of running `git reflog HEAD` while in the feature/skeletons branch, i just checked08:36
Optimus left08:37
Guest1 osse: ok and HEAD@{3} and HEAD@{1} also match up08:37
unmanbearpig left08:38
osse that makes sense, because you moed back and forth08:38
unmanbearpig joined08:38
Guest1 so then i just do `git reset --hard [HEAD@{3}.sha]`?08:38
makara joined08:40
shailangsa left08:41
Guest1 osse: i.e. ccccccc08:41
`git reset --hard [cccccc]`08:41
makara here's a puzzle. I kept a branch locally that was already committed to master because I needed to see the list of unique commits it made08:41
That was a while ago. Today I rebased the branch with master by accident, but without changing to it first. So the reflog doesn't show the commit it was on before rebasing. How do I find that commit?08:41
Guest1 and do i run that command while in master or in feature/skeletons?08:42
tchan1 joined08:42
rahl left08:42
mika left08:42
frobnic_ joined08:42
mika joined08:42
cambrian_invader joined08:42
nyuszika7h joined08:42
Pent joined08:42
AlexKalopsia4 joined08:43
eqw joined08:43
daemon joined08:43
rhe joined08:43
kanzure joined08:43
rahl joined08:43
vysn joined08:43
mackerman joined08:43
strudl joined08:43
haymawk joined08:43
synthmeat joined08:43
daurnimator joined08:43
NightMonkey joined08:44
derfj joined08:44
osse Guest1: the branch you want to modify08:44
Bilge joined08:44
osse ro rather, undo the modification you did08:44
makara oh, i see i did check it out. All good08:44
osse which is feature/skeletons08:44
emf left08:45
ztrawhcse left08:45
Guest1 osse: ah awesome, it's back, thank you man! is it possible to go back a single commit in this branch too?08:45
that's what i originally wanted to do, but didn't know how08:46
emf joined08:46
osse that would be git reset --hard feature/skeletons~108:46
or simply HEAD~108:46
elibrokeit joined08:46
xkr47 left08:47
xkr47 joined08:47
emf left08:47
hnOsmium0001 left08:49
Guest1 osse: thank you so much dude, i thought i'd lost like a months worth of work for a moment there08:49
osse as long as it's committed at some point it's almost impossible to lose08:50
might be a bitch to get back, but it's in there somewehere08:50
Guest1 great to know, wont need to panic next time it happens then08:51
natrys joined08:52
supernovah joined08:59
shailangsa joined09:03
roman joined09:05
bencevans3 joined09:05
roadie`` left09:06
unluckyshrubbery joined09:06
blmt4 joined09:07
nomicon_ left09:07
mika left09:07
shailangsa left09:07
bencevans left09:07
bencevans3bencevans09:07
Masklin_Gurder left09:07
vikonen6 joined09:08
mika joined09:08
_xor joined09:08
brw left09:08
matthewcroughan_ left09:08
matthewcroughan joined09:08
Guest1 left09:08
Masklin_Gurder joined09:09
alkino_ joined09:10
fflam_ joined09:10
berndj-blackout joined09:11
avarab joined09:11
kanzure_ joined09:12
nomicon joined09:12
vancz left09:14
alkino left09:14
blmt left09:14
blmt4blmt09:14
vikonen left09:14
avar left09:14
vikonen6vikonen09:14
makara left09:14
kanzure left09:14
berndj left09:14
mika left09:14
makara joined09:14
mika joined09:14
vancz joined09:15
berndj-blackoutberndj09:15
chronon joined09:16
vysn left09:18
otisolsen70_ joined09:19
vladoski joined09:19
darkstardevx left09:20
rfuentess_ left09:20
computeiro left09:20
rfuentess__ joined09:20
darkstardevx joined09:20
computeiro joined09:20
rond_ joined09:22
otisolsen70 left09:22
cluelessperson left09:24
cluelessperson joined09:25
shailangsa_ joined09:25
wender joined09:27
roadie`` joined09:30
computeiro left09:30
roadie`` left09:35
roadie`` joined09:35
christall joined09:36
elkalamar left09:43
natrys left09:47
BSaboia joined09:49
pyeverything joined09:49
EPic_APic09:53
pyeverything left09:54
Guest57 joined09:56
Guest57 left09:56
cdown joined10:03
roadie`` left10:06
wagle_wagle10:10
roadie`` joined10:14
masber joined10:17
ino joined10:18
ino left10:19
roadie`` left10:19
Yruama joined10:20
stats4647 joined10:21
christall left10:23
casaca joined10:24
stats4647 left10:25
rond_ left10:28
Misotauros joined10:31
roadie`` joined10:32
vysn joined10:36
alzgh joined10:45
darkbit joined10:47
dviola joined10:48
BUSY joined10:49
otisolsen70_ left10:50
merethan joined10:56
merethan electronics10:56
oops10:57
osse kitchenware10:58
oops10:58
rsx left11:05
alkino_ left11:05
pulse joined11:09
roadie`` left11:12
roadie`` joined11:12
daoudr joined11:14
audiobirb joined11:15
roadie`` left11:17
Murr left11:18
Murr joined11:18
xx joined11:20
roadie`` joined11:28
alkino joined11:30
merethan bdsm equipment11:30
oops11:30
osse ;)11:30
I ended up in ##electronics. There´s no channel for kitchenware though.11:32
Guest7843 joined11:32
roadie`` left11:33
Guest7843 I have a patch with full absolute path and git tells me 'Invalid path' while the path is really valid, file exists there. How can I apply such path with full absolute path in it?11:33
git 2.3311:33
osse look at the -p option11:33
Guest7843 osse: Does it matter where the *.patch file itself located?11:34
osse no11:34
jwillikers joined11:38
speckz joined11:41
darkbit left11:42
roadie`` joined11:45
lantech19446 damn merethan i was actually interested in your conversation til i foubd out you were joking and there is no equipment11:47
jwillikers left11:47
lechner joined11:49
merethan Well there´s no channel for kitchenware, but the other two have one lantech19446 ;)11:51
jwillikers joined11:51
computeiro joined11:54
wender left11:56
wender joined11:59
natrys joined12:00
computeiro left12:01
rewrit3 joined12:06
nyah joined12:06
makara left12:08
gh34 joined12:19
christall joined12:20
tchan1 left12:27
tchan joined12:27
aidalgol left12:34
vladoski left12:35
vladoski joined12:36
aidalgol joined12:37
mat001 joined12:40
joes joined12:43
kyshoc joined12:46
kyshoc left12:46
kyshoc joined12:46
a6a45081-2b83 joined12:47
joes left12:48
BH23 joined12:48
christall left12:51
christall joined12:51
robertparkerx_ left12:52
robertparkerx joined12:53
roadie`` left12:53
roadie`` joined12:54
vlado joined12:58
roadie`` left12:59
roadie`` joined12:59
vladoski left13:00
daoudr left13:00
zebrag joined13:10
tureba joined13:15
vladoski joined13:17
Murr left13:18
Murr joined13:18
ApostleInTriumph joined13:22
alvesadrian joined13:23
EvilDMP left13:24
madewokherd joined13:30
Assault left13:31
stats4647 joined13:34
cousteau joined13:34
Anticom joined13:34
cousteau What resources can I use to learn (more) git? Is the Git Book good enough for all levels of expertise, or maybe too lengthy / shallow / outdated in some aspects?13:35
Anticom Hi folks. When having a submodule and I'm updating its ref, is there any (convenient) way to view the log for the range of that ref update? (Similar to how `git commit -v` will display those changes)13:35
cousteau For example, I recently learned about worktrees, realized they are a really simple thing, and wondered why I didn't learn about them earlier13:36
osse Anticom: git diff --submodule=log perhaps?13:36
Anticom cousteau: IMHO a good start would be to learn more about the internals of git. You wouldn't have to keep all this knowledge on hand every time but it's good to have read about it. E.g. https://www.freecodecamp.org/news/git-internals-objects-branches-create-repo/13:36
cousteau (maybe I should learn git lsf...)13:36
Hm, might do that. I think I have a pretty solid idea of how git internals work, but let me check13:37
Anticom osse: tried it, didn't work. This SO post said it only works with -p but that didn't yield the desired result as well :/ https://stackoverflow.com/a/11787169/96653013:37
Vonter left13:38
Anticom cousteau: For example took me some time to understand the difference between refs and objects but fortunately osse is a very patient human being :)13:38
Well and what they are in the first place of course13:38
stats4647 left13:38
Anticom cousteau: But this vastly helped me understanding why certain things are the way they are13:38
Vonter joined13:40
cousteau "What is stored between commits? Is it just a diff between the current and previous commit? Or is an entire snapshot of the repo stored each time?" -- this right here is a very good question. I think 100% of people who have ever learned Git have assumed a commit is some sort of diff rather than a snapshot13:41
roadie`` left13:42
cousteau I call this "the git lie" or "the diff fallacy"13:42
roadie`` joined13:42
Anticom cousteau: no no, it's just the differences. I've picked the article by random, just skippnig over it to see whether it's not complete bongus13:42
cousteau Uh, no. A commit is an entire snapshot of the code.13:43
Anticom Wut13:43
cousteau Or rather, a list to references to files in the version of that snapshot13:43
osse pro-tip: in one terminal run watch -C tree -C .git , in another terminal run 'git init' and play around13:43
betelgeuse joined13:44
gnoo joined13:44
cousteau It doesn't store a single copy of every file in each commit, but it does contain references to the whole tree in each commit13:44
Anticom You learn every day...13:45
masber left13:45
Anticom Also it's been a while since I've last devoted myself wih learning about internals... maybe I should do another one of those sessions as well13:45
cousteau So basically you wouldn't need to know what the parents of a commit are in order to get the files in the commit. That would be very inefficient! Whenever you change to another branch you'd have to apply all the diffs one after the other13:46
osse Anticom: git diff will usually print the old and new shas, so you can do cd submodule; git log old..new13:46
Anticom osse: that works of course, was just curious since `git commit -v` is giving me a nice list of commits for the submodule I thought maybe there's another way to get this info without having to jump into the commit msg editor :D13:47
cousteau So it instead saves snapshots of the whole tree, and uses diff between commits only for certain operations, like merge, rebase, cherry-pick...13:47
Anticom cousteau: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects last image on this article near bottom illustrates this fairly well13:47
roadie`` left13:47
osse Anticom: commit -v you say... did you combine the diff --submodule=log with --staged?13:47
Anticom osse: I've tried it with the submodule change unstaged as well as staged but never with the --staged flag13:48
roadie`` joined13:48
cousteau Anticom: indeed! Pretty cool13:48
jensen joined13:49
Anticom osse: I've just double-checked my global git config. There's nothing tinkering with commit / log other than my alias `ci = commit -v` which i'm using to commit (and another unrelated alilas).13:50
osse Anticom: need for info. are the stages changed? is this right before commit? what does git diff print?13:51
jensen How do I `git remote add origin `<repo stored on my system locally>`? `git remote add origin "$HOME/repos/dotfiles.git" on my server results in "fatal: not a git repository (or any of the parent directories): .git". I can clone from this fine13:52
Anticom osse: OMG a regular `git status` is giving me exactly what i wanted lol13:54
cousteau What do you mean "on your server"? Is this a remote machine?13:55
Anticom osse: my alias for status is adding `-s` so because of that the log is left out13:55
cousteau Or is everything in the same machine?13:55
Anticom osse: but to answer your question: https://gist.github.com/Anticom/d57b389f5783a7cd234e0704f8bdd42313:57
osse Anticom: and what if you add --submodule=log ?13:59
Anticom osse: then I'm getting the entire diff for the modules13:59
I thought this was what --submodule=diff was for13:59
computeiro joined14:00
Anticom Oh no wait, sec14:00
otisolsen70 joined14:00
Anticom Yes, this gives the log. Sorry I changed another file in the meantime and the submodule logs come at the end so i got confused14:01
osse rekt14:01
wender left14:01
Anticom Didn't now `git diff` also had the --submodule flag. Was trying it with `git log` (as proposed by the above reference SO post) and this didn't work of course14:01
cousteau Oh I got jensen's error14:02
vlado left14:02
cousteau jensen: did you run git init before trying to call git remote add?14:02
vlado joined14:02
wender joined14:04
Anticom I think a `git clone /path/to/another/local/repo` might work as well (?)14:05
cousteau Yeah, that too. Might be easier14:05
computeiro left14:06
cousteau In fact, I did that to know for sure how to clone, and then tried jensen's remote add method14:06
but yeah, cloning a local repository will do what you want14:07
osse They even said so. "I can clone from this fine"14:07
cousteau Oh14:07
git clone local1/ local2/ is another example of command that ends up generating relative refs that maybe should use absolute refs14:08
Er, generates absolute refs, should generate relative refs14:08
mei joined14:09
Anticom How could it?14:10
git clone still produces a working copy14:10
cousteau Instead of having `origin /home/user/project/repo`, having `origin ../repo`14:11
keypusher joined14:13
cousteau The thing is, if you have a whole superproject with submodules, worktrees, etc in a folder, you can't move that folder to another path without breaking absolute refs. The whole thing is static, anchored to that path forever. It would be nicer if it were self-contained.14:14
alkino left14:14
Anticom cousteau: Maybe could be achived with `git remote set-url orign <relative-path>` (dunno whether you need file:// scheme there or not. maybe check the remote before updating it)14:15
jensen Ok, here's all I did: git clone --bare "$HOME/repos/dotfiles.git" "$HOME/.dotfiles.git ; git --git-dir="$HOME/.dotfiles.git" --work-tree="$HOME" checkout". I am successful up to this point14:16
Ok nevermind14:18
I probably ran git without the --git-dir="$HOME/.dotfiles.git" --work-tree="$HOME arguments earlier... `d remote -v` shows it's linked to local repo14:18
cousteau Why is .dotfiles.git hidden? I mean it can, but it doesn't have to14:18
kenanmarasli left14:18
gast0n joined14:19
cousteau Ah wait never mind, you're creating a hidden repo dir from a non-hidden repo dir for some (probably unrelated) reason14:20
CSWookie joined14:21
stats4647 joined14:21
jensen Oh yea, I basically follow the approach here: https://www.atlassian.com/git/tutorials/dotfiles. On my desktop machines, I have ~/.dotfiles.git. I was setting up for my server that's hosting the repo to copy the same setup. I guess cloning $HOME/repos/dotfiles.git to ~/.dotfiles.git isn't necessary and I can just use the actual repo since it's just a bare repo14:23
Vonter left14:24
jensen One thing I'm still not sure about is how to manage my server dotfiles. Following the approach linked to manage my desktop machines is straightforward because most config files are shared by them and the contents are mostly the same. For the server, I want it to track only a few files already tracked from my desktop machines14:25
Vonter joined14:25
imMute jensen: I have my dotfiles repo cloned to ~/.dots/ on every machine. then I have folders in there that are per-machine (some symlinked to others where I want to share everything between hosts) and a script to setup symlinks in ~ pointing into that ~/.dots/ tree.14:26
jensen So I'm thinking of creating a branch for the server from master, do an initially cleaning up of removing all irrelevant files (git rm) and then only cherrypick commits from master here and tehere14:26
imMute jensen: I think using branches for different machines is overkill. since to share things (like the script that sets up my command prompt) I'd have to merge, but only merge certain files - some files shouldn't ever be merged. using plain folders is easier (for me) to keep track of14:27
pulse left14:28
phoenixh joined14:28
jensen imMute I haven't branches to be a big deal yet, maybe in the future. I have 95% of the same tracked in master and maybe the content itself is like 10% different between each other14:33
imMute I first started using stow14:33
imMute Now I'm looking for a way to track config files in /etc. I heard of etckeeper but I'm skeptical of using tools like yadm/etckeeper which add another level of complexity14:34
Wuzzy joined14:35
jensen I'm thinking of using stow or symlinks having etc files in $HOME and then linking them to appropriate places14:35
But IIRC, there was a comment in one of the etc files that said "this file shouldn't be a symlink" or something along the lines of avoid using symlinks for that file14:36
AbleBacon joined14:36
vvvvv joined14:36
ChmEarl joined14:40
BSaboia left14:41
Rhvs joined14:42
Xenguy joined14:42
phoenixh left14:44
cmbengue joined14:44
mackerman jensen: Read etckeeper's metadata hooks to appreciate what git does not store14:44
sudoforge joined14:47
Assault joined14:47
BSaboia joined14:50
Assault left14:52
Anticom jensen: btw i'm currently using dotbot (https://github.com/anishathalye/dotbot). <offtopic>But eventually I'll change to puppet manifests and not only specify my dot files but all my desired software and config</offtopic>14:54
vladoski left14:54
vladoski joined14:54
computeiro joined14:55
wender left14:56
madewokherd left14:56
CSWookie left14:58
thiago joined14:58
wender joined14:59
jkordani joined14:59
cousteau Anticom: I'm reading that article you linked. I think it doesn't teach me anything new (I already knew how git worked internally, more or less) but it's an interesting way to "demystify" git14:59
Basically they grab the magic show that is a git repo, open it and show you the internals, while yelling "See? It's not magic! It's all smoke and mirrors in the inside!"15:00
And then they teach you how to build the mirrors and the smoke yourself15:01
computeiro left15:01
imMute you could say that about any non-trivial thing that you don't yet understand.15:01
Anticom cousteau: Kind of yea. It always helps me to at least roughly understand how things work under the hood to get a better understanding about the capabilities and limitations of a tool15:01
imMute: +115:02
pulse joined15:05
rtjure__ joined15:07
elkalamar joined15:09
computeiro joined15:09
stats4647 left15:10
roadie`` left15:10
stats4647 joined15:10
wender left15:11
wender joined15:14
hnOsmium0001 joined15:14
computeiro left15:16
Anticom left15:18
Assault joined15:19
rsx joined15:21
a6a45081-2b83 left15:22
sgn joined15:23
madewokherd joined15:29
computeiro joined15:35
jkordani left15:35
wender left15:36
Null_A joined15:36
wender joined15:39
cq-work joined15:41
computeiro left15:41
cq-work Alright, so I am rebasing a big commit. In this big commit, I want to edit it by removing some files from that commit. So I've run `git restore --staged <files>` on the files I don't want in the commit.15:41
However, `git rebase --continue` fails telling me I need to add the fixed conflicts. What do I do15:42
vladoski left15:42
cq-work Frankly, the top SO post for this tells me to `git rebase --skip` which I'm like 90% sure would kill my changes.15:42
Starting to get a bit scary.15:42
vladoski joined15:43
imMute cq-work: --skip is not what you want. you still need to stage the files before doing --continue though.15:43
Assault left15:44
cq-work So I have to stage them and remove them outside of a rebase? I can't remove files in a commit while editing the commit in a rebase?15:44
imMute you can.15:44
it's been a while, but I think when you mark the commit as "edit" in the rebase, it'll stop just after making that commit, so you can amend it however you please.15:45
elastic_dog joined15:45
imMute I typically use git-gui to do that since it makes it really easy to remove stuff from the previous commit but there's a CLI way to do it as well15:45
cq-work Yeah, maybe I should start using a GUI lol15:48
MrMattsmind joined15:48
fredi joined15:48
vladoski left15:48
MrMattsmind left15:49
fredi hi, I'm basically a layman using git but had to, as per my Advisor orders some time ago15:49
basically, I git pulled my data to a server, created about 750 problem instances, and run tests for a solver and my own solution, which means there's at least 750 x 3 = 2250 new files15:51
4h ago, I ran "git add ." it's still running.15:51
grantbow joined15:53
fredi did I cross some line...? the problem instances especially are quite large, despite my being oblivious to how that matters, and if.15:53
rfuentess__ left15:53
kenanmarasli joined15:54
vysn left15:55
osse fredi: when you git add a file then git will sha1 hash it and zlib compress it15:59
that's probably that's taking time15:59
jkordani joined15:59
imMute cq-work: I'm on the "use CLI for everything" side but git-gui for committing and amending (and most importantly *reviewing* what you're about to commit) is way more powerful IMO15:59
jezebel joined15:59
computeiro joined16:00
fredi osse I understand, as long as it does finish I'm OK16:00
jezebel is the git remote url format for ssh urls described anywhere?16:00
fredi I used a temp token to git pull to the server machien16:01
cousteau fredi: are you sure you want to add those files to git? Usually you'd only add the "source" files, not the files that are generated as a byproduct of those files16:01
rewrit3 left16:01
wender left16:01
osse yeah I'd Ctrl-C immediately16:02
fredi cousteau they're heavy but yes, perhaps I could have them somehow separated but surely not laid down in our research server16:02
cousteau (this is, unless you want to add the results to git as well so that other people don't have to generate the files again)16:02
meator joined16:02
fredi the results themselves are light, the instances are a GB or two16:03
cousteau Oh16:03
fredi ILP16:03
wender joined16:04
cousteau Are those instances generated from some source, or did you generate them one by one?16:04
fredi I made them in a plain format using my own generator, then a conversor to .ampl (which is pretty much translate to Mathprog), then with glpsol I made the .lp from the .ampl16:05
(so to run cplex)16:05
ApostleInTriumph left16:05
cousteau A GB or two each, or the 750 of them together?16:05
alzgh left16:06
fredi tbh, I only see the third smallest of 15 directories and it had 11GB16:06
christall left16:06
alzgh joined16:06
computeiro left16:06
fredi cousteau most surely, the 12 remaining are bigger16:07
as the parameters increase16:07
emf joined16:07
fredi but I could tell you right now, I'm just kinda scared of du-ing16:07
let me see16:08
cousteau Well, if you have a script that calls the conversion utility and glpsol, you could put only the plain files + converter + script that calls the converter and glpsol into your git repository16:08
And have other users call the script to generate the things16:08
fredi I did that. run a couple of days16:08
the results are there, in the server. I was about to upload them to github16:08
cousteau Which is more the point of git: to use it to control the stuff you're editing, not the stuff that has been generated16:08
Oh... Yeah if it takes a couple of days you probably want to avoid the users having to deal with that every time16:09
fredi it's a one time only measurement to take some numbers and put in a paper16:10
cousteau My advice would be to `git add` the files one by one, and see how long they take16:10
fredi yes, I see your point here16:10
cousteau ctrl+c won't corrupt anything btw?16:11
cousteau If 1 file takes 40 seconds to be added to git, then 750 files will take, um...16:11
About 8 hours16:11
fredi holy...?16:12
cousteau I'm not sure. osse: it won't, right?16:12
fredi while we were talking16:12
it finished16:12
cousteau fredi: but that was an example16:12
Lol16:12
jezebel can someone break this remote url for me? [email@hidden.address]16:12
fredi but now should I commit and push? I'll du16:12
cousteau I'm glad we could help by providing entertainment :)16:12
jezebel login@host:user/dir-in-their-home.git ?16:13
fredi 316G16:13
cousteau jezebel: I think it's login@host:whichever/path/the/git/server/uses16:14
fredi cousteau I should git push this?16:14
cousteau I'm not sure to be honest16:14
jazzy joined16:14
fredi oh-oh16:14
Narrat joined16:15
jezebel hmmm16:16
cousteau I would ask your advisor what exactly they expect you to do. If they want you to use git for tracking your own work and changes, then you would just upload that to a different platform, like an ftp server, and use git only to track your source code. I suppose that's what an advisor would want you to do, since that's the value of git16:16
merethan left16:17
fredi it won't commit because of my global settings as well... I swear it prompted for my user and pass. and I see your point about git too but still can't do much one-sided16:17
cousteau If they want you to use git as a mechanism to share files, well, I don't think that's what you typically use git for, but in that case sure, go ahead16:17
fredi cousteau he ordered to create a private repo and add him as collaborator16:18
cousteau If they just aren't sure how to share large files, I think this is the kind of thing where you want to use git-lsf16:18
fredi these files are something we didn't predict tbh16:19
the earlier tests weren't enough16:19
jazzy left16:19
cousteau I'd just ask him16:19
fredi anyway, I'll have to do something. git is running, supposedly committing, but I'll be back 4h later. cousteau and ditto16:19
fredi left16:20
cousteau "hey, the tests I generated are several hundred GB large, do I just push that to git? No, right? What do you recommend?"16:20
stats4647 left16:23
stats4647 joined16:24
osse I suspect that ctrl-c'ing and resuming would cost a bit but not much16:27
git would have to hash the files again, but then figure out they're already written. I guess zlib'ing takes longer than hashing16:28
stats4647 left16:29
jim87 left16:31
speckz left16:32
woink joined16:35
Assault joined16:36
vlado left16:38
jstein joined16:38
christall joined16:41
t3nj1n_ left16:42
alzgh left16:42
alzgh joined16:43
jazzy joined16:48
junktext joined16:51
christall left16:53
christall joined16:53
stats4647 joined16:55
fredi joined16:56
EvilDMP joined17:00
stats4647 left17:02
cmbengue left17:05
jezebel left17:13
hbautista__ joined17:15
rsx left17:19
Guest7843 left17:20
pyeveryt_ joined17:21
fredi cousteau professor gave permission to let the big files out. if you could enlighten me on this matter, there is a "git remove" command of sorts, right? I assume I'll need it once the add finished processing with them included17:23
[SyntaxError] joined17:24
fredi that's obviously not a way to learn or use git. I hope I'll grasp it properly in the future (git as a versioning tool)17:24
TomyWork left17:24
junktext left17:25
pyeveryt_ left17:25
junktext joined17:26
tirnanog joined17:28
EvilDMP left17:30
EvilDMP joined17:31
EvilDMP left17:35
madewokherd left17:38
darkbit joined17:38
cousteau fredi: if you haven't committed yet, `git reset` will forget about the files you have added but not committed17:38
aniruddha left17:39
cousteau (only forget about them, but not actually delete them from your working dir)17:41
fredi it's running the commit as we speak, unfortunately. however, that thing about my global config being not properly set17:41
no, I think there's no way out (except risking corruption through inconsistency caused by Ctrl+C)17:43
cousteau And if you have committed, `git reset HEAD~` will undo the commit17:43
Wuzzy left17:43
fredi now, that's great. thank you, cousteau17:43
cousteau So you can just wait for it to finish and then undo it17:43
fredi plus, I'll configure global data17:43
in the mean time17:43
exactly17:43
meator left17:44
supernovah left17:44
fredi say, github can be quite troublesome for people sshing if this global config is not properly set...?17:45
cousteau You could even wait for it to finish, create a new branch or tag the current commit so that you can fetch that commit later, and then rewind to the previous commit. That'll leave your current branch as it was before the commit, but if at some point you change your mind and decide to add the files you don't have to commit again17:45
skapata joined17:46
skapata left17:46
skapata joined17:46
fredi I didn't buy their arguments for ending support for git tool auth17:46
cousteau (btw, I doubt GitHub would allow you to host those many GB for free...)17:46
fredi cousteau branches, mein Freund, are some concept I'll learn. properly. someday17:46
ditto17:46
cousteau Some googling suggests that as of 2020 the limit is 100MB per file and 10GB per repo17:47
fredi wasn't taught to versioning tools in college (git or CVS or what-so-ever)17:47
so... end up lost these times17:47
wolfdale joined17:48
fredi 100MB per file? I'll have to take some care then17:48
(the space upper limit was expected)17:49
cmbengue joined17:49
cousteau Branches are just pointers to commits, saying on top of which commit you'll add the next commit. They allow you to do things separately or in parallel, and then merge them together17:49
fredi thing is, I was reading Git Manual this morning. it is something worth learning, but nearly insane to jump (be thrown) amidst17:50
junktext_ joined17:50
fredi the HEAD tag supposedly points to the last commit, I kinda got it17:50
cousteau I never learned CVS and I don't miss it17:50
tang^ https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github17:51
fredi neither did I but there's one project I'm somewhat interested (FreeBSD) and guess what?17:51
supernovah joined17:51
fredi lucky me they moved to SVN17:51
junktext left17:51
cousteau Branches in CVS are an entirely different concept. Branches in Git are a more elegant way to tackle the problem of parallel development17:52
fredi I heard CVS is totally outdated17:52
cousteau I don't know what's the difference between CVS and SVN but they have the same problem of being centralized17:52
fredi and I should stick with SVN and Git17:52
cousteau And painful branching and merging17:53
mspe I really like that Git branches are only pointers and therefore do not really exist17:53
cousteau In my opinion you should just stick with git, and only use SVN for projects already using it17:53
fredi it's unlikely for me to work outside the very exception of FreeBSD, but git seems like Haskell17:54
tang^ Freebsd only recently switched from CVS to Git... it's not _that_ outdated.17:54
fredi cousteau too good to be left unlearned17:54
nightstrike joined17:55
nightstrike left17:55
cousteau tang^: projects taking a long time to migrate out of it doesn't mean it's not outdated17:55
pyeveryt_ joined17:55
ackyshake joined17:55
cousteau Projects are migrating out of it BECAUSE it's outdated. Even despite of how hard it is to migrate from one SCM to another.17:56
fredi as FreeBSD itself could show, I do have unusual tastes. but now, tang^ you sure they're on git?17:56
cousteau The period from "yo, we should totally migrate out of this, it's painfully outdated" to actually migrating can be several years long17:57
pyevery__ joined17:57
fredi I'm out-of-scene for a year or so but handbook still mentions svn (and devs handbook, CVS)17:57
tang^ fredi: I'm fairly certain... I've been following them for the past year17:57
fredi that's better17:57
Henry151_Henry15118:00
przemoc joined18:00
pyeveryt_ left18:00
supernovah left18:01
supernovah joined18:03
cq-work left18:05
wootehfoot joined18:05
ThorMojito left18:07
ThorMojito joined18:09
Ugrastil joined18:09
longshanks joined18:14
cousteaughosteau18:16
R2robot joined18:16
longshanks hi. does mergedown, mergeup have any meaning as I couldn't find any reference to it in any git man pages yet I've heard people using the term at work.18:17
sandipan left18:17
longshanks So am guessing it's not a git term per-se.18:18
j`ey_ joined18:18
ghosteau Never heard of it. Context?18:19
j416 haven't heard.18:20
BH23 left18:21
longshanks ghosteau: i think when merging according to git-flow paradigm. i don't really use git flow as plain old topics suit me just fine.18:21
alvesadrian left18:21
alvesadrian_ joined18:22
longshanks i guess it can only really make sense if there's some context to teh merge direction.. a hierarchy? but yeah, dunno. thought I'd ask here :)18:22
jess joined18:22
ghosteau Did you read this in a tutorial or something?18:24
longshanks ghosteau: nope just overheard someone at work. I'll ask them Monday.18:25
j`ey_ left18:25
longshanks Did google it and found a couple references , but mainly nada.18:25
alvesadrian joined18:25
madewokherd joined18:25
ghosteau Oh18:25
wootehfoot longshanks, ask him whether he's heard of mergesideways, because it's way better18:26
longshanks what about orthogonal ?18:26
wootehfoot yes18:26
alvesadrian_ left18:27
ghosteau https://community.adobe.com/t5/photoshop-ecosystem-discussions/what-is-the-difference-between-merge-down-merge-visible-and-flatten-image/m-p/4626571 this mentions the term but seems unrelated to git18:28
SuperLag left18:30
joakimk joined18:30
longshanks What about https://www.reddit.com/r/git/comments/hshfzq/could_someone_explain_the_concepts_of_downmerge/18:30
i wonder if it's a term used by people from non-git systems. couldn't find anything anyting in the man pages or the git pro book. oh well.18:31
ghosteau https://www.atlassian.com/continuous-delivery/principles/workflows-with-feature-branching-and-gitflow they seem to use the terms here18:32
longshanks ghosteau: ah thanks. i'll go read it18:32
ghosteau No idea what they mean by it though. They don't seem to clarify it18:32
longshanks ghosteau: well glad I'm not the only one :)18:34
forgotmynick joined18:36
af left18:37
af joined18:37
ghosteau https://softwareengineering.stackexchange.com/questions/222696/should-i-merge-from-the-same-branch-or-from-a-merge seems to suggest merge up/down has to do with merging into master / from master. No idea which is which.18:38
junktext_ left18:38
junktext joined18:39
ghosteau Following a tree analogy, I would guess merging down merges "towards the trunk", and merging up mergers "towards a branch". The terminology probably comes from another SCM, as you suggested18:39
longshanks ghosteau: i think it's always better to be explicit about which branch or branches you're merging into which. I do think of merge *into* and rebase *onto* as it helps with the visualisation but up and down. yikes!18:39
maybe see-saw scm.18:40
ghosteau The thing is that in git there's no trunk and branches, it's all separate branches, so it doesn't make as much sense18:40
But there's often a main/master/stable branch that just sits there waiting for PRs, and multiple development branches that implement the experimental features18:42
ikke In practice you do have canonical primary / long-lived branches18:42
mat001 left18:44
mat001 joined18:44
ghosteau https://www.plasticscm.com/book/ This PlasticSCM book uses the terms "merge up" and "merge down" extensively18:46
longshanks what is plasticSCM ?18:47
t3nj1n joined18:48
ghosteau Apparently it was the other way around. When you create a new branch for some fix, you draw it below the master or "parent" branch. So merging down is merging from master to the development branch, or "syncing with master", and merging up is merging the devel branch back into master18:48
ikke "Plastic SCM is a full version control stack designed for branching and merging. It offers speed, visualization, and flexibility."18:48
ghosteau PlasticSCM is probably another SCM18:48
Like git or mercurial or SVN18:49
I recall having heard of it before18:49
mat001 left18:49
ghosteau Commercial, not sure if distributed, the Wikipedia page looks like an advertisement18:51
joakimk31 joined18:52
joakimk left18:54
Torr joined18:55
Torr Hey18:55
Is it possible to merge a branch ammending its commit?18:55
longshanks left18:55
another| git merge --edit18:56
ikke That's just the commit message, and it's the default18:57
another| is it? I rarely merge by hand18:57
ikke Yes, after a rant from Linus triggered by people running git pull randomly18:58
ghosteau I think you can instruct git merge to not create a commit yet18:59
ikke --no-commit :-)18:59
durham joined18:59
ghosteau With --no-commit perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing.18:59
computeiro joined18:59
ghosteau Yep, that was it19:00
longshanks joined19:00
tomek_Eustachy_Kapusta19:00
Torr ikke: But that'd still create a new commit.19:00
I want to ammend.19:00
fredi left19:00
Torr amend*19:01
ghosteau git commit --amend19:01
ikke Torr: what exactly do you want to amend?19:01
wender left19:01
xsx joined19:01
ghosteau You probably don't want to do fancy stuff when merging though19:01
loki_val joined19:02
ghosteau Just combine this with that, and maybe choose this version or that version, and maybe in some extreme cases do some fixing (although you probably want to do that BEFORE merging)19:02
Torr ikke: The merge changes.19:02
ikke Torr: step 1: run git merge --no-commit19:03
step 2: change what you want19:03
step 3: run git commit to finnish the merge19:03
xsx i want to list all tags that change the major version. so lets say i have tags: v1.0.0, v1.1.0, v2.2.2 the output would be v1.0.0 and v2.2.2, any ideas?19:03
ghosteau Step 2.5: git add the changes you made19:03
Torr -____19:03
pyevery__ left19:04
wender joined19:04
ikke xsx: that's something outside of gits scope19:04
m0viefreak joined19:04
ghosteau xsx: sounds like a task for some text-processing tool19:04
lechner left19:04
xsx yeah, that's what i thought, but was hoping there is a hidden way in git to get ot ;)19:05
ikke Create a script that iterates over each tag, keeps track of the current major version, and print the tag if the major version changes, and store the new major version19:05
ghosteau git tag v[0-9]* | sort | uniq with some parameters so that it only reads up to the first .19:05
git doesn't care much about version numbers. I mean each project uses a different version numbering scheme19:06
computeiro left19:06
ghosteau Oh but if these are version tags they're probably annotated tags, so maybe print only those19:06
longshanks left19:07
ghosteau Actually I'm not sure `git tag v[0-9]*` works19:09
xsx they are not annotated :( yeah,i will go with awk, sort and other stuff19:10
ghosteau: you ommited -l arg19:10
ghosteau Yeah I did.19:12
Not sure if it's needed if you use a pattern though?19:12
Or maybe that only works without arguments19:12
Torr left19:14
ZacSharp joined19:16
Murr left19:17
Murr joined19:18
kenanmarasli left19:19
ghosteau git tag --list 'v[0-9]*' | sort -n | uniq -w3 will work as long as the major version has no more than 2 digits (and is followed by a . if it has only 1 digit)19:19
Because if the tag is "v1.2.3" it'll only compare the first 3 chars, i.e. "v1."19:20
Assault left19:20
ghosteau And if it's "v10.0.1" it'll compare the "v10"19:20
This is a rather poor solution, but it may work for you if all you want is a quick comparison. For a more advanced one you'll want a proper scripting language.19:21
git tag --list 'v[0-9]*' will print all tags that begin with "v" followed by a digit19:22
(you can go one step further and do things like 'v[0-9]*.*.*' or whatever)19:23
xsx ghosteau: what is the -w for uniq? i don't have this option19:23
ghosteau sort -n will sort numerically (10 goes between 9 and 11)19:24
And uniq -w3 will only check the first 3 chars19:24
xsx: what platform are you in?19:25
Samian joined19:26
durham left19:26
durham joined19:27
lechner joined19:28
vdamewood joined19:28
CSWookie joined19:30
gh34 left19:35
stats4647 joined19:40
dgw joined19:43
stats4647 left19:44
darkbit left19:45
Samian left19:47
stats4647 joined19:49
stats4647 left19:49
stats4647 joined19:50
TheGuestMovie joined19:51
pyeverything joined19:52
computeiro joined19:55
_xor left19:55
_xor joined19:55
TheGuestMovie Just tried to push a local commit (containing file changes + updating the commit used in a submodule) and I got "ref integration:: Error in git rev-list --stdin --objects --not --remotes=origin --: exit status 128 fatal: bad object 99b92e2...". "git show 99b92e2" just repeats that it's a bad object. I fixed it by just undoing the local commit and19:56
committing again, but what can cause this?19:56
Wuzzy joined19:56
wender left19:56
SpeakerToMeat left19:56
TheGuestMovie could it be memory issues? Or is this relatively common? first time i run into it myself19:57
stats4647 left19:57
wender joined19:59
computeiro left20:01
CSWookie left20:02
cmbengue left20:03
kanzure_kanzure20:03
zumba_addict joined20:04
computeiro joined20:04
ghosteau left20:04
wender left20:06
wender joined20:09
shored joined20:11
computeiro left20:11
SpeakerToMeat joined20:15
Samian joined20:17
phoenixh joined20:18
nivag joined20:20
joakimk31 left20:21
pyeverything left20:29
Null_A left20:29
drogas left20:30
jstein left20:30
Vonter left20:34
Null_A joined20:35
pyever___ joined20:41
phoenixh left20:42
jast TheGuestMovie: it's definitely corruption. whether it's RAM or disk, hard to tell. you could look at the object on disk (.git/objects/99/b92e2...), see if it looks like it contains actual data or got truncated with 0 bytes (the latter typically happens if the system crashes or loses power before the object has been fully committed to disk)20:43
forgotmynick left20:45
jensen left20:50
mw__ joined20:52
BinarySavior joined20:55
emf left20:55
pyever___ left21:02
emf joined21:02
tar_xvf joined21:06
tar_xvf left21:08
tar_xvf joined21:09
Xavier7 joined21:11
ackyshake left21:13
_xor left21:14
Lord_of_Life_ joined21:14
Lord_of_Life_Lord_of_Life21:16
_xor joined21:17
vysn joined21:18
ss4 joined21:18
tar_xvf left21:20
wootehfoot left21:22
causasui joined21:22
tar_xvf joined21:25
Null_A left21:27
Null_A joined21:27
tar_xvf left21:28
tar_xvf joined21:30
EvilDMP joined21:31
m0viefreak left21:32
tar_xvf left21:32
ZacSharp left21:34
miquella[m] joined21:36
shailangsa_ left21:36
tar_xvf joined21:37
fredi joined21:37
kawics11 joined21:39
gordonfish- joined21:39
tar_xvf left21:40
EvilDMP left21:41
fredi I'm almost done but couldn't push21:42
it says as follows: https://dpaste.org/oFzA21:42
gordonfish-gordonfish21:42
fredi any help is welcome. at this moment, local repository has plenty of data left out, but, as far as i understand, in the tree. shall I remove them?21:43
I'm afraid git pulling as it says cause some disarray21:43
as for global configs, all done21:44
tar_xvf joined21:44
Null_A left21:46
[SyntaxError] left21:51
cmbengue joined21:52
xsx left21:53
otisolsen70 left21:55
Narrat left21:55
junktext left21:58
shailangsa joined21:58
Xavier7 left21:59
stats4647 joined22:06
christall left22:07
fredi ok, now all solved. thanks to the people who helped earlier.22:08
fredi left22:08
jkordani left22:08
christall joined22:10
Strom- left22:10
stats4647 left22:10
Strom joined22:11
zumba_addict left22:12
jwillikers left22:13
SuperLag joined22:13
christall left22:14
hqdruxn08__ joined22:22
hqdruxn08_ left22:26
rtjure__ left22:31
ttree joined22:35
odoood joined22:37
christall joined22:41
ozoned joined22:42
Gustavo6046 left22:43
natrys left22:43
Gustavo6046 joined22:43
odoood left22:45
kawics11 left22:48
ferdna joined22:51
jimklimov1 left22:52
chexum joined22:53
odoood joined22:56
ozoned left22:57
emf left22:58
ozoned joined22:58
odoood left23:01
Raguile joined23:01
odoood__ joined23:03
pizdets joined23:03
christall left23:03
pizdets_ left23:03
ozoned left23:06
ozoned joined23:08
odoood__ left23:11
af left23:14
tlaxkit joined23:19
odoood__ joined23:23
ozoned left23:24
gordonfish left23:32
christall joined23:33
gordonfish joined23:33
christall left23:37
af joined23:38
nyah left23:40
odoood__ left23:40
Yruama left23:44
xx left23:51
eschwartz joined23:53
vdamewood left23:55
Wuzzy left23:57
ttree left23:58

Logs Search ←Prev date Next date→ Channels Documentation