IRCloggy #git 2021-09-02

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-09-02

igemnace joined00:01
arcatech left00:01
arcatech joined00:02
jstein left00:03
christall joined00:04
jwillikers left00:04
pretty_dumm_guy left00:15
christall left00:18
vysn left00:19
Tobbi_ left00:19
Brain joined00:20
Brain can someone please give me a command to forcibly, non-interactively, rebase ALL commits on master into one commit? I know this sounds harmful an destructive -- it is! i want to use it to periodically clean up automatic commits made to my github pages repository from an autobuild script.00:21
ive done some searching but most rebase examples seem to be interactive or know that you want to rebase the last 'n' commits00:21
rkta joined00:23
Xenguy joined00:29
arcatech left00:32
pyeveryt_ joined00:32
christall joined00:36
muscularduckling joined00:37
arcatech joined00:37
audiocat joined00:38
christall left00:40
XV8 left00:45
arcatech left00:45
cation joined00:46
XV8 joined00:47
hubble88 left00:47
CommunistWolf joined00:49
circuitbone https://github.com/stevenjack/cig00:50
please post any extra tools you find good value00:51
XV8 left00:51
reset left00:53
christall joined00:55
arcatech joined00:58
arcatech left00:58
arcatech joined01:02
muscularduckling left01:05
pyeveryt_ left01:05
pyeveryt_ joined01:05
pyeveryt_ left01:10
christall left01:13
nedbat Brain: you could create a branch from your first commit, then when you want to squash, "git reset THATBRANCH" then "git add"; "git commit"01:17
arktnld left01:20
travaldo left01:30
arcatech left01:31
mei left01:31
nyah left01:32
vysn joined01:41
muscularduckling joined01:47
Murr left01:49
Murr joined01:50
pyeveryt_ joined01:51
qpdb left01:52
qpdb joined01:53
ferdna joined02:02
magic_ninja joined02:05
vicfred joined02:07
arcatech joined02:09
gast0n joined02:10
dsrt^ left02:10
Stanley joined02:11
thiago left02:12
FinnElija left02:12
Stanley Hey all. Solo dev working on my own project. I made a bunch of commits and pushed them. Then I decided to revert, so I reverted back to the last commit before the currenet batch of changes. When I tried to git push it said that I was behind and had to git pull, but I didn't want to pull back the changes again, so I did a git push --force02:12
it went through fine but now my deployment system is asking who I am and telling me to run git config --global user.name "whatewver", did I break something>02:13
FinnElija joined02:14
Stanley if I log into the server and run git status it says02:17
Your branch and 'origin/master' have diverged, and have 1 and 1 different commits each, respectively.02:17
twb Stanley: if you don't care about the version on the server you can "git push --force".02:29
Stanley: this is usually considered Bad Practice, but for a solo dev it's less important02:30
"which repos/branches can I push -f to" is a big part of multi-dev workflow design02:30
Stanley: you can also do something like "git diff main origin/main" to check how they differ before you push02:31
thiago joined02:31
gabin joined02:32
psyc0ld joined02:33
Stanley thanks102:44
!02:44
arcatech left02:47
arcatech joined02:49
Xaldafax left02:50
euouae joined02:56
kyshoc joined02:57
kyshoc left02:57
kyshoc joined02:57
cdown_ joined02:58
cdown_cdown03:02
ChmEarl left03:03
jazzy left03:03
jazzy joined03:04
ttree joined03:05
arcatech left03:06
arcatech joined03:07
christall joined03:10
pulse joined03:22
ferdna left03:31
mw_ left03:33
christall left03:33
aidalgol joined03:33
mw_ joined03:37
keypusher left03:42
arcatech left03:43
eschwartz joined03:47
psyc0ld left03:49
zebrag left03:49
eschwartz is there a git plumbing command to list submodules by path? The only thing I can think of is parsing the output of git config --file .gitmodules -l03:52
(and once there I can pass submodule paths to git diff-index --quiet to see if they have changed in any way)03:53
arunkumar413 joined03:53
pyeveryt_ left03:56
eschwartz the general goal here is to write a program that uses git archive HEAD to export a dist tarball of a project, and then merge it with git archive foreach submodule too, warning the user along the way if there are uncommitted changes03:56
gnoo joined03:56
gabin left03:57
gnoo left03:58
gabin joined03:58
gabin left03:58
gnoo joined03:59
gabin joined04:02
stkrdknmibalz left04:02
gast0n left04:03
gast0n joined04:04
FH_thecat joined04:04
thiago there is one: git submodule04:05
as for that script, I have it somewhere04:06
twb git submodule | sort -k2 ?04:06
-k2, I suppose04:06
thiago remind me when I am in the office tomorrow (that is, in 12 hours) and I'll get it for you04:06
sorting is unnecessary04:06
twb thiago: they asked for "by path"; I misread that as "sorted"04:07
thiago they don't need the paths. They need to run git archive in each submodule. So... what they really need is git submodule foreach04:07
twb eschwartz: SO MANY people want git archive + git submodule :/04:07
thiago: yeah I agree, I hadn't read properly04:07
gabin left04:08
thiago unfortunately, GNU tar isn't a format that is concatenable via pipes04:08
twb Actually I was wondering about that04:08
gabin joined04:09
twb https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/tarfilter isn't quite that04:09
eschwartz I'm one of the maintainers of the mesonbuild.com build system, written in python. The current janky implementation uses "git clone the project into a temporary directory, then init and update all submodules, then delete all files/directories beginning with .git* and tar up the results"04:10
thiago my solution is to create a .tar file and then use tar -A (--concatenate) into it multiple times04:10
twb And https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/mmdebstrap#L548304:10
thiago so, no pipe streaming04:10
twb thiago: yeah that's what I resorted to but it's not scalable because it needs temporary disk space04:11
eschwartz this has several flaws, including not supporting submodules with relative paths e.g. ../otherproject.git which should clone from the original github remoteor some such, and not supporting gitattributes04:11
thiago twb: indeed04:11
I don't see a way out04:11
eschwartz I would like to replace that by git archive, but handling submodules is a complicated topic04:11
saroy joined04:12
thiago git archive --submodules should just DTRT04:12
but that isn't implemented04:12
twb So #L5610 you can see it generates a dev.tar stream by hand from raw bits, THEN runs "tar" program to append additional flies04:12
This might be relying on the consumer being GNU tar compatible04:12
{ tar c x; tar c y z; } | tar t # definitely doesn't work04:13
thiago --format=pax04:14
twb { tar --format=pax -c x; tar --format=pax -c y z; } | tar --format=pax -t04:14
...also doesn't DTRT04:14
thiago no, not concatenable04:15
just tried that too04:15
twb I thought maybe mmdebstrap was writing the opening header itself and then telling tar "don't write an opening header"04:15
eschwartz it is acceptable to untar them all into a staging directory and tar the final results back up04:15
twb Maybe it's not writing a footer and then relying on GNU to write the footer. It's doing a more limited case of a single catenation04:15
eschwartz: maybe for you, but I hate it :-)04:16
thiago cpio is also not concatenable. I've tried that too04:16
twb thiago: and git archive --format=zip is obviously not04:16
thiago zip is never a good idea04:16
eschwartz ... in fact, now that I think about it, for the specific use case of meson it will need to untar and re-tar anyway, because users can add custom post-process scripts that can modify the source tree before the final dist tarball is created04:17
thiago if you're producing content for windows, use 7z04:17
eschwartz git archive --subprojects would, of course, solve everyone's problems...04:17
twb As far as I'm concerned, the goal is to produce a source tarball without writing any intermediary streams to disk or to RAM04:18
thiago right04:18
I don't know of a solution to that04:18
twb Have to start with "git archive" because otherwise you need an intermediary "git checkout"04:18
eschwartz that's a good goal, anything else one would want could be added on after that anyway04:18
thiago like I said, the best I could come up with was tar --concatenate04:18
I can give you the script tomorrow04:18
twb Which means the streams begin life as either tar or zip04:18
eschwartz is `git submodule` a stable (plumbing-worthy) output format?04:19
thiago I think git get-tar-commit-id still works04:19
eschwartz: like I said above, you actually want git submodule foreach04:19
eschwartz seems like the general format is '{plus-if-modified}{current_commit} {path} ({decorated_name})'04:20
twb eschwartz: TIL04:20
AnAverageHuman left04:22
thiago git submodule foreach --recursive 'git archive --prefix=$sm_path $sha1 | tar --concatenaate output.tar -' or something like that04:22
eschwartz git submodule foreach git archive --prefix '$sm_path/' HEAD -o '$sm_path'.tar.gz if you don't want to rely on gnu tar, I suppose04:23
twb http://ix.io/3xHy04:23
thiago I always forget the / too04:24
I wonder why it's necessary04:24
it's not like I want my configure script name changed...04:24
christall joined04:25
eschwartz --prefix should probably really be --directory-prefix, indeed04:25
> $sha1 is the commit as recorded in the immediate superproject04:25
hmm, so this is the one committed, not the one manually checked out and marking the index as dirty?04:25
thiago yes04:26
once concatenated, xz -704:26
eschwartz that conveniently solves the problem of not using HEAD and having to warn on uncommitted changes...04:27
thiago -9 if you don't mind the extra time, but in my experience -7 is the sweet spot04:27
dmc joined04:28
christall left04:29
jazzy left04:31
twb thiago: something along these lines http://ix.io/3xHz04:33
eschwartz git submodule foreach only affects currently inited submodules, which, well, doesn't seem like something to feasibly work around. *logging a warning*, at least, is probably a good thing, but this gets back to "how to list submodules" and submodule status doesn't. I'm thinking git config --file .gitmodules might still be the only way to figure out a list of submodules for comparison to the ones that04:33
are actually inited04:33
twb python and golang have streamable tar; perl doesn't04:34
thiago submodule status lists uninited modules04:35
homura joined04:35
eschwartz ... right, I'm dumb. foreach won't operate on them, but status will sure list them04:36
twb Yeah that's also a huge open problem in my mockup04:36
if it's a bare repo how do you access the submodules at all04:36
Really my #1 preferred answer here is "don't use submodules"04:36
thiago you need to know how to access a local clone of the repository04:37
ikke You clone it, and on that clone, you can work with submodules04:37
thiago .gitmodules only contains URLs04:37
eschwartz unfortunately not in a truly parseable format, since you cannot just split on "{sha1} {path}" due to the end containing git describe bits04:37
subopt left04:37
eschwartz but only sometimes!04:37
thiago yeah, don't use spaces in paths04:37
eschwartz I personally would not, but people can be crazy and when you try to make a build system for general consumption, someone will probably do it...04:38
fortunately .gitmodules inherently refuses those clowns who skip spaces and jump straight to newline chars04:38
aniruddha joined04:39
thiago it could get a -0 option04:39
twb Note that you also need to know which commit each submodule is pointing at, which is in the main repo's tree04:40
hbautista_ left04:41
eschwartz the `submodule status` does list that04:41
twb ah k04:41
eschwartz $ git submodule04:42
fb2bd257f6089ed9890264bc4ef5ef96eaa2ef98 submod (heads/master)04:42
$ git submodule deinit submod && git submodule04:43
-fb2bd257f6089ed9890264bc4ef5ef96eaa2ef98 submod04:43
rnkn joined04:44
The_Blode_ left04:45
thiago I had noticed it before because all of mine are prefixed with +04:49
arunkumar413 left04:50
MrMagic joined04:50
twb This is the point where I go "can git just get a --format=json for literally every command please"04:50
ikke https://lore.kernel.org/git/CACPiFCLzsiUjx-vm-dcd=0E8HezMWkErPyS==OQ7OhaXqR6CUA@mail.gmail.com/04:52
skapata left04:53
The_Blode joined04:53
rnkn anyone know a good way I can keep a work tree on a separate device without a repo?04:55
ikke did you look at git worktree?04:56
rnkn I have a writing device that does not handle lots of files well (e.g. a git repo)04:56
MrMagic left04:56
ikke man git worktree04:56
gitinfo the git-worktree manpage is available at https://gitirc.eu/git-worktree.html04:56
rnkn ikke: as in git --work-tree=PATH ?04:56
MrMagic joined04:57
rnkn ah yes, I did, so I'd like that workflow, but with the caveat that sometimes the device worktree and the local worktree could contain conflicting changes04:58
thiago you want a checkout without a .git dir?04:58
that's a git archive04:58
rnkn I thought git archive was for creating tarball releases?04:58
thiago "device that does not handle lots of files well" does not sound like a sensible choice for a repository04:59
git archive | tar -x04:59
I am assuming you're not going to use git in the extracted sources04:59
if you are, I really, really advise you to reconsider your choice of devices and filesystems05:00
rnkn thiago: correct, I want to avoid having a repo on the device05:01
I want a work tree on the device, while keeping the repo on my local machine05:01
thiago then use git archive and immediately extract onto the device05:01
ikke does the local repo require a worktree?05:02
rnkn yeah that's not a good way05:02
thiago no, git archive works on bare repositories05:02
rnkn ikke: preferably05:02
ikke then git-worktree is your best option05:03
thiago I think it's not05:03
how are you accessing the device's storage from your work machine?05:03
rnkn ikke: okay cool05:03
I've been trying to build got (gameoftrees) on macOS as it's designed for separate work-tree and repo, but alas no luck05:05
uses a .got dir to track the work-tree's commit05:05
filePeter left05:08
eschwartz what does "keeping the repo on my local machine" mean?05:10
rnkn eschwartz: on my laptop05:10
eschwartz given the reference to gameoftrees supporting separate worktree and "repo", I'm assuming you actually do mean "worktree and --git-dir"05:11
so... what is wrong with man git-worktree05:11
gitinfo the git-worktree manpage is available at https://gitirc.eu/git-worktree.html05:11
eschwartz it does exactly what you say this gameoftrees thing does05:11
rnkn eschwartz: not quite, it handles conflicts between multipe worktrees05:11
eschwartz also for clarity, please feel free to start saying "git-dir" instead of "repo"05:12
mei joined05:13
eschwartz what does "conflicts between multiple worktrees" *mean*, and what does it have to do with your initial question which was "I have a writing device that does not handle lots of files well" and "anyone know a good way I can keep a work tree on a separate device"05:13
rnkn e.g. I check out a worktree on the dumb device, alter file foo.txt, then also happen to edit foo.txt on my laptop's worktree05:13
mei left05:13
eschwartz then the dumb device and the laptop's live worktree are on different branches, so there is no conflict whatsoever05:13
OR05:14
thiago git worktree can do that, so long as they have checked out different branches05:14
however, mind what I said about git not being forgiving of dumb filesystems05:14
eschwartz you could have a bare clone on your laptop, and a worktree on the dumb device05:14
thiago I advised you to rethink05:14
eschwartz only one worktree05:14
rnkn eschwartz: yeah I was wondering that, I like the idea of this separate bare repo workflow05:15
but say I have that, how best do I deal with the foo.txt scenario?05:16
or did you mean to not have a worktree on the laptop?05:17
homura left05:17
homura joined05:17
gast0n left05:17
mackerman One .git dir per device. Zero or one worktrees per device.05:18
As they are different repos, remote workflows apply. commit, push, fetch, merge.05:18
rnkn whoa wait, I have been confusing git-worktree with git --work-tree=PATH05:19
mei joined05:20
eschwartz incidentally, referring back to my earlier question about git archive + submodules05:20
my current WIP rewrite https://paste.xinu.at/HcbgJs/ :D05:21
twb rnkn: in what way does the device suck? Is it eMMC, or JFFS2, or what05:21
eschwartz so much less terrible already :D05:21
rnkn twb: seeing you outside of #emacs makes me uncomfortable05:22
twb puts pants on05:22
rnkn twb: it's this: https://www.kingjim.co.jp/pomera/dm30/05:23
it gets noticably slower with git repos on board05:23
twb OK so yeah almost certainly eMMC05:24
i.e. basically an SD card solderde onto the mainboard05:24
rnkn: can you control what filesystem it uses?05:25
rnkn likely, but also I think the OS is only built to handle small text files of limited number05:25
durham left05:25
rnkn nope, FAT3205:25
twb If so, try JFF- OK05:25
Yeah the problem there is simply that eMMC sucks and FAT32 doesn't work around that05:25
vysn left05:25
durham joined05:26
rnkn it's okay, I am pretty sure git-worktree is the panacea I want05:26
thank you ikke and sorry for not fully investigating git-worktree (i.e. not --work-tree=)05:29
twb rnkn: that is a pretty cool unit05:30
rnkn twb: it does seem to be a cafe conversation starter05:30
twb I remember homeless people asking about my 7" EeePC05:31
That was back bfeore smartphones existed05:31
thiago I'm rewatching Leverage right now (2008, 2009) and it's funny to see flip phones and phones with physical keyboards05:35
YuGiOhJCJ joined05:39
tristan__ joined05:45
rnkn left05:45
Murr left05:49
Murr joined05:49
Samian joined05:51
madewokherd` joined05:52
Samian Hello magnificent minds of #git. How can I search a repo to find the first commit to contain a specific string in a file?05:53
madewokherd left05:54
Samian like the first commit that has in file x.py the string. "torch.ops.fb.split_embedding_codegen"05:54
twb Samian: git log --reverse -1 -G'Underpants.*Gnomes'05:54
rnkn joined05:54
twb Samian: not exactly what you asked for, but close05:55
LACampbell joined05:55
Samian underpants?05:56
bookworm South Park?05:56
LACampbell I'm looking at a branch called "foo" on gitlab. gitlab tells me to do 'git checkout -b "foo" "origin/foo". git tells me "origin/foo" is not a commit05:56
twb bookworm: normally my example variables are fuck/duck/cluck/suck but since I'm not a regular here I was trying to be clean05:57
LACampbell I know git is just graph theory but we didn't cover "checkouts" at all in undergrad math05:58
gabin left06:00
bookworm you are in a clone from the gitlab repo?06:00
twb LACampbell: are you completely new to git?06:00
bookworm or in a newly initiated repo that isn't actually linked to the one in gitlab?06:01
LACampbell twb: been using it for 6 years or so. does it ever get any easier?06:01
bookworm yes06:01
twb LACampbell: OK, sorry, it sounded like a super noob question06:01
LACampbell I rm -rf'd the whole directory, cloned it again, and everything works06:02
twb LACampbell: ah OK never mind then06:02
LACampbell twb: yeah I suck at git hard. I don't know why. I just can't wrap my head around it06:02
twb LACampbell: I would have checked "git remote -v", and "git fetch --all"06:02
LACampbell: are you a haskell person?06:02
LACampbell: if so check out hstorage which is a straight port of git's content-oriented filesystem06:02
LACampbell I'm not bad at FP, haskell makes more sense than git06:03
twb LACampbell: that's how I first "got" git, coming from a background of RCS and darcs06:03
LACampbell I guess I don't understand 'checkout'06:03
it does so many different things06:03
bookworm https://imgs.xkcd.com/comics/git.png06:03
euouae left06:03
twb checkout does stuff to the working tree. checkout -b also tells "git branch" to do stuff.06:04
LACampbell is it normal to just delete your directory from time to time? is it kind of like old school windows where you need to defrag06:04
gabin joined06:04
bookworm you can use switch instead if that is any easier for you06:04
absolutely not06:04
envex joined06:04
twb LACampbell: no, defrag is callde "git gc"; it runs automatically as needed06:05
bookworm that means you have no idea how to use git... you never need a fresh clone, you have the history right there06:05
twb I only "delete and start over" when I've done something deeply broken.06:05
I did it more often when I was using rcs, darcs, git, hg, and monotone at the same time06:05
Now I use only git it's easier to keep it in my head06:05
eschwartz https://xkcd.com/1597/06:06
bookworm reflog, and if you've messed that up what on earth did you do?06:06
twb Oh the other time I would "delete and start over" is when I didn't have enough RAM to "git gc"06:06
bookworm eschwartz: to late ;P scroll up06:06
twb So e.g. linux.git on a 1GB RAM system06:06
bookworm too*06:06
eschwartz aw, man...06:06
LACampbell why would the same command tell me "origin/foo" is not a commit, then after I fresh clone, do something else? Is it a commit or isn't it? and i wanted a branch not a commit. why is it telling me about a commit with the -b flag?06:06
eschwartz I was only looking at comments *after* the question06:07
( you *could* delete it periodically, but then you're the noob from the comic who has no clue how git works )06:07
LACampbell: perhaps the remote is not called "origin"?06:08
LACampbell I used the exact same command, it had the exact same name both times06:08
bookworm LACampbell: you nuked it so now we'll never know. Alas checkout does many things so depending how you name stuff you might need to be more specific06:08
and tell git which of the two things that are applicable you actually mean06:09
eschwartz because you literally get that exact message when "origin/foo" is not a valid man gitrevisions06:09
gitinfo the gitrevisions manpage is available at https://gitirc.eu/gitrevisions.html06:09
LACampbell so what's the thing to do in that scenario then? "i have a super weird error". git status and go from there?06:09
if you never need to nuke it06:09
eschwartz if "origin/foo" is a valid remote_name/branch_name then it *resolves* to a commit, and git checkout works06:10
if not, then it doesn't06:10
"when doesn't it resolve" -> generally, when you accidentally have the remote named something else06:10
bookworm status first, then depending on what you are doing look at it. git remote -v / git branch -r stuff like that06:10
LACampbell so in got the concept of a branch is really just a single commit. there's no higher abstraction06:11
eschwartz if you git checkout -b "foo" <TAB> then tab completion should list all the valid possibilities and you can eyeball those for sanity06:11
bookworm ^06:11
a branch is not a commit, it points to one06:12
Samian if I search on google: "oss install" github06:12
eschwartz to be more accurate, a branch is not a commit, it's just a moving label pointing at a commit06:12
Samian a lot of stuff comes up06:12
what does OSS mean?06:12
eschwartz the commit it points to is "the most recent commit on that branch"06:12
bookworm open source software?06:12
LACampbell so when you commit to a branch, you are moving that branches label to the thing you just comitted06:12
eschwartz right06:12
bookworm strange way to google though06:12
LACampbell so that's why checkout is used for branches and commits. because git reduces them down to being the same thing06:13
ok, that kinda helps. I'll try tab completion next time06:13
bookworm and files06:13
LACampbell at least briefly, before I nuke it06:13
thiago well, kinda. They're also different enough that we now have git switch06:13
eschwartz any/all git revisions are either: 1) a commit, 2) a pointer to a commit, 3) an annotated tag blob06:13
Samian bookworm aaahhh! open source software!06:13
thanks!06:13
bookworm and other things :D again checkout is heavily overloaded06:13
Samian next q. What's the diff between HEAD and trunk?06:13
eschwartz and 3 doubles as pointing to a commit06:13
Samian are they synonyms?06:13
eschwartz HEAD is a special reference to the current branch06:14
bookworm Samian: there is no trunk in git vocabulary as such06:14
eschwartz trunk means nothing, though in some repos it might be a branch name06:14
thiago anyway, I good analogy for a branch is that it's a place where you stick post-it notes with the SHA-1 of the commit06:14
bookworm there's trunk based development, if that's what you mean06:14
thiago to commit is to write a new post-it note with the SHA-106:14
bookworm thiago: wrong order, the branch is the sticky note and you attach it to wherever06:15
thiago to checkout a new branch is to move the pen that is pointing to the currently checked out one06:15
eschwartz trunk is the traditional name for other VCS software, i.e. subversion, to name the default branch06:15
thiago no, the commit is the sticky note because of the reflog06:15
eschwartz (not that subversion can really be said to have true branches)06:15
thiago you can inspect the notes below it06:15
bookworm you do you06:15
eschwartz thiago: I got you with "you post sticky notes to the branch", I got lost when you suggested the commit is, itself, the sticky note06:17
thiago not the commit itself06:17
the branch is the note06:17
eschwartz > no, the commit is the sticky note06:17
thiago $ cat .git/refs/heads/main06:17
b72cc01f793fc9ba474b38780e116de6011f101606:17
the analogy is not very good, of course06:18
eschwartz the reflog contains old sticky notes which used to be the topmost sticky note on the branch, fair enough06:18
thiago if you're sticking notes on your whiteboard, the branch is the section and you probably wrote the name on top06:18
bookworm doesn't work for me06:18
thiago the notes are entries in the reflog, with the topmost being the current06:18
bookworm in my world commits and branches are an actual tree, there's no white board06:19
thiago there's no tree in git06:19
in git commits, I mean06:19
bookworm graph / tree 🤷‍♂️06:20
thiago thre is of course the tree object06:20
sure, but that's a different discussion06:20
yes, the commits form a DAG06:20
bookworm it's really not06:20
thiago but you don't need branches to do that. You could write the output of git commit-tree in post-it notes06:20
bookworm the nice thing with analogies is that they only need to make sense intuitively, how it actually works under the hood isn't that important as long as the behavior matches06:21
thiago right06:21
I find my analogy is helpful when trying to explain the reflog06:21
bookworm and what works for you doesn't necessarily work for anyone else06:21
thiago which wasn't the topic here, so it may be unnecessarily complex06:21
bookworm I never use sticky notes the way you are suggesting06:21
a reflog is just a list of things you've done, a list06:22
there's no sticky notes involved06:22
conceptually at least06:22
sh4 left06:22
bookworm it's easily explained as simple "history"06:22
everyone can understand that concept06:23
eschwartz the real problem here is that physical sticky notes would be way too slow to implement an actually performant VCS06:23
thiago the reflog file is actually a queue, not a stack like the post it note analogy06:23
entries are always added on top and are expired from the bottom06:23
eschwartz: well, but would it be faster than git push over Avian Carriers?06:24
I discovered today a colleague had never heard of April Fools RFCs...06:25
eschwartz birds can fly faster than people can find the right post-it note in a messy pile06:25
bookworm (or read my handwriting, future me included)06:25
eschwartz so it depends on how organized you are... :)06:25
bookworm: oh dear, the latency of correcting your handwriting when avian roundtripping is required to send corrections06:26
thiago in my experience, people who use post-it notes aren't very organised06:26
eschwartz thiago: that was my leading assumption, yeah06:26
thiago they use them to keep themselves somewhat organised, with varying levels of success06:26
thiago left06:33
Guest3026 joined06:36
Guest3026 left06:36
FFY00 left06:41
tristan__gtristan06:41
christall joined06:49
lesihctej joined06:50
jetchisel left06:50
theoceaniscool joined06:52
Hax0r joined06:53
christall left06:54
pyeverything joined06:56
rtur joined07:00
pyeverything left07:00
furrymcgee joined07:01
ttree left07:02
Gurkenglas joined07:02
unluckyshrubbery left07:05
srinidhi joined07:12
furrymcgee left07:13
furrymcgee joined07:13
vicfred left07:16
sudoforge left07:28
sudoforge joined07:32
roadie joined07:37
christall joined07:39
ishutin_ joined07:41
christall left07:48
LiENUS left07:50
AbleBacon left08:05
EvilDMP joined08:07
durham left08:09
feep[work] joined08:11
feep[work] hi, I have a weird situation.08:11
poebel joined08:11
feep[work] I have a repo that I'm trying to merge with another repo08:11
I've copied all the files from the other repo into the current repo, made a commit, *then* did a merge. this is the wrong order and I'm trying to rebase them into one commit08:11
is there any way to squash a merge while keeping it a merge? Ie. I'm trying to turn the previous commit into the "real merge"08:12
rnkn left08:15
ecraven left08:16
feep[work] nm got it using lots of copying files elsewhere and copying them back08:21
"easy merge"08:21
feep[work] left08:23
oxymoron93 joined08:31
EvilDMP left08:33
hnOsmium0001 left08:34
Spydar007 joined08:38
LuKaRo joined08:41
EvilDMP joined08:45
Samian left08:52
Dev0n joined08:53
Samian joined08:53
Samian left08:58
Betal left09:00
YuGiOhJCJ left09:01
YuGiOhJCJ joined09:01
xx joined09:02
cousteau joined09:04
keypusher joined09:05
cousteau There was a way to have multiple branches "active" at the same time, in different folders, right?09:06
gtristan left09:07
gtristan joined09:07
cousteau I'm thinking of possible ways to perform this whole "use git to track a remote software project that isn't git" idea09:08
("isn't git" used to be "is a thing called Perforce", but now I'm encountering a project that doesn't use any SCM)09:09
unluckyshrubbery joined09:09
cousteau My current situation is: there's a project that I needed to copy to a folder and modify a couple of files for it to work (mostly due to the use of absolute paths instead of relative). Now it was modified, and I don't want to go over again modifying all the files, so I thought that git might be able to help me as a merging tool09:12
xa_ joined09:13
FH_thecat left09:17
roadie left09:20
xa_ left09:21
daoudr joined09:27
momomo left09:28
momomo joined09:29
The_Blode left09:29
austin987 left09:29
YuGiOhJCJ left09:31
pretty_dumm_guy joined09:32
oxymoron93 left09:33
momomo left09:35
avar Is there no way to merge two branches and resolve & record a conflict with rerere that not only conflicts in file A, but requires an addition in file B only present in one of the two branches?09:37
YuGiOhJCJ joined09:37
momomo joined09:38
avar I don't think there is, have been trying to make it do it. I've got a merge where branch X has changed file A, but branch Y has moved the relevant function from file A to B. When I get a conflict I can just resolve/record the resolution to A, but changing the relevant thing in file B & doing "git merge --continue" with rerere.enabled=true & rerere.autoUpdate=true will just record the resolution to A, not B.09:39
Guest77 joined09:40
Guest77 left09:40
cousteau ...ah, "git worktree" is what I was looking for09:41
natrys joined09:42
austin987 joined09:43
christall joined09:45
oxymoron93 joined09:46
gtristan left09:48
AsenMx left09:57
dsrt^ joined10:00
vysn joined10:04
audiocat left10:05
Masklin_Gurder joined10:05
lgc joined10:06
bin101 left10:08
enoq joined10:08
lesihctej left10:10
bin101 joined10:10
lgc_ joined10:11
daoudr left10:12
lgc left10:12
christall left10:14
xa_ joined10:19
jetchisel joined10:23
reset joined10:27
pyeverything joined10:33
AsenMx joined10:37
pyeverything left10:38
Ecophobia joined10:42
Hax0r left10:43
Hax0r joined10:50
Hax0r left10:50
FFY00 joined10:52
spuz joined10:54
spuz I would like to push a local git repo to a remote server via SSH. The repository does not yet exist on the remote server. How can I do this?10:54
ikke spuz: git does not support pushing to no-existing repositories, it needs to be created first10:55
ssh <remote> 'git init repo.gi'10:55
spuz ok thanks10:55
rfuentess joined10:59
momomo left11:01
Lunatrius left11:06
cousteau Curious; will that implicitly create a bare repo (since a dir name ending in .git was specified)? or not unless you explicitly add --bare?11:07
ikke oh, no it won't11:08
forgot --bare11:08
cousteau (I would guess if you do this you probably want the remote repo to be bare)11:08
goldfish joined11:08
ikke you are right11:08
cousteau I remember there were some restrictions when pushing to non bare repos but I don't remember them11:08
spuz I actually don't want a bare repo but I think I figured out the right configuration. I just ran "git init my-project" which created "myproject/.git" then "cd my-project; git config receive.denyCurrentBranch ignore". Then from my local machine, "git push --all my-remote". Then finally on the remote server "git reset --hard master"11:11
AnapodoPsalidaki left11:12
Lunatrius joined11:16
cousteau It'd be easier with a bare repo, though. But if that works for you...11:17
pretty_dumm_guy left11:17
cousteau That'll only be useful if you want the the file tree to be available in the remote computer. Usually the remote computer just keeps a bare repo which other computers clone.11:18
xa_ left11:19
lasr[m] left11:21
nyah joined11:25
jwillikers joined11:26
xa_ joined11:27
keir joined11:27
Ecophobia left11:29
wdouglass left11:32
eschwartz ikke, spuz: some servers are running software that auto-creates the repo for you on demand, though11:33
spuz cousteau: the remote server needs a local file tree. It's not a build server but something like that11:38
xa_ left11:40
AsenMx left11:42
AsenMx joined11:42
jrofd joined11:44
Hax0r joined11:45
xa_ joined11:45
dimi1947 joined11:46
dimi1947 left11:46
AnapodoPsalidaki joined11:49
rewrit3 joined11:50
Hax0r left11:50
jrofd left11:58
cousteau I see11:59
Then an "elegant" (actually quite ugly) approach would be to have a bare repo on the server AND a clone of that repo also on the server, so that you push to the server and then pull to the clone. But that doesn't seem to provide any benefit over the solution you proposed (push to the server and then reset master)12:01
OK I'm gonna go crazy with this whole "track an external project so that it looks like it was made with git" idea12:03
roadie joined12:05
tristan__ joined12:06
goldfish left12:11
christall joined12:11
AsenMx left12:12
AsenMx joined12:13
skapata joined12:14
skapata left12:14
skapata joined12:14
AsenMx left12:14
AsenMx joined12:14
stpa joined12:15
otisolsen70 joined12:16
AsenMx left12:19
AsenMx joined12:19
The_Blode joined12:20
_Mocramis left12:21
jrofd joined12:21
ppang joined12:24
avar joined12:28
Bayes joined12:29
Bayes left12:29
Bayes joined12:29
EvilDMP left12:31
tchan left12:32
gh34 joined12:32
EvilDMP joined12:32
lgc_ left12:33
lgc joined12:34
AnAverageHuman joined12:34
christall left12:37
LordLion left12:41
LordLion joined12:41
EvilDMP left12:47
pretty_dumm_guy joined12:48
roadie left12:51
EvilDMP joined12:51
momomo joined12:53
christall joined12:53
hackinghorn joined12:55
jazzy2 joined12:56
hwrd joined13:00
Xenguy left13:01
stpa left13:02
stpa joined13:03
stefanct joined13:03
stpaspampel13:08
stefanct afaict git diff replaces tabs with spaces (unlike format-patch for example). i can see why this might be done but is there a way around this?13:09
spampel left13:11
onizu joined13:11
gjnoonan_ joined13:13
keir left13:14
CalimeroTeknik left13:15
CalimeroTeknik joined13:16
humanface joined13:17
keir joined13:18
CalimeroTeknik left13:20
CalimeroTeknik joined13:20
frobnic left13:20
frobnic joined13:22
jazzy2 left13:22
tchan joined13:24
shokohsc8 left13:25
shokohsc8 joined13:26
EvilDMP left13:27
computeiro joined13:31
keir left13:31
keir joined13:32
pretty_dumm_guy left13:39
hsiktas joined13:40
alfredb joined13:42
YuGiOhJCJ left13:47
roadie joined13:50
The_Blode left13:51
cousteau stefanct: you sure that's not your terminal emulator doing funny things?13:52
The_Blode joined13:52
keir left13:52
keir joined13:53
ikke must be, if you do git diff | base64, the tabs are preserved13:53
oxymoron93 left13:53
EvilDMP joined13:54
humanface left13:55
lgc left13:56
cousteau I was thinking git diff | hd, or git diff >patch.diff13:56
lgc joined13:56
cousteau OK I can confirm that git diff >git.diff uses TABS, and doesn't convert them to spaces13:57
roadie left13:57
ikke The patches would be corrupt otherwise13:58
cousteau BUT, if I copy-paste the output of git diff from the git bash (Windows) to a text editor, I do get spaces. But that's the terminal emulator, not git13:58
ikke correct13:58
cousteau Well, git does some magic with CRLF, maybe there's an option to do it with tabs as well and they accidentally toggled it on13:59
But yeah it shouldn't happen13:59
ppang left14:00
gnit joined14:02
humanface joined14:06
stefanct it's the pager apparently14:06
(less in my case)14:06
cousteau Oooh14:06
ikke aaaaah14:06
so git --no-pager diff should have tabs then14:07
or git diff | cat14:07
cousteau Hmmm nope, I tried `git diff | cat` and still got spaces when I copied from the terminal. Or it might be both.14:08
stefanct cat is fine too for me14:09
keir left14:09
keir joined14:10
cousteau So the terminal emulator I'm using ALSO replaces tabs with spaces, apparently14:10
keir left14:10
wender joined14:11
Torr joined14:11
keir joined14:11
cousteau printf 'a\tb\n' # also prints spaces14:11
ajfriesen0 joined14:12
ajfriesen left14:12
ajfriesen0ajfriesen14:12
cousteau But `printf 'a\tb\n' | wc -c` says 4 so it should be fine.14:12
Moral of the story: don't copy from the terminal.14:13
computeiro left14:13
hnOsmium0001 joined14:14
cousteau OK, I think I've figured out the proper way to "fake a proper use of git merge"14:15
Ideal situation: someone goes into the git repo I'm using, pushes their changes from the "official external repo" on top of master (which contains an older version of the external repo), then merges my devel branch into master, and copies the result to the external repo14:17
keir left14:17
keir joined14:17
cousteau Actual situation: someone goes into the git repo I'm using, copies a bunch of files I modified into the external repo, add some changes of their own, and then expect my git to continue making sense.14:19
mehwork trying to pull changes made on a remote branch with `git pull origin feature/ticket-431` but getting: `:fatal: Not possible to fast-forward, aborting`. Any idea why?14:20
cousteau Possible solution: if I want my git to look as if "ideal situation" happened, I need to (1) merge the commits they should have merged into master, and (2) replace my repo with the content of the external one.14:21
mehwork do i have to just add --no-ff14:21
stefanct my moral is quite different... git --no-pager diff ftw14:22
cousteau mehwork: maybe someone pushed to that branch and you need to merge manually14:24
mteo left14:24
mehwork cousteau: git pull --rebase ?14:25
First, rewinding head to replay your work on top of it..14:27
cousteau I'd do a fetch and a merge, just in case14:27
mehwork isn't that what git pull does14:27
gnit left14:28
cousteau That's what I thought, but I would have sworn that git fetch will freely move remote branches without complaining14:28
Apparently you get that error if someone rewinds the branch on the server14:29
Lunatrius left14:33
cousteau Hmm nope, I tried to do that with two local repos and it did the merge right away14:33
Lunatrius joined14:34
sh4rm4^bnc joined14:35
Tobbi_ joined14:35
sh4rm4^bncsh414:36
sh4 left14:37
sh4 joined14:37
cousteau mehwork: which git version do you have? Maybe this is something that happened in older versions14:38
(if someone has a better idea of what is happening feel free to suggest)14:39
homura gitgud.io14:40
subopt joined14:41
thiago joined14:41
homura left14:47
sh4 left14:50
sh4 joined14:50
sh4 left14:51
sh4 joined14:51
mteo joined14:51
poebel left14:53
Tobbi_1 joined14:54
Tobbi_ left14:55
Tobbi_1Tobbi_14:55
keir left14:59
Pent joined15:01
junktext joined15:02
WishBoy joined15:02
WishBoy left15:02
lantech19446 joined15:03
lantech19446 hey everyone, I just signed up for github and created my first repo and now I want to push all my working files to my repo, can I use git add . ?15:03
WishBoy joined15:04
WishBoy left15:04
stefanct left15:04
roadie joined15:06
tristan__ left15:08
cyberpear joined15:11
tchan left15:13
tchan joined15:13
AbleBacon joined15:14
Guest25 joined15:14
vysn left15:14
Guest25samuelrajan74715:17
mehwork cousteau: 2.24.315:17
ChmEarl joined15:18
hackinghorn left15:21
durham joined15:23
alfredb left15:26
neltraus_ joined15:31
jinsun left15:32
jinsun joined15:32
ajfriesen left15:34
push-f joined15:34
ajfriesen joined15:35
j416 lantech19446: that's a good start indeed.15:35
lantech19446: commit would be next, and then github will have instructions on how to add a remote and push your commit.15:35
lantech19446 I just got it done, I found an article online that walked me through it15:35
j416 nice.15:36
starfarer joined15:36
lantech19446 the hardest part was the damn PAT they're forcing you to use now15:36
j416 what's that15:36
lantech19446 personal access token15:36
j416 use ssh, make your life simpler™15:36
lantech19446 I'm ssh into my server but I don't even know how to connect to my repo via ssh15:36
j416 ssh to github.15:37
lantech19446 ok i'll have to look up info for it because i just cloned the repo to my computer so I can work in my IDE and then push it so it wouldn't be very hard to do now15:37
j416 you'll find instructions on github on how to set it up. tl;dr create a keypair if you don't have one already, give github your public key, then use the ssh URL foryour repo instead of https.15:38
lantech19446 I thought they said I had to do it over https now15:38
j416 if they did, they are lying15:38
lantech19446 ok15:38
j416 unless of course "they" is your company that has a firewall or such that blocks ssh.15:39
lantech19446 I have to say this is some really amazing technology I mean seconds to rebuild my entire site and it works15:39
pupskuchen joined15:39
lantech19446 j416: I'm the one who would be configuring the firewall anyway lol15:39
j416 :)15:39
lantech19446 I'm actually a sys admin learning html /css/js to help out with our website since the guy who was helping left15:40
j416 sounds like great fun15:40
lantech19446 I'm loving it I think I actually want to transition to webdev next15:40
j416 haha. good for you.15:40
lantech19446 would you like to see the site I've built?15:40
j416 nope15:40
(sorry)15:40
lantech19446 it's ok you aren't obligated too15:41
ajfriesen9 joined15:41
lantech19446 one more question though, once i update a file on my computer and push it to the repo how do I update the files on the server, I don't have to reclone every time i assume15:42
g2anj joined15:42
j416 !deploy15:43
gitinfo Git is not a deployment tool, but you can build one around it (in simple environments) or use it as an object store(for complex ones). Here are some options/ideas to get you started: http://gitolite.com/deploy.html15:43
ajfriesen left15:43
ajfriesen9ajfriesen15:43
lantech19446 there must be some functionality to keep the files in sync though so that when i start working from another location i'm working on the newest files15:44
j416 man git-push15:44
gitinfo the git-push manpage is available at https://gitirc.eu/git-push.html15:44
j416 man git-fetch15:44
gitinfo the git-fetch manpage is available at https://gitirc.eu/git-fetch.html15:44
humanface left15:45
j416 you would typically push to a bare repo (such as one on github or your own host). You can fetch from both bare and non-bare (ones that have work dirs) repos.15:45
a bare repo is just the .git directory.15:45
lantech19446 yea it looks like fetch is what I want I'm gonna test it in a moment15:47
j416 !book explains in more detail15:47
gitinfo There are several good books available about git; 'Pro Git' is probably the best: https://git-scm.com/book but also look at !bottomup !cs !gcs !designers !gitt !vcbe and !parable15:47
lantech19446 ok cool15:48
huh I just ran into something you probably know the answer too I added a directory to my repo on my computer and did git add test and then git status and it tells me there's nothing to commit, does it automatically take the directory with the files or something?15:49
imMute lantech19446: is test/ empty?15:50
lantech19446 yes15:50
imMute lantech19446: git tracks files not directories. so you can have empty directories stored in git. a common work around is putting a .gitkeep file in the folder.15:50
lantech19446 ok15:50
imMute note that ".gitkeep" is not special - any name will work - it's just a common name used for this purpose15:50
lantech19446 ok so that worked and I did a commit but it's not showing up in my repo so I'm assuming I have to do git push after commit?15:53
rfuentess left15:53
imMute yes, commit is local. you need to push to share it elsewhere15:53
lantech19446 ok cool, i'm going to remember this it's going to become very useful to me15:54
I wonder how it'll deal with our bigger site, the guy who built it used a ton of symlinks and it's always been a bitch to back up or transfer15:55
ok it seems like I actually wanted git pull it might be replacing all the files i'm not sure but it updates the repo which is all i really need15:59
cousteau mehwork: that should be new enough16:00
Samian joined16:09
roadie left16:11
roadie joined16:13
Samian left16:14
saroy left16:19
Dotz0cat left16:24
spuz left16:28
bdeferme1 joined16:31
rpkilby joined16:33
christall left16:33
christall joined16:34
guest8765 joined16:34
rpkilby left16:36
guest8765 came here to ask for public bug tracker to search for some issues.. found it in the topic desc! (:16:36
christall left16:36
christall joined16:38
christall left16:43
guest8765 left16:45
lantech19446 ok I successfully pushed my 2nd site to a new repo everything succeeded but when I tried to clone it to my desktop i get clone succeeded but checkout failed and when i run git status it has deleted every single file even though it only objected to 1 or 2 so I just downloaded the zip and i'm extracting it to my repo but will this get me around my issue?16:49
humanface joined16:56
roadie` joined16:57
wgrant joined16:58
cousteau lantech19446: shot in the dark: are you on Windows? Maybe the files have forbidden names16:58
mackerman lantech19446: Sure, "git archive" or similar extraction of one version of the tree is useful. Especially for deployment or release workflows.16:59
cousteau (Also, do you have enough space on your drive? You wouldn't believe how often that's caused trouble for me...)16:59
Does it mention WHY checkout failed?17:00
lantech19446 cousteau: I am on windows not a forbidden name it's chucky.jpg and chucky.png and I have 3Tib free17:00
roadie left17:00
christall joined17:00
lantech19446 it's trying to say invalid path for chucky.jpg17:00
enoq left17:00
cousteau OK, assuming neither of those files are more than 3 TiB in size...17:01
lantech19446 they're like Kib17:01
mackerman Did you not clone into a new directory? clone is for grabbing the first copy of a remote.17:01
lantech19446 I did17:01
cousteau once had trouble with files named "aux.whatever"17:01
lantech19446 yea i saw that when i was googling around for the error17:01
goldfish joined17:02
cousteau Apparently aux.c is not a valid file name on Windows.17:02
meator joined17:03
cousteau What's the path for this chucky.jpg? Is it on the root of the repo or on some subfolder?17:03
lantech19446 images\chucky.jpg17:04
Samian joined17:05
cousteau What git are you using? The one that comes with a "git bash" console? Or some fancy program with git built into it?17:05
lantech19446 great and now that i downloaded the repo it wants to add all of them instead of just the new file. I've gotta get this working17:05
I'm just using git on powershell17:06
I could try it on git bash i'm familiar with bash17:06
cousteau I recommend using git bash17:06
lantech19446 any chance of it getting me past this issue?17:06
cousteau Although I would expect it to work in powershell if git supports that17:07
lantech19446 it was one of their recommended ways17:07
goldfish left17:08
cousteau Honestly I have no idea, it's just that that's how I use it on Windows, and I've noticed that drifting away from bash tends to cause trouble17:08
jstein joined17:09
lantech19446 same error and git restore fails too17:09
cousteau Huh17:09
Betal joined17:10
EvilDMP left17:10
ninjin left17:10
ninjin joined17:11
cousteau Honestly I don't think I can help here17:11
lantech19446 error: invalid path 'images/chucky.jpg?_subject_uid=7888084&w=AAAfmveVu2oZofBbzRKou625rHOAD9ztRtM1Jyrs4Xh3Bw'17:11
fatal: unable to checkout working tree17:11
cousteau Oh17:11
Yeah that file isn't called "chucky.jpg" but "chucky.jpg?_subject_uid=blahblah"17:12
lantech19446 I wonder if it's even used on the site17:12
cousteau File names can't contain "?" on Windows17:12
That looks like someone downloaded an image from a site using some script and the downloaded file name includes the '?xxx=yyy&zzz=ttt' part of the URL17:14
You won't be able to have such a file in your PC17:14
lantech19446 they don't even seem to be legitimate files on the server i'm not sure what the hell they're used for17:14
cousteau Your best bet would be to rename those files from Linux or similar, maybe amend the commit if possible. Try to figure out why those files are there, maybe you can even delete them17:16
lantech19446 official word from my boss we don't need them anymore17:16
and if for some reason he decides we do i'll still have the first version on github because the push succeeded from the server17:16
cousteau If they were accidentally added you might even want to take them out of git's history by amending/rebasing commits17:17
Or just delete them (using an OS/platform that supports those files) and commit17:18
lantech19446 that's what i'm doing right now17:18
cousteau Or, instead of deleting them, rename them17:18
Take out the ?... part17:18
That way you can easily recover them, even on Windows17:19
lantech19446 they were from back in 2019 we did a fundraiser with chucky cheese, if I don't delete them now i'm gonna delete them in 2mos when i'm getting rid of all the shit no longer used on the site17:20
Strom left17:20
lantech19446 goddamnit it found another one of those files17:21
Strom joined17:22
cousteau left17:24
lantech19446 those images aren't even valid on linux, I have no fucking idea how they ever got displayed on our site17:24
Samian left17:27
ninjin left17:30
shokohsc8 left17:30
ninjin- joined17:30
roadie` left17:33
elf_fortrez joined17:33
roadie` joined17:33
lantech19446 hazzah I have accomplished the task17:34
meator left17:37
samuelrajan747 left17:38
pretty_dumm_guy joined17:40
shokohsc8 joined17:42
hqdruxn08 joined17:47
elf_fortrez left17:49
ajfriesen left17:49
gnoo left17:54
meator joined17:55
koolazer joined17:57
meator left17:58
meator joined17:59
lantech19446 I got the error error: src refspec master does not match any I added the files committed the files and got that error when I tried to push the files now it says my working tree is clean and won't let me add them and the changes didn't push17:59
Brumaire joined18:00
meator left18:02
meator joined18:02
lantech19446 never mind when I used git push # instead of -u origin master it worked18:05
pretty_dumm_guy left18:07
stkrdknmibalz joined18:09
Vooch left18:10
sniperwolf joined18:12
FabioP joined18:15
hbautista_ joined18:22
txtsd joined18:23
EvilDMP joined18:24
lantech19446 so apparently some of my changes still didn't propagate18:28
I don't get what the issue is18:28
pretty_dumm_guy joined18:31
roadie` left18:33
Samian joined18:33
roadie` joined18:39
zumba_addict joined18:40
EvilDMP left18:40
j416 serves lantech19446 some tea. there there.18:40
j416 triggered by profanity18:41
tmz left18:41
tmz joined18:42
lantech19446 thank you j416 I just managed to get all the issues resolved now if my blood pressure would come down a little bit I'll be just fine18:42
absc joined18:43
meator left18:47
meator joined18:48
APic left18:49
alfredb joined18:50
Hax0r joined18:51
pmcnabb left18:57
alfredb left19:05
meator left19:07
meator joined19:08
odoood joined19:08
Torr Where in the <.git> folder are commit messages stored?19:11
imMute Torr: .git/objects/ all objects are in there (commits, tags, trees, blobs, etc)19:12
kyshoc left19:13
kyshoc joined19:13
kyshoc left19:13
kyshoc joined19:13
Torr In which binary format are they stored?19:14
rahl left19:15
imMute Torr: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects19:16
Torr Thank you19:16
bradyt joined19:21
bradyt i don't really feel like mentioning some other project's "master" in my code. is there another reference like "bleeding edge", "HEAD", etc?19:21
er, HEAD isn't right either19:22
imMute "main branch"?19:22
ikke "The branch which shall not be named"19:22
bradyt yeah basically19:23
DoofusCanadensis upstream19:23
Dotz0cat joined19:23
DoofusCanadensis but that usually refers to the entire repository no any specific branch19:23
another| you-know-which-branch19:23
bradyt i feel like i accidentally used the term "upstream" when it's actually a completely different repo, only same ecosystem19:23
these don't have any commits in common, if that makes sense19:24
"bleeding edge of your client breaks my client"19:24
i like that #git is not above humor, i thought lighter moods were more rare on irc19:24
*humour19:25
eschwartz bradyt: "the branch used by those racist people"19:26
bradyt i mean, it's now amusing that a project /hasn't/ switched to main19:26
eschwartz why?19:27
bradyt like, you're not that good of a programmer?19:27
Dotz0cat_ joined19:27
bradyt not the "you" "you"19:27
eschwartz assuming one wants to switch, who in their right mind would ever use "main"?19:27
Dotz0cat left19:27
eschwartz consider e.g. "trunk"19:27
Torr left19:27
DoofusCanadensis it's what github settled on19:27
bradyt i noticed "trunk" somewhere in docs19:27
i think github offers "main", "trunk" and something else19:28
Dotz0cat_Dotz0cat19:28
bradyt as ideas19:28
eschwartz $ cd git-git/; git log origin/main<TAB> -> origin/maint19:28
bradyt origin/roller-coaster19:28
twb eschwartz: I thought they were D/s people19:28
bradyt hmm, can't find that list of alternatives to "master"19:29
eschwartz so github, trying to distract people from talking about ICE, got people to talk about master (without slaves) instead, and they... convinced people to rename to main, because "ma<TAB>", even though that's even worse, now you need *4* characters to disambiguate main vs. maint, instead of 3 to disambiguate master and maint19:30
so much muscle memory :/19:30
bradyt huh, hadn't heard about their involvment with ICE, just AWS19:30
*involvement19:30
eschwartz everyone bought their distraction hook line and sinker, but the real indignity is people actually respect their ability to come up with a good naming scheme... what was wrong with trunk, might I ask?19:31
bradyt oh, probably "development"19:31
eschwartz or "develop", as suggested by git-flow19:32
bradyt SVN trunk19:32
DoofusCanadensis trunk belonged to SVN19:32
bookworm or you know... master19:32
DoofusCanadensis don't reuse it!!oneone19:32
eschwartz in fact git-flow has a master and a develop branch, and the master branch has no earthly reason to exist since it acts as a duplicate of the third git-flow branch, "release"19:32
bradyt this might be where i noticed the term "trunk": https://github.com/cli/cli/issues/92919:33
i guess they never suggested in renaming docs19:33
"bleeding edge" seems too snarky for comments in tests19:34
DoofusCanadensis eschwartz: no, you can merge hotfixes into master as well with git-flow19:34
eschwartz yes, but then it still only has tagged releases which are additionally present in release-${version}19:35
I have never heard a good explanation for why git-flow has a "master" branch which all release branches are merged into, other than "yay, even more bureaucratic merges"19:36
meator left19:36
eschwartz it is not even conceptually a "master" copy of the code in the sense that people typically name a branch master, trunk, or develop. Because it never has the latest code, only releases...19:37
braxas joined19:38
DoofusCanadensis because git-flow was created when master was considered the default branch19:39
roadie` left19:39
DoofusCanadensis ideally, you'd rename master to production and flow from develop to release to production19:39
it was just a workflow that got designed and then popular19:41
nobody says you have to use that19:42
Gustavo6046 left19:50
qbit joined19:51
Gustavo6046 joined19:51
qbit hi!19:51
can one tell a specific repo to always signoff ? i don't see a config options specifically for it19:52
format.signOff ahh!19:52
nvmd joined19:55
qbit thanks :D19:55
qbit left19:55
nvmd left19:55
nvmd joined19:55
eschwartz DoofusCanadensis: I mean, I don't actually like git-flow on any level, so I don't use it. I just also have nosy opinions about things making sense...19:57
DoofusCanadensis heh19:58
I used it briefly at the beginning and I like the concepts, but it didn't fit with our current workflow19:59
roadie` joined20:00
john_johnk joined20:01
roadie` left20:05
absc left20:06
mei left20:09
dflick_ joined20:10
dflick left20:12
absc joined20:12
absc left20:15
absc joined20:17
roadie` joined20:19
crabbedhaloablut left20:24
roadie` left20:24
crabbedhaloablut joined20:24
cmc joined20:24
durham left20:24
durham joined20:24
john_johnk left20:27
absc left20:30
john_johnk joined20:31
gadget joined20:32
clime joined20:34
durham_ joined20:34
otisolsen70 left20:35
durham left20:36
Guest71 joined20:49
onizu left20:51
Lord_of_Life_ joined20:51
Lord_of_Life left20:52
Lord_of_Life_Lord_of_Life20:54
vysn joined20:56
clime left20:58
durham_ left21:01
gh34 left21:02
durham joined21:02
gadget left21:04
gadget joined21:04
FFY00 left21:05
furrymcgee left21:05
mehwork is there a way to make it so i can just do 'git co branchFoo ; git pull' to pull the latest changes on a branch that someone else committed, instead of 'git pull origin branchFoo'?21:06
roadie` joined21:06
mago joined21:07
mago Hello need help21:07
Im trying to push to a repository, the web interface wont let me upload the folder cuz its more than 25 mb21:07
Im stuck at this command: git remote add origin https://github.com/yourUsername/yourRepository.git21:07
Dond understant what should be in there.. I have a folder but not a git:21:07
john_johnk left21:08
mago https://github.com/Formula-HP-Computer-Vision-on-Wheels/Group221:08
cweiss joined21:09
mehwork do i have to do: git branch -u origin/branchFoo ?21:11
if i just type `git fetch` it says the branch fetched stuff as (forced update)21:13
gabin left21:13
roadie` left21:13
ackyshake joined21:17
gadget left21:19
gadget joined21:20
mago left21:20
austin987 left21:21
FFY00 joined21:22
mehwork oh, origin/foo means local branch called origin/foo, whereas 'origin foo' (with a space) means a remot ebranch named 'foo'?21:22
zebrag joined21:24
roadie` joined21:24
mehwork All i really want to know is when i create a new branch like 'git co -b feature/foo' is am i supposed to push it like `git push origin feature/foo' and pull it like `git pull origin feature/foo` even if someone else commits to it?21:24
m0viefreak joined21:26
aniruddha left21:29
roadie` left21:29
alkino left21:30
gxt left21:30
Bayes left21:31
gxt joined21:32
ajfriesen joined21:32
anddam joined21:34
austin987 joined21:34
anddam I have "error: The following untracked working tree files would be overwritten by checkout:", how do I get a list of those files on stdout?21:34
christall left21:34
osse anddam: A bit difficult since they're not tracked. What git does under the hood is take the list of files in the commit you want to check out, subtract the list in the commit you have checked out now, then filter the result on which files exist on disk.21:37
Not too difficult to script, but therw exists no direct command for it21:37
This is a start:21:37
anddam osse: ok, no worries then21:38
osse git diff --name-only --diff-filter=A HEAD othercommit21:38
anddam I thought there was something like status --short21:38
osse The files among those that already exist on disk are the problem21:39
AsenMx left21:39
anddam in my case I'll just grab stderr for lines starting with a tab21:39
a bit of sed, a pinch of xargs and presto21:40
osse You must have quite a few such files for the effort to be worth it. In which case why the hell do you have so many files on disk that just happen to match (by name, anyway) the files in another commit? :P21:42
anddam long story21:43
to make it short I am trying to create an impossible workflow21:44
seems I am succeeding at that21:44
osse: what effort?21:44
osse The effort og scripting it21:44
anddam osse: git checkout whatever-is-giving-conflicts 2>&1 | ag '^\t' | tr -d \\\t | xargs rm21:44
EvilDMP joined21:45
osse If that works well for you then I'm all for it21:47
theoceaniscool left21:48
m0viefreak simply deleting those problematic files sounds like you might as well just `git clean -fdx` before doing the checkout?21:50
osse But what about their precious build products21:51
m0viefreak :)21:51
a build product that's suddenly checked in in another branch sounds strange21:52
odoood left21:52
Quietus joined21:52
osse No I mean that such a clean command would also remove build products21:53
Guest71 left21:53
m0viefreak ah, true21:53
anddam osse: it still doesn't21:54
m0viefreak what about simply `git checkout -f` then?21:54
it should simply overwrite everything without question21:55
zumba_addict left21:55
anddam basically I have different hosts where I have a codebase, and I am trying to edit those on a single machine, mine, that is somehow configured how I like21:55
osse: going through git would mean continuously committing on one side and pulling on the other21:55
osse m0viefreak: ooh, perfect21:55
anddam osse: I am trying to sync those using unison (data synchronizer) but I am using a three way setup, since only one of my system is accessible from all the others21:56
turns out the directory I had were not on the same starting point, so I synced files that were not under revision control (yet)21:57
s/directory/repository/21:57
vdamewood joined22:03
Brumaire left22:04
christall joined22:05
EvilDMP left22:06
jwillikers left22:06
EvilDMP joined22:08
mago joined22:10
mago Im having trouble pushing..22:10
HELP SOS22:10
fatal: the remote end hung up unexpectedly22:10
Lord_of_Life left22:10
mago First I got that, then i increased the buffer..22:10
git config http.postBuffer 99928800022:11
Tried some random values..22:11
Then I get that:22:11
fatal: protocol error: bad line length 81920.72 MiB/s22:11
Lord_of_Life joined22:11
mago I need to push large folders, the web interface wont do..22:11
Is github trying to make it as hard of posiblo, lol..22:11
molt left22:12
lantech19446 hopefully the people who helped me this morning are still here, I was kind of rude and didn't thank you guys for all your help, it really appreciated I couldn't have gotten up and running without you and I apologize for not saying it sooner my head was just spinning this morning22:14
molt joined22:14
mago If you are up for it you could help me..22:14
cmc left22:15
cmc joined22:15
lantech19446 I can try, what do you need help with?22:16
odoood joined22:16
lantech19446 mago: are you able to use ssh?22:19
mago I need to push a folder to github but its not working..22:19
Wulf left22:19
mago lantech19446 dont know..22:19
lantech19446 what OS are you on?22:19
mago lantech19446 i thinks im not using it right now.. I want to upload here:22:19
https://github.com/Formula-HP-Computer-Vision-on-Wheels/Group222:19
Im following those steps:22:21
https://github.community/t/how-to-upload-an-entire-folder/1056/722:21
lantech19446 I don't get why you'd push it twice22:21
is it succeeding the first time?22:21
when you do git push -u origin master?22:22
mago It fails..22:23
lantech19446 ok, are you on windows?22:23
mago Ubuntu 20.04..22:23
First I get: fatal: the remote end hung up unexpectedly22:23
Then i increase the buffer: git config http.postBuffer 99928800022:23
Then I get: fatal: protocol error: bad line length 81920.72 MiB/s22:23
lantech19446 this might be completely off the mark but make sure that openssh is installed22:23
I'm really so new to this i'm grasping at straws just like you are but it seems like we're the only ones here so it's worth a shot22:24
Bombe left22:25
Bombe joined22:25
eschwartz http post buffers do sound more like http than like ssh...22:26
mago Ok, so i should be doing this through ssh.. How?22:26
christall left22:26
lantech19446 eschwartz: that was my next attempt I just found someone who says they solved it with git config --unset http.postBuffer but they were on windows22:27
mago: I wasn't saying to do it through ssh it's possible to but the way I understand it is that git requires it maybe eschwartz can shed some light on that like I said i'm really new like today new22:28
I found a solution online that agrees with eschwartz about it being http buffer if you run the command I just told him about it may help22:28
mago Ok, ill try to unset the buffer..22:28
lantech19446 if it makes you feel any better I had a ton of troubles getting git up and running this morning a couple people here were helping me all morning22:30
kyshoc mago: are you behind a proxy of any sort?22:30
lantech19446 eschwartz: I thought I knew you from one of the channels lol we're both in the arch channels22:30
mago kyshoc no22:31
eschwartz that is true22:31
mago git clone is easy but git push OMG22:31
lantech19446 I knew i recognized your nick I just couldn't place it right away I haven't been very active in there recently22:31
eschwartz to be fair, neither have I22:31
kyshoc mago: okay, you mentioned this is a "large folder", what do you mean exactly — are there very large individual files in this folder, or a lot of small ones? what's the total size of the folder, and the largest single file?22:32
lantech19446 sometimes i look and they're having really heady conversations and i just want to relax22:32
roadie` joined22:33
forgotmynick joined22:33
mago It wont let me look now while i try to pus but its a few hundreds Mb folder below 800 Mb if im correct22:33
lantech19446 oh that's not that big man I did close to a gig earlier and it worked22:34
mago The biggest file is like 60 Mb I think22:34
The folder is 540 MB kyshoc22:35
kyshoc okay, that should be fine — just fyi though, GitHub itself (not git) has a hard limit of 100MB per file22:36
cool, that should be fine too22:36
lantech19446 huh I'm glad you said that kyshoc cuz i had no idea22:36
kyshoc mago: what's your git version (run `git --version` to check)?22:37
mago git version 2.25.122:37
roadie` left22:37
kyshoc lantech19446: I learned it the hard way :-) docs here: https://docs.github.com/en/github/managing-large-files/working-with-large-files/conditions-for-large-files22:38
mago After unsetting the buffer I get: fatal: the remote end hung up unexpectedly22:38
Could it be a permissions issue?22:38
lantech19446 thanks kyshoc22:39
lechner joined22:40
mago It says I have direct acces and that i am admin22:40
I guess ssh is the way.22:42
kyshoc mago: try running `GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push origin master`, it won't fix anything but might give us a better idea of what's going on22:42
mago Ok22:43
keypusher left22:43
palasso left22:45
kaisyu joined22:48
johnny joined22:48
Adoi joined22:49
EvilDMP left22:49
johnny howdy folks. there seems to be some tooling out there to rebase incrementally. is there one anyone can recommend?22:50
i just wanna redo the rebase on top of every commit since. it's a lot of minor changes, but it's easy to miss the differences22:51
sniperwolf left22:53
Samian left22:55
lgc left22:55
keypusher joined22:55
Gurkenglas left22:56
wender left22:56
mago kyshoc thats what i get:22:56
https://pastebin.com/raw/yctitubT22:56
odoood left22:57
mago The 1.49GB seems off, i only got <600Mb, but i did run a command thrice i think..22:57
jstein left22:59
molt left23:00
molt joined23:01
mago Did someone get to have a look at the paste?23:02
pizdets_ left23:02
pizdets joined23:04
mago How do i see what i already added to git through git add? Will running the command multiple times with the same folder add it multiple times?23:04
keypushe- joined23:05
keypusher left23:05
Adoi left23:06
fstd joined23:06
keypushe-keypusher23:08
howdoi joined23:08
kyshoc mago: to that last line: `git status` will tell you what files you've "staged" to git but haven't committed yet, and `git diff --staged` will show you their contents. running `git add` multiple times will not add multiple copies of your files to Git unless you also commit and change those files in between runs of `git add`.23:08
christall joined23:09
mago kyshoc is just that when I do: git push origin master23:09
The number of objects and the size doesnt seem to match with what im actually uploading..23:09
christall left23:10
christall joined23:11
vdamewood left23:11
kyshoc mago: yeah, 1.6GB worth of objects for ~500MB of files does seem strange. what do you get when you run `git log`? this will show you your commit history23:13
mago Ok23:13
christall left23:14
mago OK, it shows like I have alread comitted two times, but they were fails and i cant see anythign where its supposed to be..23:14
christall joined23:14
mago https://pastebin.com/raw/5wyszTDm23:15
kyshoc okay, yeah having two commits might be contributing23:15
also, I noticed in that pastebin from earlier that git is using HTTP/2, if you think your ISP might be doing something silly you could try forcing git to use HTTP/1.1 with `git config --global http.version HTTP/1.1`23:16
^ I'd suggest trying that just to rule it out as a cause23:16
mago Ok, that and then rerun the command i was using? Something silly like what?23:17
natrys left23:17
kyshoc correct, run that git config I just shared, then try `git push origin master` again23:18
mago kyshoc usually higher version number is better isnt it?23:18
vysn left23:19
kyshoc usually, but not always :-)23:20
beshr left23:21
humanface left23:23
mago kyshoc i s the command: git push -u origin master23:25
the same?23:25
kyshoc yes, that'll work!23:25
mago i got error again23:25
fatal: the remote end hung up unexpectedly23:25
Everything up-to-date23:25
Guest23 joined23:30
Xenguy joined23:30
mago left23:33
FFY00 left23:34
bambanxx joined23:34
fabio__ joined23:34
platta joined23:35
FabioP left23:39
Guest23 left23:39
beshr joined23:44
FFY00 joined23:45
FFY00 left23:47
FFY00 joined23:48
FFY00 left23:49
cliluw left23:54
durham_ joined23:57
durham left23:57
durham_ left23:59
durham joined23:59

Logs Search ←Prev date Next date→ Channels Documentation