IRCloggy #git 2021-10-14

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-14

jazzy left00:04
m0viefreak left00:06
subopt left00:08
ZacSharp left00:09
pyeverything joined00:09
tdaeayusr^ left00:09
emf left00:10
travaldo joined00:11
Thanatermesis left00:13
chenqisu1 joined00:14
pyeverything left00:14
chenqisu1chenqisu1200:14
jazzy joined00:18
onizu left00:23
chexum_ left00:25
chexum joined00:26
pulse left00:27
brianward left00:30
JibStyle left00:33
emf joined00:34
ttree joined00:34
Swahili left00:35
Swahili joined00:36
gco_ joined00:41
causasui left00:44
causasui joined00:44
causasui left00:45
causasui joined00:50
causasui left00:51
causasui joined00:52
causasui left00:53
causasui joined00:53
thiago left00:55
regf left01:01
raffaele__ joined01:03
brettgilio left01:05
Murr left01:08
Murr joined01:08
brettgilio joined01:09
igemnace left01:10
computeiro left01:11
o1lo01ol1o left01:11
thiago joined01:12
o1lo01ol1o joined01:12
vdamewood left01:17
durham left01:19
durham_ joined01:19
TJ- left01:25
TJ- joined01:27
vdamewood joined01:27
LuxuryMode joined01:29
causasui left01:30
Thanatermesis joined01:33
austin987 left01:34
austin987 joined01:38
pyeveryt_ joined01:48
YoungChiefBTW left01:49
YoungChiefBTW joined01:49
JibStyle joined01:51
pyeveryt_ left01:52
jinsun left01:59
makara_ left02:03
durham_ left02:04
thiago left02:04
makara left02:04
makara_ joined02:04
makara joined02:05
bn_work joined02:12
keypusher left02:14
jwillikers left02:15
arcatech left02:17
keypusher joined02:24
rgrinberg joined02:27
ttree left02:38
travaldo left02:39
JibStyle left02:44
causasui joined02:46
ahappydeath left02:49
pycurious left02:49
FinnElija left02:50
nyah left02:51
tchan left02:52
FinnElija joined02:52
ttree joined02:56
Jong joined03:02
prime-prime03:02
HashLordOfThePings03:05
Murr left03:07
Murr joined03:07
ChmEarl left03:08
PocketKiller left03:11
durham joined03:12
PocketKiller joined03:12
treefrob left03:14
majors_ joined03:15
llh left03:18
llh joined03:18
diverdude left03:19
diverdude joined03:21
kanzure joined03:21
gco_ left03:26
treefrob joined03:27
thiago joined03:27
michele_ joined03:28
michele left03:31
durham left03:31
diverdude left03:31
diverdude joined03:33
bket left03:43
jess joined03:45
bket joined03:48
juliopcrj left03:51
ferdna left03:52
tchan joined03:54
af left03:54
af joined03:57
ttree left04:01
zmt00 left04:04
zf joined04:05
zmt00 joined04:06
locrian9 joined04:07
zf hello folks. I have a large file a.txt, and in a single commit I move almost the entire contents of this file to b.txt, while creating a new a.txt in its place (boring code refactoring, basically). is there a way to make git generate a diff from /dev/null to a.txt, instead of from a.txt to a.txt? the diff should be a lot more readable that way04:09
yeirr joined04:10
yeirr left04:10
emf left04:11
zf -C works just fine for the copy, but I'm still left with hundreds of lines of deletion from a.txt to a.txt04:11
emf joined04:13
yeirr joined04:14
ttree joined04:18
cliluw left04:20
cliluw joined04:24
zebrag left04:28
jinsun joined04:29
ChemicalRascal joined04:31
Thanatermesis left04:42
LordOfThePingsEnchanterTim04:42
coot joined04:44
jimklimov1 joined04:46
jimklimov left04:48
af left04:55
vishal left04:57
vishal joined05:00
skered left05:05
madewokherd` joined05:07
yeirr left05:08
madewokherd left05:10
average left05:16
emf left05:20
jetchisel left05:22
rgrinberg left05:28
ttree left05:34
jimklimov joined05:34
Smashcat joined05:35
jimklimov1 left05:36
Smashcat Hi, I've got a problem with git - tried doing a pull just now and there's a conflict with a binary file. So I deleted the local binary file, but git still thinks it's there and refuses to pull again. Do I need to just clone the repo again to fix this?05:36
Assault joined05:41
Smashcat left05:42
ChemicalRascal It sounds like you're still in the middle-- Oh, they left.05:42
TomyWork joined05:44
gast0n left05:49
frobnic left05:51
gco_ joined05:53
pyeveryt_ joined05:58
af joined05:59
yeirr joined06:00
Lunatrius left06:02
hbautista left06:03
jazzy left06:08
bloody left06:09
af left06:12
af joined06:15
locrian9 left06:17
af left06:20
af joined06:25
euouae joined06:29
euouae Hello how can I rebase a branch I've merged a few times06:30
to delete a commit?06:30
I accidentally merged into a branch that was above main that I didn't want and then I committed a few times06:30
FH_thecat joined06:30
euouae so I want to remove one erroneous commit that slipped in there, even though I've undone all the work, I don't want it to be part of history06:30
Lunatrius joined06:32
mdk euouae: rebasing a branch with merge commits won't do. I don't know if there's an easy way for this one, it depend on the complexity of merge commits I imagine. Maybe try a git rebase -i and remove your commit AND merge commits? Never tried this...06:41
euouae mdk: I think maybe the easy way out is to create a new branch, apply all the commits on top and basically turn the history into a linear one?06:42
mdk euouae: that's what's a `git rebase -i` would do anyway, yes, those are equivalent, the `git rebase -i` way is more automated, the `manually create branch and cherry pick what you want` is the ... manual way06:43
FemmeAndroid left06:46
euouae great, thank you06:47
ttree joined06:47
mdk euouae: tell me how it went maybe, I'm interested06:48
palasso joined06:53
euouae still trying to get it right06:58
lol06:58
I've realized that I've pushed some bad changes into my repo06:58
but not upstream so06:58
ugh06:58
af left07:01
af joined07:02
gco_ left07:02
euouae mdk, I pulled it off, I simply cherry picked the commits I needed and then deleted the old branch and renamed the new as the old07:04
I don't know if that is the right way to do it but that worked fine07:04
I'll have to force push later but that's fine too07:04
unluckyshrubbery left07:04
mdk force pushing a personal branch is fine yes07:04
rfuentess joined07:05
mdk euouae: a good way to avoid those issues is to avoid merging in a personal branch, I just rebase them when absolutely needed, so you can always `git rebase -i` and play around without issues. Thanks for the feedback.07:06
ttree_ joined07:06
ttree left07:07
ttree_ left07:07
ttree joined07:07
Murr left07:07
Murr joined07:08
euouae Yeah I'm like a baby stumbling while learning to walk mdk07:08
but maybe in this particular instance it was also my mistake for committing something that's wrong07:09
diverdude left07:10
onizu joined07:11
vladoski joined07:13
causasui left07:16
diverdude joined07:16
Gustavo6046 left07:20
Gustavo6046 joined07:20
jinsun__ joined07:21
ChemicalRascal left07:24
dayday left07:24
jinsun left07:25
frobnic joined07:28
hnOsmium0001 left07:30
j416 keeping topic branches up-to-date by rebasing them frequently is usually a good idea07:30
AbleBacon left07:31
kenanmarasli joined07:32
dob1 when I have just one remote branch this become an upstream branch ?07:33
euouae upstream is just a word07:33
bookworm not only no07:33
--set-upstream-to07:34
euouae oh my bad -- I thought 'upstream' was not used as a term07:34
apologies07:34
j416 dob1: "upstream" usually means "remote tracking branch" or "remote repo" or "repo which I forked off of"07:34
branch@{upstream} (or branch@{u}) (remote tracking branch); --set-upstream-to (remote repo) as mentioned07:36
dob1 sorry for newbie questions, but I really don't understand the use of this feature. If I have 2 branches, main and dev, and I push them to a remote, why I need to set upstream? what will change?07:37
j416 dob1: it's the difference of having to specify "git push origin main" every time, or just being able to run "git push"07:37
dob1: .git/config contains config saying that your branch "main" has its upstream (remote tracking branch) set to for example origin/main07:38
dob1: if you have set up your prompt to show info like ahead/behind, this will also use the configured upstream07:38
sudoforg1 left07:39
j416 dob1: a branch does not have to have a corresponding remote branch; it can be only local if you want.07:39
dob1: just like a repo does not have to have a remote configured; it can be only local.07:40
ttree left07:40
momomo_ left07:46
dob1 ah in practice every branch that I want to keep in sync with has to be an upstream branch, am I right?07:46
*with remote07:46
without marking it as upstream every tiem I have to do git push origin branch07:46
momomo joined07:46
jetchisel joined07:54
dob1 ok it seems this, I am testing a bit from what j416 wrote07:54
o1lo01ol1o left07:55
jimklimov1 joined08:01
pyeveryt_ left08:02
dimi1947 joined08:02
pyeveryt_ joined08:02
jimklimov left08:03
Nspace joined08:06
pyeveryt_ left08:07
lgc left08:09
j416 not _be_, it has to _have_ one.08:10
pyeveryt_ joined08:10
lllh joined08:11
JibStyle joined08:11
j416 your local branch (main) is not the same as the remote tracking branch (origin/main) which in turn is not the same as the corresponding branch in the remote repo, but they are typically (and by default) set up to follow one another08:11
llh left08:12
Nspace left08:15
mikisid joined08:15
o1lo01ol1o joined08:18
JibStyle left08:24
spare joined08:24
JibStyle joined08:24
bkircher left08:25
tejr left08:28
spare left08:29
spare joined08:29
spare left08:29
tejr joined08:29
momomo left08:30
euouae left08:34
FH_thecat left08:37
bkircher joined08:37
skapata joined08:44
skapata left08:44
skapata joined08:44
madewokherd` left08:44
LuKaRo left08:49
dimi1947 left08:50
dimi1947 joined08:51
Timvde Does `git diff` act differently when in an "unmerged paths" state?08:51
emanuele6 left08:51
o1lo01ol1o left08:52
Timvde I was super confused by its output, then I did `git add -u && git reset` (which shouldn't change anything) and I got the expected output08:52
guardian joined08:52
o1lo01ol1o joined08:52
guardian Hello. I just upgraded to Git 2.33.windows.1 and now I get to see "info: detecting host provider for 'https://example.com'... messages when doing git fetch08:53
otisolsen70 joined08:53
guardian What's this message about? It prints like 3 times per repo08:53
raxor2k joined08:53
raxor2k i have several up and running API`s that do different AI/maachine learning work, and now i want to push all this to github08:54
LuKaRo joined08:54
raxor2k should i push all those as several repos inside a big folder or just push them by themselves?08:54
raxor2k left08:54
raxor2k joined08:54
o1lo01ol1o left08:54
o1lo01ol1o joined08:55
mgedmin Timvde: yeah, IIRC git diff tries to diff all three versions (base, ours, theirs) when a path is unmerged; and git add "resolves" merge conflicts09:02
Timvde mgedmin: Hmkay, I should look into how that works then, because it was confusing the hell out of me09:02
o1lo01ol1o left09:02
o1lo01ol1o joined09:03
Timvde I see now that there are indeed two columns with + and - in front09:03
mgedmin conflicts are confusing; after much flailing I settled on the diff3 format of conflict markers as the most readable one for me personally09:04
(git config --global merge.conflictStyle diff3)09:04
Timvde I'm okay with the in-file markers09:05
mat001 joined09:06
JibStyle Big +1 on diff3 output, makes it much easier to determine what's going on.09:06
cbreak you can use a merge tool gui thingie too09:08
guardian apparently the message is emitted by git-credential-manager-core: trace: run_command: git-credential-manager-core get09:11
JibStyle Timvde: In git diff output for a merge, keep in mind the merge commit is based on top of _two_ parent commits. That is why the git diff output has two columns of +- characters. One column indicates a difference between parent A and child, and the other column, parent B and child.09:11
emanuele6 joined09:11
emanuele6 left09:11
emanuele6 joined09:11
unluckyshrubbery joined09:14
Swahili left09:16
Swahili joined09:16
pyeveryt_ left09:21
tdaeayusr^ joined09:21
pyeveryt_ joined09:22
JibStyle left09:25
JibStyle joined09:25
pyeveryt_ left09:27
tuskkk____ joined09:29
mei6 joined09:34
mikisid left09:36
tdaeayusr^ left09:46
Tobbi_ joined09:46
The_Blode left09:46
otisolsen70_ joined09:49
The_Blode joined09:49
otisolsen70 left09:53
tirnanog joined09:54
Rashad joined09:55
Rashad Hello. What would you say is a thing in git that is right in the middle between being a complete beginner and an expert?09:56
If such a thing exists anyway...09:57
I am thinking rebasing maybe?09:57
ikke git bisect09:58
osse writing decent commit messages :p09:58
Rashad I understand commits, .git, push, pull, fetch, pull request, branching, remotes, amending commits, and perhaps more that I can't recall now, but I have a little bit of difficulty understanding stuff like rebasing, cherry picking and "fix up", whatever that is.09:58
otisolsen70 joined09:59
Rashad ikke: Haven't heard of it before09:59
https://git-scm.com/docs/git-bisect -- Interesting concept10:01
Can someone please explain to me what rebasing is and why is it different from reset?10:01
Like what is the motivation for such things to exist10:01
jinsun__jinsun10:01
bookworm did you read the corresponding sections in the git book?10:02
otisolsen70_ left10:02
bookworm what wasn't clear in there for you?10:02
it explains the why's10:02
Rashad bookworm A little while ago I did, yes, but I keep forgetting what I read because 1) I don't practice it, or 2) I don't understand why it exists, or rather why it exists as the way it does10:03
Vonter left10:03
bookworm then practice it :)10:03
Rashad In my beginner mind I am just looking for an "undo" button.10:03
bookworm mess up a commit, then clean up the history10:03
raxor2k left10:04
bookworm there's various level of undo10:04
dscho joined10:04
Rashad If I go to intellij and do an "interactive rebase", a lot of things show up and I click, click, click then it says the whole thing needs to abort.10:04
osse rebase = re-base = move the base of a series of commits10:04
bookworm you don't want to redo all the work, so reset isn't always applicable10:04
osse re-base: https://raw.githubusercontent.com/Osse/git-stuff/master/rebase.txt10:05
bookworm don't do it on intelliJ if you wanna learn, use git10:05
Rashad (At least it asks nicely if I want to abort, so I am not mad at it)10:05
osse: In that link what happens to E - F - G - H?10:06
osse nothing10:06
Rashad Oh right I see now... I thought they were removed from the diagram.10:06
OK so someone already merged another-feature into master and me in feature needs to stay uptodate... right?10:07
osse for example, yes.10:07
master has moved on since the feature branch was created.10:08
Rashad So usually I would rebase a feature branch but not the master branch?10:08
Does rebasing need two branches or can I rebase the same branch onto itself and would that be useful?10:09
Vonter joined10:09
Rashad bookworm: I think I understand what you mean now by "move the base of a series of commits"10:10
osse you can rebase onto anything. in the diagram you could rebase feature onto any of E-H, or even D itself (which lets you do some interesting things).10:10
bookworm not just moving the base, reordering / squashing some commits etc10:10
you use it to clean up the history as well10:10
Rashad Rebase onto D???10:10
Isn't that the same thing as before?10:11
osse yep10:11
Rashad So why would that be interesting?10:11
osse let me rephrase: Most of the time it would be a no-op. But the squashing and whatnot can be done here10:11
Rashad oh you mean change I - J - K - L along the way while you are rebasing?10:11
I see I see.10:11
Is fix-up imortant here? is it like amending a commit while rebasing?10:12
osse that's exactly what it is10:12
Rashad Nice.10:12
And cherry picking?10:12
dimi1947 left10:12
osse the squashing and reordering and rewording and all that stuff has been jammed into the rebase command because it fits nicely with how rebase works under the hood. But the problem with that is that the word re-base as sort of lost a bit of its meaning10:13
what about cherry-picking?10:13
Rashad What does it do?10:13
osse copies a commit10:13
Rashad And deletes the old one?10:14
osse no10:14
Rashad Oh ok I get it now.10:14
It copies it from master10:14
to feature10:14
No?10:14
tejr left10:14
osse that's up to you10:15
git cherry-pick abc1243 makes a new commit that does the same changes as abc124310:15
palasso left10:16
Wuzzy joined10:20
Rashad In the same diagram: https://raw.githubusercontent.com/Osse/git-stuff/master/rebase.txt what happens if I rebase H onto F?10:20
Does G get removed? Or does all that depends on what I do during the rebase?10:20
osse To do that you'd have to use the --onto flag, in which case G gets removed10:21
Rashad But typically one does that with reset?10:22
bookworm you can't do it with reset if you have more commits following H10:23
you'd loose them10:23
s17 tighten them10:23
bookworm reset resets the state to some other commit10:23
osse Rashad: no, you typically do that with rebase10:23
bookworm it doesn't put your changes somewhere else10:23
bn_work left10:32
Betal left10:32
rtjure joined10:32
Rashad Yay! just actually used rebase in a useful way in my project!10:33
Rebase puts my changes somewhere else?10:34
Can I undo a rebase?10:34
ikke reset the branch to the previous commit10:35
it pointed to before10:35
Rashad Makes sense.10:35
Do these "dangling" commits get deleted eventually after a certain period in time?10:36
ikke yes10:36
Rashad How much time exactly?10:36
ikke after ~90 days10:36
Rashad I see.10:36
ikke That's the reflog expiry time10:36
Rashad So reset is mostly for cases when you perhaps hit commit by mistake?10:37
ikke All kinds of situations10:37
Wuzzy left10:40
Wuzzy joined10:40
spare joined10:41
otisolsen70 left10:42
Rashad https://raw.githubusercontent.com/Osse/git-stuff/master/rebase.txt -- So I' - J' - K' - L' all have a ' because they are actually copies not the original commits....10:47
computeiro joined10:47
osse correct10:47
mikisid joined10:48
Rashad osse: And cherry-pick means that I can get to choose which ones exactly get copied?10:49
osse that's one way of putting it, I guess10:50
ikke Rashad: the main usecase for cherry-picking is to back / forward port changes10:50
osse cherry-pick puts the new commit(s) directly on the branch where you are now (as if you did all the work by hand and used git commit).10:51
Rashad Aha.10:51
osse but yeah if you squint you can sort of view a rebase as a serial cherry-pick10:51
Rashad Right now I think rebase is something you must learn if you're going to use git seriously, especially in a team, which is why I am learning this.10:52
o1lo01ol1o left10:52
Rashad If you are a project maintainer and you know how to rebase including using cherry-picking and whatnot, would that be "enough" or would you say there is something as crucial as rebase that needs to be addressed?10:53
I am assuming knowing how to rebase means you know what commits and branches and remotes are and how to push and pull and fetch.10:53
(And the details that come with such things like what is a master branch and what is a feature branch and what is a good way to arrange branches into development and production, etc)10:54
dayday joined10:54
Rashad I guess reflog is as important as rebase?10:54
ekathva joined10:55
Rashad I need to give a git course to my teammates so I am trying to understand how much more I have to learn for being able to use git with confidence to deliver new features. Bisect seems more about debugging so I am excluding it from the current course.10:55
JibStyle left10:55
ApostleInTriumph joined10:57
Rashad Hopefully I can get a chance to cover the more advanced stuff next year, after everyone would know at least the basics.10:58
Rashad brb10:58
rewrit3 joined11:00
pycurious joined11:00
Murr left11:07
Murr joined11:07
osse I dunno. I'm not a teacher.11:09
If I were you I'd watch a lot of videos and talks and see what they emphasize11:09
ApostleInTriumph left11:10
furrymcgee git stash maybe useful for rebase11:10
osse And use that for inspiration. Try to use your best judgment about what will be relevant for your team11:10
chexum_ joined11:10
chexum left11:10
Lunatrius left11:13
pyeverything joined11:14
furrymcgee please mention tig text user interface and a suitable difftool like vim11:15
difftool is essential for succesful git usage11:18
pulse joined11:20
pyeverything left11:23
mikisid left11:29
yeirr left11:29
Rashad Thanks osse, furrymcgee, ikke, bookworm11:40
bookworm stash is not something I particularly like, for quick one offs sure but anything longer should be in a commit11:42
Rashad What's the difference between stash and shelve?11:43
I already use shelve without completely understanding it but it is still useful.11:43
Lunatrius joined11:45
Rashad https://stackoverflow.com/questions/28008139/git-stash-vs-shelve-in-intellij-idea11:45
jetchisel left11:55
Gustavo6046 left11:56
osse i've no clue what shelve is11:59
Gustavo6046 joined11:59
osse ah, it's an IDE thing12:01
jwillikers joined12:03
LuKaRo left12:03
jetchisel joined12:07
Tobbi_ left12:07
Tobbi_ joined12:07
igemnace joined12:08
tuskkk____ left12:09
coot left12:11
alkino left12:13
alkino joined12:13
rond_ joined12:14
LuKaRo joined12:19
node1 joined12:20
node1_ joined12:20
dscho left12:20
node1_ left12:23
rahl left12:32
rahl joined12:34
R2robot left12:35
R2robot joined12:35
yeirr joined12:36
woink joined12:38
R2robot_ joined12:42
R2robot left12:43
speckz joined12:45
kawics11 joined12:47
hoochmonger joined12:48
coot joined12:49
ekathva left12:52
EnchanterTimLordOfThePings13:01
chenqisu12 left13:01
humky joined13:03
pyeverything joined13:05
Xenguy left13:06
kawics11 left13:07
ThorMojito left13:07
pyeverything left13:10
rond_ using git submodules vs CMake's FetchContent for third party libraries - which one is preferred and why?13:11
bncn joined13:13
The_Blode left13:14
pycurious how do i tell git to commit all *.py files but not anything else (regardless of path)?13:16
canton7 pycurious, git add '**/*.py' ? Or leave the **/*.py unquoted to let your shell expand that instead of git13:17
pycurious canton7: Thanks! Let me try that13:18
rond_ pycurious https://stackoverflow.com/questions/26682744/is-there-a-way-to-just-commit-one-file-type-extension-from-a-folder13:18
speckz left13:18
pycurious Thanks!13:19
astroid99 joined13:19
LordOfThePingsHash13:22
roadie joined13:23
node1 left13:33
speckz joined13:34
rond_ left13:36
rewrit3 left13:39
rewrit3 joined13:39
rewrit3 left13:45
rewrit3 joined13:45
rgrinberg joined13:45
Misotauros left13:49
nvmd left13:55
nvmd joined13:56
pyeveryt_ joined14:01
Assault left14:03
rgrinberg left14:08
ishutin joined14:09
nyah joined14:10
AbleBacon joined14:11
R2robot_ left14:14
ravan joined14:14
ChmEarl joined14:14
R2robot_ joined14:16
hnOsmium0001 joined14:18
Misotauros joined14:24
pulse left14:36
eschwartz joined14:44
Vonter left14:44
pulse joined14:45
bloody joined14:54
gast0n joined15:00
astroid99 left15:00
bn_work joined15:01
thiago left15:02
rgrinberg joined15:02
thiago joined15:03
pyeveryt_ left15:04
wyre left15:06
vdamewood left15:06
wyre joined15:06
durham joined15:09
madewokherd joined15:21
zebrag joined15:22
rsx joined15:24
Vonter joined15:25
Assault joined15:26
justsomeguy joined15:34
Guest276 joined15:36
Guest276 hi folks15:36
Vonter left15:37
Guest276 should i merge master into featue_branche to bring it up to date ? would this be considered bad practice ?15:38
thanks15:38
Vonter joined15:38
rond_ joined15:39
ikke Guest276: it depends on the project. merging master into a feature branch is simpler, but also leads to more complicated (harder to follow) history15:39
The alternative is to rebase your feature branch onto the latest version of master15:40
ThorMojito joined15:41
Guest276 ikke: thanks for the reply, with your suggestion, we will keep both branches on same head ?15:41
ikke what do you mean with keeping both branches on the same head?15:43
Guest276 master and feature_branche will be on same commit15:45
ikke no15:45
if you rebase feature_branche onto master, it will be ahead of master15:45
subopt joined15:46
subopt_subopt15:46
Guest276 so you know how to do this ?15:47
rfuentess left15:48
ikke yes15:48
git checkout feature_branch; git rebase master15:48
LuxuryMode left15:49
rsx left15:50
pulse left15:56
R2robot_ left15:59
Guest276 ikke: many thanks16:00
rond_ left16:01
Guest276 left16:03
justsomeguy left16:05
kenanmarasli left16:06
hackinghorn joined16:06
ormaaj left16:08
Vipulk left16:08
psydroid left16:08
morguldir left16:08
ServerStatsDisco left16:08
kuhilas left16:08
cpackham[m] left16:08
YoungChiefBTW left16:08
meain left16:08
t_unix[m] left16:08
kadoban left16:08
Helmholtz left16:08
Celmor[m] left16:08
securethemews left16:08
saltrocklamp[m] left16:08
elemongw[m] left16:08
ronny left16:08
Fernando-Basso left16:08
zfnmxt left16:08
kedde[m] left16:08
heftig[m] left16:08
jmcantrell left16:08
reddishblue[m] left16:08
unclechu left16:08
pinage404 left16:08
miquella[m] left16:08
jinsun_ left16:08
erochow[hehim][m left16:08
woss[m] left16:08
Industrial[m] left16:08
hsiktas[m] left16:08
igemnace left16:09
Vonter left16:10
pinage404 joined16:12
justsomeguy joined16:17
psydroid joined16:20
Fernando-Basso joined16:20
cpackham[m] joined16:20
Industrial[m] joined16:20
morguldir joined16:20
kadoban joined16:20
Vipulk joined16:20
ServerStatsDisco joined16:20
elemongw[m] joined16:20
t_unix[m] joined16:20
hsiktas[m] joined16:20
reddishblue[m] joined16:20
kedde[m] joined16:20
unclechu joined16:20
kuhilas joined16:20
YoungChiefBTW joined16:20
zfnmxt joined16:20
securethemews joined16:20
heftig[m] joined16:20
Helmholtz joined16:20
jmcantrell joined16:20
ronny joined16:20
jinsun_ joined16:20
Celmor[m] joined16:20
miquella[m] joined16:20
saltrocklamp[m] joined16:20
meain joined16:20
ormaaj joined16:20
woss[m] joined16:20
erochow[hehim][m joined16:20
_suboptsubopt16:21
Trieste joined16:22
ThorMojito left16:23
The_Blode joined16:25
hbautista joined16:26
dka left16:27
dka joined16:28
Trieste left16:28
Trieste joined16:30
Trieste_ joined16:36
Trieste left16:37
Assault left16:39
justsomeguy left16:41
Trieste joined16:42
jwillikers left16:42
Trieste_ left16:42
pulse joined16:42
jazzy joined16:43
jwillikers joined16:45
Null_A joined16:50
Null_A_ joined16:52
Vonter joined16:55
Null_A left16:55
jwillikers left16:57
kenanmarasli joined17:05
TomyWork left17:06
Murr left17:07
Murr joined17:07
zebrag left17:11
Rashad left17:13
Vonter left17:13
Rashad joined17:13
madewokherd` joined17:16
vladoski left17:16
ekathva joined17:17
rafasc joined17:17
hbautista left17:18
madewokherd left17:19
mei6 left17:19
DoofusCanadensis joined17:20
R2robot joined17:21
lgc joined17:22
jmd joined17:24
Vonter joined17:24
emf joined17:27
ThorMojito joined17:27
emf left17:28
Portugol9 left17:28
Null_A_ left17:30
Null_A joined17:30
Null_A left17:32
bkircher left17:32
Null_A joined17:32
pyeverything joined17:32
TomyLobo joined17:34
ghost43 left17:35
ghost43 joined17:35
emf joined17:39
pyeverything left17:41
yeirr left17:44
Null_A left17:45
bkircher joined17:45
emf left17:45
emf_ joined17:45
hornhack joined17:47
hackinghorn left17:50
Null_A joined17:53
SirRippovMaple3 left17:53
SirRippovMaple3 joined17:53
dayday left17:54
spare left17:54
Celelibi What's the right way to see the remote a branch is configured to follow?17:58
Currently I just check .git/config17:59
rafasc git branch -vv shows it.18:00
there's also a format spec for using with for-each-ref %(upstream)18:01
speckz left18:03
hbautista joined18:04
cek joined18:05
bkircher left18:07
bkircher joined18:20
batrick joined18:22
YoungChiefBTW left18:24
YoungChiefBTW joined18:24
MickOfRivia joined18:26
Narrat joined18:27
Nspace joined18:34
ThorMojito left18:35
ajfriesen joined18:42
nedbat if a directory has a .gitignore in it with "*" (to ignore the whole directory), can a .gitignore in the directory above override that with "!subdir" or something?18:45
Assault joined18:46
nedbat I'm thinking about a tool that writes reports into a directory, and adds the * as a convenience, but what if the unusual user wants to commit those files, is there something they can do to override the tool-written .gitignore?18:46
Jong left18:46
MickOfRivia left18:50
ThorMojito joined18:52
ThorMojito left18:52
tirnanog left18:53
pycurious left18:54
Nspace left18:55
rafasc I don't think it can.18:58
but in that case they can override the nested .gitignore no?18:58
Nspace joined18:59
rafasc or do the one-time git add -f18:59
FinnElija left19:02
nedbat rafasc: "override the nested .gitignore": you mean edit or delete it?19:02
Nspace left19:03
rafasc whatever it works for them?19:03
nedbat rafasc: sure, but then running the tool again would recreate the file (potentially). that's why i was hoping something in the directory above could override it.19:04
ThorMojito joined19:04
Byteflux left19:04
rafasc they can write exlusions inside that nested file. But is painful if you have depth.19:05
FinnElija joined19:05
nedbat rafasc: well, if they want the directory, they'll want the whole directory (it's an HTML report with multiple pages)19:06
(and it's flat)19:06
rafasc then they can just leave the nested .gitignore empty?19:08
and your tool just checks for the existence of the .gitignore.19:08
ThorMojito left19:09
nedbat rafasc: true, it can only write the file if none exists19:09
coot left19:10
ThorMojito joined19:11
ThorMojito left19:11
ThorMojito joined19:12
rafasc I'm not really a fan of tooling adding git ignores, but I don't know your usecase, it could be justifiable.19:12
jmd How can I strip a repository?19:13
rafasc jmd: what does strip mean in this context?19:13
jmd I have a non-bare repo and I want it to be a bare one.19:13
cbreak git clone --bare or git clone --mirror19:14
depending on your goals19:14
or git init --bare, and push to it19:14
jmd I'll check those options. Thanks19:14
cbreak you can manually change it I think, that'd involve removing the index, changing the bare setting to true, and likely some other things19:15
Vonter left19:15
nedbat rafasc: why don't you like tools adding .gitignore to their own directories?19:15
jmd .gitignore files are the biggest misfeature of git. They should never be used.19:16
pycurious joined19:16
bremner bold19:16
nedbat jmd: what do you suggest instead? and what's wrong with them?19:16
rafasc nedbat: mainly the lack of a counterpart that allows you to ignore tracked changes.19:17
jmd I suggest that files are not ignored. And the thing wrong with them is that they cause files to be ignored by tools such as git-status19:17
snedd joined19:19
nedbat jmd: so you would commit your .o, .pyc, .cache/*, etc files to git?19:19
rafasc that's basically its entire point. If you want status to show ignored fiels, use --ignored.19:19
jmd Either a file should exist, or it shouldn't. If it should exist then one should add it using git add. If it shouldn't exist then I want to know about it when it appears.19:19
hbautista left19:19
bremner OK, well you're welcome to things your way, but I don't think the rest of the world will follow19:19
ZacSharp joined19:20
jmd Well if the rest of the world wants to commit (either advertently or inadvertently) their build artifacts, that is their choice.19:20
rafasc so you track your compiled artifacts?19:20
nedbat jmd: the world doesn't want to commit their build artifacts. they prevent it with .gitignore.19:21
jmd: it sounds like you want to commit them.19:21
jmd No. I don't. That is why I want to see them. I DONT want them to be ignored.19:21
nedbat jmd: so you always completely clean them before committing?19:22
rafasc or work in projects that do not generate intermediate files.19:22
jmd ???19:22
Why would I do that?19:22
nedbat jmd: tell us how you avoid committing the build artifacts19:22
jmd nedbat: I never add them19:22
nedbat jmd: but you have to constantly see them in your git status then?19:22
rafasc how do I deal with git status becoming unusable because there's literally thousands of lines of untracked files?19:23
that idea may work with small projects, but doesn't work at scale.19:23
ZacSharp isn't there a per repo (or per worktree?) location to add ignored files without the ignore file itself being in the repo?19:24
emf_ left19:24
jmd nedbat: No. Normally they should not be shown. But if due to some mistake they do appear, then I WANT git status to list them. Then I know something has gone wrong and can do something about it. Otherwise there is a big risk of them getting committed by mistake.19:24
rafasc if you're trying to say that .gitignore files should not be committed, to prevent people forcing rules, I would partially understand. But ignore is a needed feature.19:24
ZacSharp: yes .git/info/exclude19:24
nedbat jmd: what keeps the build artifacts from being shown?19:25
jmd I have never found a valid use for them. and I have seen them cause a lot of trouble.19:25
nedbat: They are not shown because they are not (or at least should not be) in the source tree.19:25
rafasc jmd: you don't use git clean?19:26
jmd sometimes I do.19:26
molt joined19:26
rafasc for me, the main problem is that most people do not realize that .gitignore is not just for ignoring files. It's to ignore disposable files.19:27
that's where most of the pain about ignores come from.19:27
nedbat rafasc: what's the distinction you're making there? How are people using it wrong?19:27
rafasc nedbat: gitignore was introduced to deal with intermediate files from compilation. Files that are generally considered trashable.19:28
jmd But that is a problem with the build system.19:28
nedbat rafasc: what have you seen of people using it for other things?19:28
Byteflux joined19:29
tdaeayusr^^ joined19:29
jmd If a compiler dumps crap in the source tree, that compile is buggy. Adding the .gitignore feature means that the compiler bug is just hidden.19:29
rafasc nedbat: ignoring configuration files, for example.19:29
nedbat rafasc: ah, right. "I need my own dev config"19:30
rafasc nedbat: see !config19:30
gitinfo nedbat: [!configfiles] It is recommended to store local configuration data in a file which is not tracked by git, but certain deployment scenarios(such as Heroku) may require otherwise. See https://gist.github.com/1423106 for some ideas19:30
nedbat jmd: you understand that your "buggy build system" category includes 99.999% of builds, yes?19:30
coot joined19:30
rafasc I am really curious about jmd's language of choice.19:31
nedbat jmd: what tech stack do you work in?19:31
jmd "tech stack" ?19:31
ZacSharp I would even consider it bad if the build system does anything outside the repo19:31
nedbat jmd: what programming language do you work with?19:31
snedd left19:32
jmd *Shrug* depends on the application. c, lisp, occasionally c++19:32
nedbat ZacSharp: i suspect jmd does not equate the git repo with the project tree.19:32
rafasc nedbat: https://public-inbox.org/git/xmqqy4z5go1y.fsf@gitster.dls.corp.google.com/19:34
Vonter joined19:34
rafasc there was a thread a while ago about introducing a "precious" concept, but it's a contrived problem full of edge-cases.19:36
In the end, it sums it up to: If you don't like it, don't use it.19:36
Assault left19:36
rafasc I hate that commit has the -m flag. And it also causes problems by promoting bad commit messages.19:37
ekathva left19:37
rafasc but that doesn't mean we should remove -m.19:38
jmd Yeah I don't. It's just annoying that whenever I start a new repo I have to write a server side hook to stop people pushing .gitignore files.19:38
rafasc yeah, but now you broke the rule. Because you're kind forcing other people to play by your rules.19:39
jmd Collaboration in a project requires that the team members adhere to basic rules.19:39
rafasc :D19:39
yes, but that doesn't mean it should be *your* rules.19:40
unless it's your project.19:40
jmd it is.19:40
emf joined19:49
Vonter left19:50
bkircher left19:52
tnecniv joined20:01
Null_A left20:01
Rashad left20:02
tuskkk____ joined20:03
tnecniv hello. i'm trying to resolve an issue where i committed a file that is way too large and i need to remove it without removing the commit history. basically i committed an Jupyter notebook that had some fancy images in it that made it over 100MB. This was a number of commits ago and I'm just noticing now. As the notebook is part of the codebase, I20:03
dont want to mess with the commit history, but I can't currently push the project to my repository. I've already made the pertinent file appropriately svelte in the most recent commit.20:03
Null_A joined20:04
tnecniv but my git abilities are quite basic so i'm not sure what to do20:04
fercell left20:05
rafasc you can git rm --cached <big file>; git commit.20:05
tnecniv most of the options i found seem like they purge things quite aggressively20:05
that won't delete the actual file, will it20:05
just the cache?20:05
rafasc basically that will create a new commit without that file in the repo.20:05
no, if you use --cached, it will not remove the file from your local machine.20:05
tnecniv because the notebook is important i dont want to delete it from the disk20:06
rafasc if you use git rm <file>; it deletes from your local disk and from the git repo.20:06
--cached will not delete if from disk.20:06
tnecniv and presumably this deletes the old version that's huge from whatever blob its in20:07
rafasc this part is a bit of a joke: even if it did, since you committed the file, you would be able to recover most of the changes :D20:07
tnecniv haha true20:07
rafasc that doesn't delete anything on the server. That 100mb file will be there forever.20:07
alkino left20:08
tnecniv no the 100MB file is only local because github is rejecting my pushes since the payload is too big20:08
rafasc ah...20:08
tnecniv since i've been committing and pushing via PyCharm, i didnt notice until now20:09
the error message is quite small20:09
rafasc then you probably want to edit your local commits, rewrite the local history, then push.20:09
tnecniv how does one do that20:09
rafasc the rm --cached will not solve your problem because the blob is there on the history.20:09
tnecniv right20:10
rafasc there are multiple ways. a rebase is one of the easiest if your history is simple.20:10
but rebase is a bit of a more advanced operation.20:11
can you post the output of !lol20:11
gitinfo A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all20:11
rafasc !paste20:11
gitinfo Please use a pastebin for snippets longer than one line. Persistent and can be used with a GitHub account: https://gist.github.com/ - one hour auto-delete: https://upaste.de/20:11
jmd left20:13
af left20:13
rafasc git rebase -i "commit that added big file"~1 ; mark first comit as 'edit', save and quit, do the git rm --cached; git rebase --continue;20:13
that's the gist of it ^; I have to leave for now, but I'm sure someone else will be able to assit you. Good Luck20:14
Vonter joined20:15
clime joined20:15
shabius left20:17
af joined20:20
tnecniv rafasc thanks. i actually also have to run but i'm saving this info i'll probably return tomorrow20:23
pyeveryt_ joined20:27
Nspace joined20:28
coot left20:30
pyeveryt_ left20:32
af left20:33
rafasc left20:33
af joined20:33
linguist joined20:34
bongobrown joined20:52
af left20:52
dviola joined20:55
alzgh left20:56
rgrinberg left20:57
af joined20:58
roadie left21:04
Cleverness joined21:07
jjakob I updated a submodule with new commits but the main project doesn't show any changes?21:07
Guest62 joined21:08
ThorMojito left21:12
jjakob ah I had to set the right branch with submodule set-branch21:14
wilz left21:15
kenanmarasli left21:15
jjakob no that was not it21:16
rgrinberg joined21:18
sudoforg1 joined21:18
ZacSharp left21:19
wilz joined21:19
ZacSharp joined21:19
Null_A left21:21
Lord_of_Life_ joined21:25
Lord_of_Life left21:26
Lord_of_Life_Lord_of_Life21:26
jjakob hmm seems like going to the superproject of this superproject now shows the change there21:26
Null_A joined21:27
Portugol9 joined21:28
roadie joined21:30
bongobrown left21:30
Cleverness left21:31
yourfate left21:31
yourfate joined21:31
chexum_ left21:33
chexum joined21:33
af left21:33
af joined21:34
astroid99 joined21:35
cryptone1torcryptonector21:36
Null_A left21:37
awmv joined21:41
astroid99 left21:44
Narrat left21:47
JibStyle joined21:47
Guest62 left21:49
Cleverness joined21:52
af left22:03
af joined22:05
Thanatermesis joined22:06
rewrit3 left22:08
zebrag joined22:08
Aurora_v_kosmose joined22:15
ahappydeath joined22:15
Aurora_v_kosmose There's this idea of federated git that pops up from time to time that always seems to miss the point. Git is already federated. The question though, is whether something exists for indexing/discovery purposes that doesn't rely on some large company?22:15
tnecniv left22:16
wilz left22:30
causasui joined22:30
mat001 left22:31
wilz joined22:33
clime left22:34
ahappydeath left22:34
ahappydeath joined22:38
shush How can I recover a popped stash's message?22:41
gast0n left22:43
ahappydeath left22:44
Nspace left22:48
ZacSharp uh, I'm not sure but I think the list of stashes itself is the reflog so there is no reflog you could use to recover a stash and the only option left is searching through all unreachable commits (unless you checked out the stash or did other things making it show up in some other reflog)22:51
Null_A joined22:52
ZacSharp the manpage for git stash suggests git fsck --unreachable | grep commit | cut -d\ -f3 | xargs git log --merges --no-walk --grep=WIP` but I don't know what that actually does22:53
Aurora_v_kosmose I checked and stashes don't leave anything in the reflog once popped.22:53
cek left22:53
ZacSharp "If you mistakenly drop or clear stash entries, they cannot be recovered through the normal safety mechanisms"22:54
yep22:54
Xenguy joined22:57
durham left22:58
igemnace joined23:00
pizdets_ joined23:03
pizdets left23:03
ferdna joined23:15
elkalamar_ joined23:22
elkalamar left23:25
gast0n joined23:45
nvmd what's the point of 'submodule absorbgitdirs'?23:46
it does what the name says, but why?23:47
what's the use case?23:48
af left23:56

Logs Search ←Prev date Next date→ Channels Documentation