| 2021-09-02 |
| → igemnace joined | 00:01 |
| ← arcatech left | 00:01 |
| → arcatech joined | 00:02 |
| ← jstein left | 00:03 |
| → christall joined | 00:04 |
| ← jwillikers left | 00:04 |
| ← pretty_dumm_guy left | 00:15 |
| ← christall left | 00:18 |
| ← vysn left | 00:19 |
| ← Tobbi_ left | 00:19 |
| → Brain joined | 00: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' commits | 00:21 |
| → rkta joined | 00:23 |
| → Xenguy joined | 00:29 |
| ← arcatech left | 00:32 |
| → pyeveryt_ joined | 00:32 |
| → christall joined | 00:36 |
| → muscularduckling joined | 00:37 |
| → arcatech joined | 00:37 |
| → audiocat joined | 00:38 |
| ← christall left | 00:40 |
| ← XV8 left | 00:45 |
| ← arcatech left | 00:45 |
| → cation joined | 00:46 |
| → XV8 joined | 00:47 |
| ← hubble88 left | 00:47 |
| → CommunistWolf joined | 00:49 |
|
circuitbone
| https://github.com/stevenjack/cig | 00:50 |
|
| please post any extra tools you find good value | 00:51 |
| ← XV8 left | 00:51 |
| ← reset left | 00:53 |
| → christall joined | 00:55 |
| → arcatech joined | 00:58 |
| ← arcatech left | 00:58 |
| → arcatech joined | 01:02 |
| ← muscularduckling left | 01:05 |
| ← pyeveryt_ left | 01:05 |
| → pyeveryt_ joined | 01:05 |
| ← pyeveryt_ left | 01:10 |
| ← christall left | 01: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 left | 01:20 |
| ← travaldo left | 01:30 |
| ← arcatech left | 01:31 |
| ← mei left | 01:31 |
| ← nyah left | 01:32 |
| → vysn joined | 01:41 |
| → muscularduckling joined | 01:47 |
| ← Murr left | 01:49 |
| → Murr joined | 01:50 |
| → pyeveryt_ joined | 01:51 |
| ← qpdb left | 01:52 |
| → qpdb joined | 01:53 |
| → ferdna joined | 02:02 |
| → magic_ninja joined | 02:05 |
| → vicfred joined | 02:07 |
| → arcatech joined | 02:09 |
| → gast0n joined | 02:10 |
| ← dsrt^ left | 02:10 |
| → Stanley joined | 02:11 |
| ← thiago left | 02:12 |
| ← FinnElija left | 02: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 --force | 02: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 joined | 02:14 |
|
Stanley
| if I log into the server and run git status it says | 02: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 important | 02:30 |
|
| "which repos/branches can I push -f to" is a big part of multi-dev workflow design | 02:30 |
|
| Stanley: you can also do something like "git diff main origin/main" to check how they differ before you push | 02:31 |
| → thiago joined | 02:31 |
| → gabin joined | 02:32 |
| → psyc0ld joined | 02:33 |
|
Stanley
| thanks1 | 02:44 |
|
| ! | 02:44 |
| ← arcatech left | 02:47 |
| → arcatech joined | 02:49 |
| ← Xaldafax left | 02:50 |
| → euouae joined | 02:56 |
| → kyshoc joined | 02:57 |
| ← kyshoc left | 02:57 |
| → kyshoc joined | 02:57 |
| → cdown_ joined | 02:58 |
| cdown_ → cdown | 03:02 |
| ← ChmEarl left | 03:03 |
| ← jazzy left | 03:03 |
| → jazzy joined | 03:04 |
| → ttree joined | 03:05 |
| ← arcatech left | 03:06 |
| → arcatech joined | 03:07 |
| → christall joined | 03:10 |
| → pulse joined | 03:22 |
| ← ferdna left | 03:31 |
| ← mw_ left | 03:33 |
| ← christall left | 03:33 |
| → aidalgol joined | 03:33 |
| → mw_ joined | 03:37 |
| ← keypusher left | 03:42 |
| ← arcatech left | 03:43 |
| → eschwartz joined | 03:47 |
| ← psyc0ld left | 03:49 |
| ← zebrag left | 03: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 -l | 03: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 joined | 03:53 |
| ← pyeveryt_ left | 03: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 changes | 03:56 |
| → gnoo joined | 03:56 |
| ← gabin left | 03:57 |
| ← gnoo left | 03:58 |
| → gabin joined | 03:58 |
| ← gabin left | 03:58 |
| → gnoo joined | 03:59 |
| → gabin joined | 04:02 |
| ← stkrdknmibalz left | 04:02 |
| ← gast0n left | 04:03 |
| → gast0n joined | 04:04 |
| → FH_thecat joined | 04:04 |
|
thiago
| there is one: git submodule | 04:05 |
|
| as for that script, I have it somewhere | 04:06 |
|
twb
| git submodule | sort -k2 ? | 04:06 |
|
| -k2, I suppose | 04:06 |
|
thiago
| remind me when I am in the office tomorrow (that is, in 12 hours) and I'll get it for you | 04:06 |
|
| sorting is unnecessary | 04: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 foreach | 04:07 |
|
twb
| eschwartz: SO MANY people want git archive + git submodule :/ | 04:07 |
|
| thiago: yeah I agree, I hadn't read properly | 04:07 |
| ← gabin left | 04:08 |
|
thiago
| unfortunately, GNU tar isn't a format that is concatenable via pipes | 04:08 |
|
twb
| Actually I was wondering about that | 04:08 |
| → gabin joined | 04:09 |
|
twb
| https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/tarfilter isn't quite that | 04: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 times | 04:10 |
|
twb
| And https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/mmdebstrap#L5483 | 04:10 |
|
thiago
| so, no pipe streaming | 04:10 |
|
twb
| thiago: yeah that's what I resorted to but it's not scalable because it needs temporary disk space | 04: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 gitattributes | 04:11 |
|
thiago
| twb: indeed | 04:11 |
|
| I don't see a way out | 04:11 |
|
eschwartz
| I would like to replace that by git archive, but handling submodules is a complicated topic | 04:11 |
| → saroy joined | 04:12 |
|
thiago
| git archive --submodules should just DTRT | 04:12 |
|
| but that isn't implemented | 04: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 flies | 04:12 |
|
| This might be relying on the consumer being GNU tar compatible | 04:12 |
|
| { tar c x; tar c y z; } | tar t # definitely doesn't work | 04:13 |
|
thiago
| --format=pax | 04:14 |
|
twb
| { tar --format=pax -c x; tar --format=pax -c y z; } | tar --format=pax -t | 04:14 |
|
| ...also doesn't DTRT | 04:14 |
|
thiago
| no, not concatenable | 04:15 |
|
| just tried that too | 04: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 up | 04: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 catenation | 04:15 |
|
| eschwartz: maybe for you, but I hate it :-) | 04:16 |
|
thiago
| cpio is also not concatenable. I've tried that too | 04:16 |
|
twb
| thiago: and git archive --format=zip is obviously not | 04:16 |
|
thiago
| zip is never a good idea | 04: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 created | 04:17 |
|
thiago
| if you're producing content for windows, use 7z | 04: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 RAM | 04:18 |
|
thiago
| right | 04:18 |
|
| I don't know of a solution to that | 04: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 anyway | 04:18 |
|
thiago
| like I said, the best I could come up with was tar --concatenate | 04:18 |
|
| I can give you the script tomorrow | 04:18 |
|
twb
| Which means the streams begin life as either tar or zip | 04:18 |
|
eschwartz
| is `git submodule` a stable (plumbing-worthy) output format? | 04:19 |
|
thiago
| I think git get-tar-commit-id still works | 04:19 |
|
| eschwartz: like I said above, you actually want git submodule foreach | 04:19 |
|
eschwartz
| seems like the general format is '{plus-if-modified}{current_commit} {path} ({decorated_name})' | 04:20 |
|
twb
| eschwartz: TIL | 04:20 |
| ← AnAverageHuman left | 04:22 |
|
thiago
| git submodule foreach --recursive 'git archive --prefix=$sm_path $sha1 | tar --concatenaate output.tar -' or something like that | 04: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 suppose | 04:23 |
|
twb
| http://ix.io/3xHy | 04:23 |
|
thiago
| I always forget the / too | 04:24 |
|
| I wonder why it's necessary | 04:24 |
|
| it's not like I want my configure script name changed... | 04:24 |
| → christall joined | 04:25 |
|
eschwartz
| --prefix should probably really be --directory-prefix, indeed | 04:25 |
|
| > $sha1 is the commit as recorded in the immediate superproject | 04:25 |
|
| hmm, so this is the one committed, not the one manually checked out and marking the index as dirty? | 04:25 |
|
thiago
| yes | 04:26 |
|
| once concatenated, xz -7 | 04: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 spot | 04:27 |
| → dmc joined | 04:28 |
| ← christall left | 04:29 |
| ← jazzy left | 04:31 |
|
twb
| thiago: something along these lines http://ix.io/3xHz | 04: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 that | 04:33 |
|
| are actually inited | 04:33 |
|
twb
| python and golang have streamable tar; perl doesn't | 04:34 |
|
thiago
| submodule status lists uninited modules | 04:35 |
| → homura joined | 04:35 |
|
eschwartz
| ... right, I'm dumb. foreach won't operate on them, but status will sure list them | 04:36 |
|
twb
| Yeah that's also a huge open problem in my mockup | 04:36 |
|
| if it's a bare repo how do you access the submodules at all | 04: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 repository | 04:37 |
|
ikke
| You clone it, and on that clone, you can work with submodules | 04:37 |
|
thiago
| .gitmodules only contains URLs | 04:37 |
|
eschwartz
| unfortunately not in a truly parseable format, since you cannot just split on "{sha1} {path}" due to the end containing git describe bits | 04:37 |
| ← subopt left | 04:37 |
|
eschwartz
| but only sometimes! | 04:37 |
|
thiago
| yeah, don't use spaces in paths | 04: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 chars | 04:38 |
| → aniruddha joined | 04:39 |
|
thiago
| it could get a -0 option | 04:39 |
|
twb
| Note that you also need to know which commit each submodule is pointing at, which is in the main repo's tree | 04:40 |
| ← hbautista_ left | 04:41 |
|
eschwartz
| the `submodule status` does list that | 04:41 |
|
twb
| ah k | 04:41 |
|
eschwartz
| $ git submodule | 04:42 |
|
| fb2bd257f6089ed9890264bc4ef5ef96eaa2ef98 submod (heads/master) | 04:42 |
|
| $ git submodule deinit submod && git submodule | 04:43 |
|
| -fb2bd257f6089ed9890264bc4ef5ef96eaa2ef98 submod | 04:43 |
| → rnkn joined | 04:44 |
| ← The_Blode_ left | 04:45 |
|
thiago
| I had noticed it before because all of mine are prefixed with + | 04:49 |
| ← arunkumar413 left | 04:50 |
| → MrMagic joined | 04: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 left | 04:53 |
| → The_Blode joined | 04: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 left | 04:56 |
|
ikke
| man git worktree | 04:56 |
|
gitinfo
| the git-worktree manpage is available at https://gitirc.eu/git-worktree.html | 04:56 |
|
rnkn
| ikke: as in git --work-tree=PATH ? | 04:56 |
| → MrMagic joined | 04: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 changes | 04:58 |
|
thiago
| you want a checkout without a .git dir? | 04:58 |
|
| that's a git archive | 04: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 repository | 04:59 |
|
| git archive | tar -x | 04:59 |
|
| I am assuming you're not going to use git in the extracted sources | 04:59 |
|
| if you are, I really, really advise you to reconsider your choice of devices and filesystems | 05:00 |
|
rnkn
| thiago: correct, I want to avoid having a repo on the device | 05:01 |
|
| I want a work tree on the device, while keeping the repo on my local machine | 05:01 |
|
thiago
| then use git archive and immediately extract onto the device | 05:01 |
|
ikke
| does the local repo require a worktree? | 05:02 |
|
rnkn
| yeah that's not a good way | 05:02 |
|
thiago
| no, git archive works on bare repositories | 05:02 |
|
rnkn
| ikke: preferably | 05:02 |
|
ikke
| then git-worktree is your best option | 05:03 |
|
thiago
| I think it's not | 05:03 |
|
| how are you accessing the device's storage from your work machine? | 05:03 |
|
rnkn
| ikke: okay cool | 05:03 |
|
| I've been trying to build got (gameoftrees) on macOS as it's designed for separate work-tree and repo, but alas no luck | 05:05 |
|
| uses a .got dir to track the work-tree's commit | 05:05 |
| ← filePeter left | 05:08 |
|
eschwartz
| what does "keeping the repo on my local machine" mean? | 05:10 |
|
rnkn
| eschwartz: on my laptop | 05: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-worktree | 05:11 |
|
gitinfo
| the git-worktree manpage is available at https://gitirc.eu/git-worktree.html | 05:11 |
|
eschwartz
| it does exactly what you say this gameoftrees thing does | 05:11 |
|
rnkn
| eschwartz: not quite, it handles conflicts between multipe worktrees | 05:11 |
|
eschwartz
| also for clarity, please feel free to start saying "git-dir" instead of "repo" | 05:12 |
| → mei joined | 05: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 worktree | 05:13 |
| ← mei left | 05:13 |
|
eschwartz
| then the dumb device and the laptop's live worktree are on different branches, so there is no conflict whatsoever | 05:13 |
|
| OR | 05:14 |
|
thiago
| git worktree can do that, so long as they have checked out different branches | 05:14 |
|
| however, mind what I said about git not being forgiving of dumb filesystems | 05:14 |
|
eschwartz
| you could have a bare clone on your laptop, and a worktree on the dumb device | 05:14 |
|
thiago
| I advised you to rethink | 05:14 |
|
eschwartz
| only one worktree | 05:14 |
|
rnkn
| eschwartz: yeah I was wondering that, I like the idea of this separate bare repo workflow | 05: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 left | 05:17 |
| → homura joined | 05:17 |
| ← gast0n left | 05: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=PATH | 05:19 |
| → mei joined | 05:20 |
|
eschwartz
| incidentally, referring back to my earlier question about git archive + submodules | 05:20 |
|
| my current WIP rewrite https://paste.xinu.at/HcbgJs/ :D | 05:21 |
|
twb
| rnkn: in what way does the device suck? Is it eMMC, or JFFS2, or what | 05:21 |
|
eschwartz
| so much less terrible already :D | 05:21 |
|
rnkn
| twb: seeing you outside of #emacs makes me uncomfortable | 05:22 |
|
| twb puts pants on | 05:22 |
|
rnkn
| twb: it's this: https://www.kingjim.co.jp/pomera/dm30/ | 05:23 |
|
| it gets noticably slower with git repos on board | 05:23 |
|
twb
| OK so yeah almost certainly eMMC | 05:24 |
|
| i.e. basically an SD card solderde onto the mainboard | 05: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 number | 05:25 |
| ← durham left | 05:25 |
|
rnkn
| nope, FAT32 | 05:25 |
|
twb
| If so, try JFF- OK | 05:25 |
|
| Yeah the problem there is simply that eMMC sucks and FAT32 doesn't work around that | 05:25 |
| ← vysn left | 05:25 |
| → durham joined | 05:26 |
|
rnkn
| it's okay, I am pretty sure git-worktree is the panacea I want | 05: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 unit | 05:30 |
|
rnkn
| twb: it does seem to be a cafe conversation starter | 05:30 |
|
twb
| I remember homeless people asking about my 7" EeePC | 05:31 |
|
| That was back bfeore smartphones existed | 05:31 |
|
thiago
| I'm rewatching Leverage right now (2008, 2009) and it's funny to see flip phones and phones with physical keyboards | 05:35 |
| → YuGiOhJCJ joined | 05:39 |
| → tristan__ joined | 05:45 |
| ← rnkn left | 05:45 |
| ← Murr left | 05:49 |
| → Murr joined | 05:49 |
| → Samian joined | 05:51 |
| → madewokherd` joined | 05: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 left | 05: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 joined | 05:54 |
|
twb
| Samian: not exactly what you asked for, but close | 05:55 |
| → LACampbell joined | 05: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 commit | 05: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 clean | 05:57 |
|
LACampbell
| I know git is just graph theory but we didn't cover "checkouts" at all in undergrad math | 05:58 |
| ← gabin left | 06: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
| yes | 06:01 |
|
twb
| LACampbell: OK, sorry, it sounded like a super noob question | 06:01 |
|
LACampbell
| I rm -rf'd the whole directory, cloned it again, and everything works | 06:02 |
|
twb
| LACampbell: ah OK never mind then | 06:02 |
|
LACampbell
| twb: yeah I suck at git hard. I don't know why. I just can't wrap my head around it | 06: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 filesystem | 06:02 |
|
LACampbell
| I'm not bad at FP, haskell makes more sense than git | 06:03 |
|
twb
| LACampbell: that's how I first "got" git, coming from a background of RCS and darcs | 06:03 |
|
LACampbell
| I guess I don't understand 'checkout' | 06:03 |
|
| it does so many different things | 06:03 |
|
bookworm
| https://imgs.xkcd.com/comics/git.png | 06:03 |
| ← euouae left | 06: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 defrag | 06:04 |
| → gabin joined | 06:04 |
|
bookworm
| you can use switch instead if that is any easier for you | 06:04 |
|
| absolutely not | 06:04 |
| → envex joined | 06:04 |
|
twb
| LACampbell: no, defrag is callde "git gc"; it runs automatically as needed | 06:05 |
|
bookworm
| that means you have no idea how to use git... you never need a fresh clone, you have the history right there | 06: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 time | 06:05 |
|
| Now I use only git it's easier to keep it in my head | 06: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 up | 06:06 |
|
twb
| So e.g. linux.git on a 1GB RAM system | 06: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 question | 06: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 times | 06: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 specific | 06:08 |
|
| and tell git which of the two things that are applicable you actually mean | 06:09 |
|
eschwartz
| because you literally get that exact message when "origin/foo" is not a valid man gitrevisions | 06:09 |
|
gitinfo
| the gitrevisions manpage is available at https://gitirc.eu/gitrevisions.html | 06: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 it | 06:09 |
|
eschwartz
| if "origin/foo" is a valid remote_name/branch_name then it *resolves* to a commit, and git checkout works | 06:10 |
|
| if not, then it doesn't | 06:10 |
|
| "when doesn't it resolve" -> generally, when you accidentally have the remote named something else | 06:10 |
|
bookworm
| status first, then depending on what you are doing look at it. git remote -v / git branch -r stuff like that | 06:10 |
|
LACampbell
| so in got the concept of a branch is really just a single commit. there's no higher abstraction | 06:11 |
|
eschwartz
| if you git checkout -b "foo" <TAB> then tab completion should list all the valid possibilities and you can eyeball those for sanity | 06:11 |
|
bookworm
| ^ | 06:11 |
|
| a branch is not a commit, it points to one | 06:12 |
|
Samian
| if I search on google: "oss install" github | 06:12 |
|
eschwartz
| to be more accurate, a branch is not a commit, it's just a moving label pointing at a commit | 06:12 |
|
Samian
| a lot of stuff comes up | 06: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 comitted | 06:12 |
|
eschwartz
| right | 06:12 |
|
bookworm
| strange way to google though | 06:12 |
|
LACampbell
| so that's why checkout is used for branches and commits. because git reduces them down to being the same thing | 06:13 |
|
| ok, that kinda helps. I'll try tab completion next time | 06:13 |
|
bookworm
| and files | 06:13 |
|
LACampbell
| at least briefly, before I nuke it | 06:13 |
|
thiago
| well, kinda. They're also different enough that we now have git switch | 06:13 |
|
eschwartz
| any/all git revisions are either: 1) a commit, 2) a pointer to a commit, 3) an annotated tag blob | 06:13 |
|
Samian
| bookworm aaahhh! open source software! | 06:13 |
|
| thanks! | 06:13 |
|
bookworm
| and other things :D again checkout is heavily overloaded | 06:13 |
|
Samian
| next q. What's the diff between HEAD and trunk? | 06:13 |
|
eschwartz
| and 3 doubles as pointing to a commit | 06:13 |
|
Samian
| are they synonyms? | 06:13 |
|
eschwartz
| HEAD is a special reference to the current branch | 06:14 |
|
bookworm
| Samian: there is no trunk in git vocabulary as such | 06:14 |
|
eschwartz
| trunk means nothing, though in some repos it might be a branch name | 06: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 commit | 06:14 |
|
bookworm
| there's trunk based development, if that's what you mean | 06:14 |
|
thiago
| to commit is to write a new post-it note with the SHA-1 | 06:14 |
|
bookworm
| thiago: wrong order, the branch is the sticky note and you attach it to wherever | 06:15 |
|
thiago
| to checkout a new branch is to move the pen that is pointing to the currently checked out one | 06:15 |
|
eschwartz
| trunk is the traditional name for other VCS software, i.e. subversion, to name the default branch | 06:15 |
|
thiago
| no, the commit is the sticky note because of the reflog | 06:15 |
|
eschwartz
| (not that subversion can really be said to have true branches) | 06:15 |
|
thiago
| you can inspect the notes below it | 06:15 |
|
bookworm
| you do you | 06: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 note | 06:17 |
|
thiago
| not the commit itself | 06:17 |
|
| the branch is the note | 06:17 |
|
eschwartz
| > no, the commit is the sticky note | 06:17 |
|
thiago
| $ cat .git/refs/heads/main | 06:17 |
|
| b72cc01f793fc9ba474b38780e116de6011f1016 | 06:17 |
|
| the analogy is not very good, of course | 06:18 |
|
eschwartz
| the reflog contains old sticky notes which used to be the topmost sticky note on the branch, fair enough | 06:18 |
|
thiago
| if you're sticking notes on your whiteboard, the branch is the section and you probably wrote the name on top | 06:18 |
|
bookworm
| doesn't work for me | 06:18 |
|
thiago
| the notes are entries in the reflog, with the topmost being the current | 06:18 |
|
bookworm
| in my world commits and branches are an actual tree, there's no white board | 06:19 |
|
thiago
| there's no tree in git | 06:19 |
|
| in git commits, I mean | 06:19 |
|
bookworm
| graph / tree 🤷♂️ | 06:20 |
|
thiago
| thre is of course the tree object | 06:20 |
|
| sure, but that's a different discussion | 06:20 |
|
| yes, the commits form a DAG | 06:20 |
|
bookworm
| it's really not | 06:20 |
|
thiago
| but you don't need branches to do that. You could write the output of git commit-tree in post-it notes | 06: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 matches | 06:21 |
|
thiago
| right | 06:21 |
|
| I find my analogy is helpful when trying to explain the reflog | 06:21 |
|
bookworm
| and what works for you doesn't necessarily work for anyone else | 06:21 |
|
thiago
| which wasn't the topic here, so it may be unnecessarily complex | 06:21 |
|
bookworm
| I never use sticky notes the way you are suggesting | 06:21 |
|
| a reflog is just a list of things you've done, a list | 06:22 |
|
| there's no sticky notes involved | 06:22 |
|
| conceptually at least | 06:22 |
| ← sh4 left | 06:22 |
|
bookworm
| it's easily explained as simple "history" | 06:22 |
|
| everyone can understand that concept | 06:23 |
|
eschwartz
| the real problem here is that physical sticky notes would be way too slow to implement an actually performant VCS | 06:23 |
|
thiago
| the reflog file is actually a queue, not a stack like the post it note analogy | 06:23 |
|
| entries are always added on top and are expired from the bottom | 06: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 pile | 06: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 corrections | 06:26 |
|
thiago
| in my experience, people who use post-it notes aren't very organised | 06:26 |
|
eschwartz
| thiago: that was my leading assumption, yeah | 06:26 |
|
thiago
| they use them to keep themselves somewhat organised, with varying levels of success | 06:26 |
| ← thiago left | 06:33 |
| → Guest3026 joined | 06:36 |
| ← Guest3026 left | 06:36 |
| ← FFY00 left | 06:41 |
| tristan__ → gtristan | 06:41 |
| → christall joined | 06:49 |
| → lesihctej joined | 06:50 |
| ← jetchisel left | 06:50 |
| → theoceaniscool joined | 06:52 |
| → Hax0r joined | 06:53 |
| ← christall left | 06:54 |
| → pyeverything joined | 06:56 |
| → rtur joined | 07:00 |
| ← pyeverything left | 07:00 |
| → furrymcgee joined | 07:01 |
| ← ttree left | 07:02 |
| → Gurkenglas joined | 07:02 |
| ← unluckyshrubbery left | 07:05 |
| → srinidhi joined | 07:12 |
| ← furrymcgee left | 07:13 |
| → furrymcgee joined | 07:13 |
| ← vicfred left | 07:16 |
| ← sudoforge left | 07:28 |
| → sudoforge joined | 07:32 |
| → roadie joined | 07:37 |
| → christall joined | 07:39 |
| → ishutin_ joined | 07:41 |
| ← christall left | 07:48 |
| ← LiENUS left | 07:50 |
| ← AbleBacon left | 08:05 |
| → EvilDMP joined | 08:07 |
| ← durham left | 08:09 |
| → feep[work] joined | 08:11 |
|
feep[work]
| hi, I have a weird situation. | 08:11 |
| → poebel joined | 08:11 |
|
feep[work]
| I have a repo that I'm trying to merge with another repo | 08: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 commit | 08: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 left | 08:15 |
| ← ecraven left | 08:16 |
|
feep[work]
| nm got it using lots of copying files elsewhere and copying them back | 08:21 |
|
| "easy merge" | 08:21 |
| ← feep[work] left | 08:23 |
| → oxymoron93 joined | 08:31 |
| ← EvilDMP left | 08:33 |
| ← hnOsmium0001 left | 08:34 |
| → Spydar007 joined | 08:38 |
| → LuKaRo joined | 08:41 |
| → EvilDMP joined | 08:45 |
| ← Samian left | 08:52 |
| → Dev0n joined | 08:53 |
| → Samian joined | 08:53 |
| ← Samian left | 08:58 |
| ← Betal left | 09:00 |
| ← YuGiOhJCJ left | 09:01 |
| → YuGiOhJCJ joined | 09:01 |
| → xx joined | 09:02 |
| → cousteau joined | 09:04 |
| → keypusher joined | 09:05 |
|
cousteau
| There was a way to have multiple branches "active" at the same time, in different folders, right? | 09:06 |
| ← gtristan left | 09:07 |
| → gtristan joined | 09:07 |
|
cousteau
| I'm thinking of possible ways to perform this whole "use git to track a remote software project that isn't git" idea | 09: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 joined | 09: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 tool | 09:12 |
| → xa_ joined | 09:13 |
| ← FH_thecat left | 09:17 |
| ← roadie left | 09:20 |
| ← xa_ left | 09:21 |
| → daoudr joined | 09:27 |
| ← momomo left | 09:28 |
| → momomo joined | 09:29 |
| ← The_Blode left | 09:29 |
| ← austin987 left | 09:29 |
| ← YuGiOhJCJ left | 09:31 |
| → pretty_dumm_guy joined | 09:32 |
| ← oxymoron93 left | 09:33 |
| ← momomo left | 09: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 joined | 09:37 |
| → momomo joined | 09: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 joined | 09:40 |
| ← Guest77 left | 09:40 |
|
cousteau
| ...ah, "git worktree" is what I was looking for | 09:41 |
| → natrys joined | 09:42 |
| → austin987 joined | 09:43 |
| → christall joined | 09:45 |
| → oxymoron93 joined | 09:46 |
| ← gtristan left | 09:48 |
| ← AsenMx left | 09:57 |
| → dsrt^ joined | 10:00 |
| → vysn joined | 10:04 |
| ← audiocat left | 10:05 |
| → Masklin_Gurder joined | 10:05 |
| → lgc joined | 10:06 |
| ← bin101 left | 10:08 |
| → enoq joined | 10:08 |
| ← lesihctej left | 10:10 |
| → bin101 joined | 10:10 |
| → lgc_ joined | 10:11 |
| ← daoudr left | 10:12 |
| ← lgc left | 10:12 |
| ← christall left | 10:14 |
| → xa_ joined | 10:19 |
| → jetchisel joined | 10:23 |
| → reset joined | 10:27 |
| → pyeverything joined | 10:33 |
| → AsenMx joined | 10:37 |
| ← pyeverything left | 10:38 |
| → Ecophobia joined | 10:42 |
| ← Hax0r left | 10:43 |
| → Hax0r joined | 10:50 |
| ← Hax0r left | 10:50 |
| → FFY00 joined | 10:52 |
| → spuz joined | 10: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 first | 10:55 |
|
| ssh <remote> 'git init repo.gi' | 10:55 |
|
spuz
| ok thanks | 10:55 |
| → rfuentess joined | 10:59 |
| ← momomo left | 11:01 |
| ← Lunatrius left | 11: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't | 11:08 |
|
| forgot --bare | 11:08 |
|
cousteau
| (I would guess if you do this you probably want the remote repo to be bare) | 11:08 |
| → goldfish joined | 11:08 |
|
ikke
| you are right | 11:08 |
|
cousteau
| I remember there were some restrictions when pushing to non bare repos but I don't remember them | 11: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 left | 11:12 |
| → Lunatrius joined | 11:16 |
|
cousteau
| It'd be easier with a bare repo, though. But if that works for you... | 11:17 |
| ← pretty_dumm_guy left | 11: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_ left | 11:19 |
| ← lasr[m] left | 11:21 |
| → nyah joined | 11:25 |
| → jwillikers joined | 11:26 |
| → xa_ joined | 11:27 |
| → keir joined | 11:27 |
| ← Ecophobia left | 11:29 |
| ← wdouglass left | 11:32 |
|
eschwartz
| ikke, spuz: some servers are running software that auto-creates the repo for you on demand, though | 11:33 |
|
spuz
| cousteau: the remote server needs a local file tree. It's not a build server but something like that | 11:38 |
| ← xa_ left | 11:40 |
| ← AsenMx left | 11:42 |
| → AsenMx joined | 11:42 |
| → jrofd joined | 11:44 |
| → Hax0r joined | 11:45 |
| → xa_ joined | 11:45 |
| → dimi1947 joined | 11:46 |
| ← dimi1947 left | 11:46 |
| → AnapodoPsalidaki joined | 11:49 |
| → rewrit3 joined | 11:50 |
| ← Hax0r left | 11:50 |
| ← jrofd left | 11:58 |
|
cousteau
| I see | 11: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" idea | 12:03 |
| → roadie joined | 12:05 |
| → tristan__ joined | 12:06 |
| ← goldfish left | 12:11 |
| → christall joined | 12:11 |
| ← AsenMx left | 12:12 |
| → AsenMx joined | 12:13 |
| → skapata joined | 12:14 |
| ← skapata left | 12:14 |
| → skapata joined | 12:14 |
| ← AsenMx left | 12:14 |
| → AsenMx joined | 12:14 |
| → stpa joined | 12:15 |
| → otisolsen70 joined | 12:16 |
| ← AsenMx left | 12:19 |
| → AsenMx joined | 12:19 |
| → The_Blode joined | 12:20 |
| ← _Mocramis left | 12:21 |
| → jrofd joined | 12:21 |
| → ppang joined | 12:24 |
| → avar joined | 12:28 |
| → Bayes joined | 12:29 |
| ← Bayes left | 12:29 |
| → Bayes joined | 12:29 |
| ← EvilDMP left | 12:31 |
| ← tchan left | 12:32 |
| → gh34 joined | 12:32 |
| → EvilDMP joined | 12:32 |
| ← lgc_ left | 12:33 |
| → lgc joined | 12:34 |
| → AnAverageHuman joined | 12:34 |
| ← christall left | 12:37 |
| ← LordLion left | 12:41 |
| → LordLion joined | 12:41 |
| ← EvilDMP left | 12:47 |
| → pretty_dumm_guy joined | 12:48 |
| ← roadie left | 12:51 |
| → EvilDMP joined | 12:51 |
| → momomo joined | 12:53 |
| → christall joined | 12:53 |
| → hackinghorn joined | 12:55 |
| → jazzy2 joined | 12:56 |
| → hwrd joined | 13:00 |
| ← Xenguy left | 13:01 |
| ← stpa left | 13:02 |
| → stpa joined | 13:03 |
| → stefanct joined | 13:03 |
| stpa → spampel | 13: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 left | 13:11 |
| → onizu joined | 13:11 |
| → gjnoonan_ joined | 13:13 |
| ← keir left | 13:14 |
| ← CalimeroTeknik left | 13:15 |
| → CalimeroTeknik joined | 13:16 |
| → humanface joined | 13:17 |
| → keir joined | 13:18 |
| ← CalimeroTeknik left | 13:20 |
| → CalimeroTeknik joined | 13:20 |
| ← frobnic left | 13:20 |
| → frobnic joined | 13:22 |
| ← jazzy2 left | 13:22 |
| → tchan joined | 13:24 |
| ← shokohsc8 left | 13:25 |
| → shokohsc8 joined | 13:26 |
| ← EvilDMP left | 13:27 |
| → computeiro joined | 13:31 |
| ← keir left | 13:31 |
| → keir joined | 13:32 |
| ← pretty_dumm_guy left | 13:39 |
| → hsiktas joined | 13:40 |
| → alfredb joined | 13:42 |
| ← YuGiOhJCJ left | 13:47 |
| → roadie joined | 13:50 |
| ← The_Blode left | 13:51 |
|
cousteau
| stefanct: you sure that's not your terminal emulator doing funny things? | 13:52 |
| → The_Blode joined | 13:52 |
| ← keir left | 13:52 |
| → keir joined | 13:53 |
|
ikke
| must be, if you do git diff | base64, the tabs are preserved | 13:53 |
| ← oxymoron93 left | 13:53 |
| → EvilDMP joined | 13:54 |
| ← humanface left | 13:55 |
| ← lgc left | 13:56 |
|
cousteau
| I was thinking git diff | hd, or git diff >patch.diff | 13:56 |
| → lgc joined | 13:56 |
|
cousteau
| OK I can confirm that git diff >git.diff uses TABS, and doesn't convert them to spaces | 13:57 |
| ← roadie left | 13:57 |
|
ikke
| The patches would be corrupt otherwise | 13: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 git | 13:58 |
|
ikke
| correct | 13: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 on | 13:59 |
|
| But yeah it shouldn't happen | 13:59 |
| ← ppang left | 14:00 |
| → gnit joined | 14:02 |
| → humanface joined | 14:06 |
|
stefanct
| it's the pager apparently | 14:06 |
|
| (less in my case) | 14:06 |
|
cousteau
| Oooh | 14:06 |
|
ikke
| aaaaah | 14:06 |
|
| so git --no-pager diff should have tabs then | 14:07 |
|
| or git diff | cat | 14: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 me | 14:09 |
| ← keir left | 14:09 |
| → keir joined | 14:10 |
|
cousteau
| So the terminal emulator I'm using ALSO replaces tabs with spaces, apparently | 14:10 |
| ← keir left | 14:10 |
| → wender joined | 14:11 |
| → Torr joined | 14:11 |
| → keir joined | 14:11 |
|
cousteau
| printf 'a\tb\n' # also prints spaces | 14:11 |
| → ajfriesen0 joined | 14:12 |
| ← ajfriesen left | 14:12 |
| ajfriesen0 → ajfriesen | 14: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 left | 14:13 |
| → hnOsmium0001 joined | 14: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 repo | 14:17 |
| ← keir left | 14:17 |
| → keir joined | 14: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-ff | 14:21 |
|
stefanct
| my moral is quite different... git --no-pager diff ftw | 14:22 |
|
cousteau
| mehwork: maybe someone pushed to that branch and you need to merge manually | 14:24 |
| ← mteo left | 14: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 case | 14:27 |
|
mehwork
| isn't that what git pull does | 14:27 |
| ← gnit left | 14:28 |
|
cousteau
| That's what I thought, but I would have sworn that git fetch will freely move remote branches without complaining | 14:28 |
|
| Apparently you get that error if someone rewinds the branch on the server | 14:29 |
| ← Lunatrius left | 14:33 |
|
cousteau
| Hmm nope, I tried to do that with two local repos and it did the merge right away | 14:33 |
| → Lunatrius joined | 14:34 |
| → sh4rm4^bnc joined | 14:35 |
| → Tobbi_ joined | 14:35 |
| sh4rm4^bnc → sh4 | 14:36 |
| ← sh4 left | 14:37 |
| → sh4 joined | 14:37 |
|
cousteau
| mehwork: which git version do you have? Maybe this is something that happened in older versions | 14:38 |
|
| (if someone has a better idea of what is happening feel free to suggest) | 14:39 |
|
homura
| gitgud.io | 14:40 |
| → subopt joined | 14:41 |
| → thiago joined | 14:41 |
| ← homura left | 14:47 |
| ← sh4 left | 14:50 |
| → sh4 joined | 14:50 |
| ← sh4 left | 14:51 |
| → sh4 joined | 14:51 |
| → mteo joined | 14:51 |
| ← poebel left | 14:53 |
| → Tobbi_1 joined | 14:54 |
| ← Tobbi_ left | 14:55 |
| Tobbi_1 → Tobbi_ | 14:55 |
| ← keir left | 14:59 |
| → Pent joined | 15:01 |
| → junktext joined | 15:02 |
| → WishBoy joined | 15:02 |
| ← WishBoy left | 15:02 |
| → lantech19446 joined | 15: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 joined | 15:04 |
| ← WishBoy left | 15:04 |
| ← stefanct left | 15:04 |
| → roadie joined | 15:06 |
| ← tristan__ left | 15:08 |
| → cyberpear joined | 15:11 |
| ← tchan left | 15:13 |
| → tchan joined | 15:13 |
| → AbleBacon joined | 15:14 |
| → Guest25 joined | 15:14 |
| ← vysn left | 15:14 |
| Guest25 → samuelrajan747 | 15:17 |
|
mehwork
| cousteau: 2.24.3 | 15:17 |
| → ChmEarl joined | 15:18 |
| ← hackinghorn left | 15:21 |
| → durham joined | 15:23 |
| ← alfredb left | 15:26 |
| → neltraus_ joined | 15:31 |
| ← jinsun left | 15:32 |
| → jinsun joined | 15:32 |
| ← ajfriesen left | 15:34 |
| → push-f joined | 15:34 |
| → ajfriesen joined | 15: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 it | 15:35 |
|
j416
| nice. | 15:36 |
| → starfarer joined | 15:36 |
|
lantech19446
| the hardest part was the damn PAT they're forcing you to use now | 15:36 |
|
j416
| what's that | 15:36 |
|
lantech19446
| personal access token | 15: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 ssh | 15: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 now | 15: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 now | 15:38 |
|
j416
| if they did, they are lying | 15:38 |
|
lantech19446
| ok | 15: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 works | 15:39 |
| → pupskuchen joined | 15:39 |
|
lantech19446
| j416: I'm the one who would be configuring the firewall anyway lol | 15: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 left | 15:40 |
|
j416
| sounds like great fun | 15:40 |
|
lantech19446
| I'm loving it I think I actually want to transition to webdev next | 15:40 |
|
j416
| haha. good for you. | 15:40 |
|
lantech19446
| would you like to see the site I've built? | 15:40 |
|
j416
| nope | 15:40 |
|
| (sorry) | 15:40 |
|
lantech19446
| it's ok you aren't obligated too | 15:41 |
| → ajfriesen9 joined | 15: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 assume | 15:42 |
| → g2anj joined | 15:42 |
|
j416
| !deploy | 15: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.html | 15:43 |
| ← ajfriesen left | 15:43 |
| ajfriesen9 → ajfriesen | 15: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 files | 15:44 |
|
j416
| man git-push | 15:44 |
|
gitinfo
| the git-push manpage is available at https://gitirc.eu/git-push.html | 15:44 |
|
j416
| man git-fetch | 15:44 |
|
gitinfo
| the git-fetch manpage is available at https://gitirc.eu/git-fetch.html | 15:44 |
| ← humanface left | 15: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 moment | 15:47 |
|
j416
| !book explains in more detail | 15: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 !parable | 15:47 |
|
lantech19446
| ok cool | 15: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
| yes | 15: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
| ok | 15:50 |
|
imMute
| note that ".gitkeep" is not special - any name will work - it's just a common name used for this purpose | 15: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 left | 15:53 |
|
imMute
| yes, commit is local. you need to push to share it elsewhere | 15:53 |
|
lantech19446
| ok cool, i'm going to remember this it's going to become very useful to me | 15: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 transfer | 15: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 need | 15:59 |
|
cousteau
| mehwork: that should be new enough | 16:00 |
| → Samian joined | 16:09 |
| ← roadie left | 16:11 |
| → roadie joined | 16:13 |
| ← Samian left | 16:14 |
| ← saroy left | 16:19 |
| ← Dotz0cat left | 16:24 |
| ← spuz left | 16:28 |
| → bdeferme1 joined | 16:31 |
| → rpkilby joined | 16:33 |
| ← christall left | 16:33 |
| → christall joined | 16:34 |
| → guest8765 joined | 16:34 |
| ← rpkilby left | 16:36 |
|
guest8765
| came here to ask for public bug tracker to search for some issues.. found it in the topic desc! (: | 16:36 |
| ← christall left | 16:36 |
| → christall joined | 16:38 |
| ← christall left | 16:43 |
| ← guest8765 left | 16: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 joined | 16:56 |
| → roadie` joined | 16:57 |
| → wgrant joined | 16:58 |
|
cousteau
| lantech19446: shot in the dark: are you on Windows? Maybe the files have forbidden names | 16: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 free | 17:00 |
| ← roadie left | 17:00 |
| → christall joined | 17:00 |
|
lantech19446
| it's trying to say invalid path for chucky.jpg | 17:00 |
| ← enoq left | 17:00 |
|
cousteau
| OK, assuming neither of those files are more than 3 TiB in size... | 17:01 |
|
lantech19446
| they're like Kib | 17:01 |
|
mackerman
| Did you not clone into a new directory? clone is for grabbing the first copy of a remote. | 17:01 |
|
lantech19446
| I did | 17:01 |
|
| cousteau once had trouble with files named "aux.whatever" | 17:01 |
|
lantech19446
| yea i saw that when i was googling around for the error | 17:01 |
| → goldfish joined | 17:02 |
|
cousteau
| Apparently aux.c is not a valid file name on Windows. | 17:02 |
| → meator joined | 17: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.jpg | 17:04 |
| → Samian joined | 17: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 working | 17:05 |
|
| I'm just using git on powershell | 17:06 |
|
| I could try it on git bash i'm familiar with bash | 17:06 |
|
cousteau
| I recommend using git bash | 17: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 that | 17:07 |
|
lantech19446
| it was one of their recommended ways | 17:07 |
| ← goldfish left | 17: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 trouble | 17:08 |
| → jstein joined | 17:09 |
|
lantech19446
| same error and git restore fails too | 17:09 |
|
cousteau
| Huh | 17:09 |
| → Betal joined | 17:10 |
| ← EvilDMP left | 17:10 |
| ← ninjin left | 17:10 |
| → ninjin joined | 17:11 |
|
cousteau
| Honestly I don't think I can help here | 17:11 |
|
lantech19446
| error: invalid path 'images/chucky.jpg?_subject_uid=7888084&w=AAAfmveVu2oZofBbzRKou625rHOAD9ztRtM1Jyrs4Xh3Bw' | 17:11 |
|
| fatal: unable to checkout working tree | 17:11 |
|
cousteau
| Oh | 17: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 site | 17:12 |
|
cousteau
| File names can't contain "?" on Windows | 17: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 URL | 17:14 |
|
| You won't be able to have such a file in your PC | 17:14 |
|
lantech19446
| they don't even seem to be legitimate files on the server i'm not sure what the hell they're used for | 17: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 them | 17:16 |
|
lantech19446
| official word from my boss we don't need them anymore | 17: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 server | 17:16 |
|
cousteau
| If they were accidentally added you might even want to take them out of git's history by amending/rebasing commits | 17:17 |
|
| Or just delete them (using an OS/platform that supports those files) and commit | 17:18 |
|
lantech19446
| that's what i'm doing right now | 17:18 |
|
cousteau
| Or, instead of deleting them, rename them | 17:18 |
|
| Take out the ?... part | 17:18 |
|
| That way you can easily recover them, even on Windows | 17: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 site | 17:20 |
| ← Strom left | 17:20 |
|
lantech19446
| goddamnit it found another one of those files | 17:21 |
| → Strom joined | 17:22 |
| ← cousteau left | 17:24 |
|
lantech19446
| those images aren't even valid on linux, I have no fucking idea how they ever got displayed on our site | 17:24 |
| ← Samian left | 17:27 |
| ← ninjin left | 17:30 |
| ← shokohsc8 left | 17:30 |
| → ninjin- joined | 17:30 |
| ← roadie` left | 17:33 |
| → elf_fortrez joined | 17:33 |
| → roadie` joined | 17:33 |
|
lantech19446
| hazzah I have accomplished the task | 17:34 |
| ← meator left | 17:37 |
| ← samuelrajan747 left | 17:38 |
| → pretty_dumm_guy joined | 17:40 |
| → shokohsc8 joined | 17:42 |
| → hqdruxn08 joined | 17:47 |
| ← elf_fortrez left | 17:49 |
| ← ajfriesen left | 17:49 |
| ← gnoo left | 17:54 |
| → meator joined | 17:55 |
| → koolazer joined | 17:57 |
| ← meator left | 17:58 |
| → meator joined | 17: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 push | 17:59 |
| → Brumaire joined | 18:00 |
| ← meator left | 18:02 |
| → meator joined | 18:02 |
|
lantech19446
| never mind when I used git push # instead of -u origin master it worked | 18:05 |
| ← pretty_dumm_guy left | 18:07 |
| → stkrdknmibalz joined | 18:09 |
| ← Vooch left | 18:10 |
| → sniperwolf joined | 18:12 |
| → FabioP joined | 18:15 |
| → hbautista_ joined | 18:22 |
| → txtsd joined | 18:23 |
| → EvilDMP joined | 18:24 |
|
lantech19446
| so apparently some of my changes still didn't propagate | 18:28 |
|
| I don't get what the issue is | 18:28 |
| → pretty_dumm_guy joined | 18:31 |
| ← roadie` left | 18:33 |
| → Samian joined | 18:33 |
| → roadie` joined | 18:39 |
| → zumba_addict joined | 18:40 |
| ← EvilDMP left | 18:40 |
|
| j416 serves lantech19446 some tea. there there. | 18:40 |
|
j416
| triggered by profanity | 18:41 |
| ← tmz left | 18:41 |
| → tmz joined | 18: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 fine | 18:42 |
| → absc joined | 18:43 |
| ← meator left | 18:47 |
| → meator joined | 18:48 |
| ← APic left | 18:49 |
| → alfredb joined | 18:50 |
| → Hax0r joined | 18:51 |
| ← pmcnabb left | 18:57 |
| ← alfredb left | 19:05 |
| ← meator left | 19:07 |
| → meator joined | 19:08 |
| → odoood joined | 19: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 left | 19:13 |
| → kyshoc joined | 19:13 |
| ← kyshoc left | 19:13 |
| → kyshoc joined | 19:13 |
|
Torr
| In which binary format are they stored? | 19:14 |
| ← rahl left | 19:15 |
|
imMute
| Torr: https://git-scm.com/book/en/v2/Git-Internals-Git-Objects | 19:16 |
|
Torr
| Thank you | 19:16 |
| → bradyt joined | 19: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 either | 19:22 |
|
imMute
| "main branch"? | 19:22 |
|
ikke
| "The branch which shall not be named" | 19:22 |
|
bradyt
| yeah basically | 19:23 |
|
DoofusCanadensis
| upstream | 19:23 |
| → Dotz0cat joined | 19:23 |
|
DoofusCanadensis
| but that usually refers to the entire repository no any specific branch | 19:23 |
|
another|
| you-know-which-branch | 19:23 |
|
bradyt
| i feel like i accidentally used the term "upstream" when it's actually a completely different repo, only same ecosystem | 19:23 |
|
| these don't have any commits in common, if that makes sense | 19: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 irc | 19:24 |
|
| *humour | 19: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 main | 19:26 |
|
eschwartz
| why? | 19:27 |
|
bradyt
| like, you're not that good of a programmer? | 19:27 |
| → Dotz0cat_ joined | 19: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 left | 19:27 |
|
eschwartz
| consider e.g. "trunk" | 19:27 |
| ← Torr left | 19:27 |
|
DoofusCanadensis
| it's what github settled on | 19:27 |
|
bradyt
| i noticed "trunk" somewhere in docs | 19:27 |
|
| i think github offers "main", "trunk" and something else | 19:28 |
| Dotz0cat_ → Dotz0cat | 19:28 |
|
bradyt
| as ideas | 19:28 |
|
eschwartz
| $ cd git-git/; git log origin/main<TAB> -> origin/maint | 19:28 |
|
bradyt
| origin/roller-coaster | 19:28 |
|
twb
| eschwartz: I thought they were D/s people | 19: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 maint | 19:30 |
|
| so much muscle memory :/ | 19:30 |
|
bradyt
| huh, hadn't heard about their involvment with ICE, just AWS | 19:30 |
|
| *involvement | 19: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-flow | 19:32 |
|
bradyt
| SVN trunk | 19:32 |
|
DoofusCanadensis
| trunk belonged to SVN | 19:32 |
|
bookworm
| or you know... master | 19:32 |
|
DoofusCanadensis
| don't reuse it!!oneone | 19: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/929 | 19:33 |
|
| i guess they never suggested in renaming docs | 19:33 |
|
| "bleeding edge" seems too snarky for comments in tests | 19:34 |
|
DoofusCanadensis
| eschwartz: no, you can merge hotfixes into master as well with git-flow | 19: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 left | 19: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 joined | 19:38 |
|
DoofusCanadensis
| because git-flow was created when master was considered the default branch | 19:39 |
| ← roadie` left | 19:39 |
|
DoofusCanadensis
| ideally, you'd rename master to production and flow from develop to release to production | 19:39 |
|
| it was just a workflow that got designed and then popular | 19:41 |
|
| nobody says you have to use that | 19:42 |
| ← Gustavo6046 left | 19:50 |
| → qbit joined | 19:51 |
| → Gustavo6046 joined | 19:51 |
|
qbit
| hi! | 19:51 |
|
| can one tell a specific repo to always signoff ? i don't see a config options specifically for it | 19:52 |
|
| format.signOff ahh! | 19:52 |
| → nvmd joined | 19:55 |
|
qbit
| thanks :D | 19:55 |
| ← qbit left | 19:55 |
| ← nvmd left | 19:55 |
| → nvmd joined | 19: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
| heh | 19:58 |
|
| I used it briefly at the beginning and I like the concepts, but it didn't fit with our current workflow | 19:59 |
| → roadie` joined | 20:00 |
| → john_johnk joined | 20:01 |
| ← roadie` left | 20:05 |
| ← absc left | 20:06 |
| ← mei left | 20:09 |
| → dflick_ joined | 20:10 |
| ← dflick left | 20:12 |
| → absc joined | 20:12 |
| ← absc left | 20:15 |
| → absc joined | 20:17 |
| → roadie` joined | 20:19 |
| ← crabbedhaloablut left | 20:24 |
| ← roadie` left | 20:24 |
| → crabbedhaloablut joined | 20:24 |
| → cmc joined | 20:24 |
| ← durham left | 20:24 |
| → durham joined | 20:24 |
| ← john_johnk left | 20:27 |
| ← absc left | 20:30 |
| → john_johnk joined | 20:31 |
| → gadget joined | 20:32 |
| → clime joined | 20:34 |
| → durham_ joined | 20:34 |
| ← otisolsen70 left | 20:35 |
| ← durham left | 20:36 |
| → Guest71 joined | 20:49 |
| ← onizu left | 20:51 |
| → Lord_of_Life_ joined | 20:51 |
| ← Lord_of_Life left | 20:52 |
| Lord_of_Life_ → Lord_of_Life | 20:54 |
| → vysn joined | 20:56 |
| ← clime left | 20:58 |
| ← durham_ left | 21:01 |
| ← gh34 left | 21:02 |
| → durham joined | 21:02 |
| ← gadget left | 21:04 |
| → gadget joined | 21:04 |
| ← FFY00 left | 21:05 |
| ← furrymcgee left | 21: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` joined | 21:06 |
| → mago joined | 21:07 |
|
mago
| Hello need help | 21:07 |
|
| Im trying to push to a repository, the web interface wont let me upload the folder cuz its more than 25 mb | 21:07 |
|
| Im stuck at this command: git remote add origin https://github.com/yourUsername/yourRepository.git | 21:07 |
|
| Dond understant what should be in there.. I have a folder but not a git: | 21:07 |
| ← john_johnk left | 21:08 |
|
mago
| https://github.com/Formula-HP-Computer-Vision-on-Wheels/Group2 | 21:08 |
| → cweiss joined | 21: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 left | 21:13 |
| ← roadie` left | 21:13 |
| → ackyshake joined | 21:17 |
| ← gadget left | 21:19 |
| → gadget joined | 21:20 |
| ← mago left | 21:20 |
| ← austin987 left | 21:21 |
| → FFY00 joined | 21: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 joined | 21:24 |
| → roadie` joined | 21: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 joined | 21:26 |
| ← aniruddha left | 21:29 |
| ← roadie` left | 21:29 |
| ← alkino left | 21:30 |
| ← gxt left | 21:30 |
| ← Bayes left | 21:31 |
| → gxt joined | 21:32 |
| → ajfriesen joined | 21:32 |
| → anddam joined | 21:34 |
| → austin987 joined | 21: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 left | 21: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 it | 21:37 |
|
| This is a start: | 21:37 |
|
anddam
| osse: ok, no worries then | 21:38 |
|
osse
| git diff --name-only --diff-filter=A HEAD othercommit | 21:38 |
|
anddam
| I thought there was something like status --short | 21:38 |
|
osse
| The files among those that already exist on disk are the problem | 21:39 |
| ← AsenMx left | 21:39 |
|
anddam
| in my case I'll just grab stderr for lines starting with a tab | 21:39 |
|
| a bit of sed, a pinch of xargs and presto | 21: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? :P | 21:42 |
|
anddam
| long story | 21:43 |
|
| to make it short I am trying to create an impossible workflow | 21:44 |
|
| seems I am succeeding at that | 21:44 |
|
| osse: what effort? | 21:44 |
|
osse
| The effort og scripting it | 21:44 |
|
anddam
| osse: git checkout whatever-is-giving-conflicts 2>&1 | ag '^\t' | tr -d \\\t | xargs rm | 21:44 |
| → EvilDMP joined | 21:45 |
|
osse
| If that works well for you then I'm all for it | 21:47 |
| ← theoceaniscool left | 21: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 products | 21:51 |
|
m0viefreak
| :) | 21:51 |
|
| a build product that's suddenly checked in in another branch sounds strange | 21:52 |
| ← odoood left | 21:52 |
| → Quietus joined | 21:52 |
|
osse
| No I mean that such a clean command would also remove build products | 21:53 |
| ← Guest71 left | 21:53 |
|
m0viefreak
| ah, true | 21:53 |
|
anddam
| osse: it still doesn't | 21:54 |
|
m0viefreak
| what about simply `git checkout -f` then? | 21:54 |
|
| it should simply overwrite everything without question | 21:55 |
| ← zumba_addict left | 21: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 like | 21:55 |
|
| osse: going through git would mean continuously committing on one side and pulling on the other | 21:55 |
|
osse
| m0viefreak: ooh, perfect | 21: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 others | 21: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 joined | 22:03 |
| ← Brumaire left | 22:04 |
| → christall joined | 22:05 |
| ← EvilDMP left | 22:06 |
| ← jwillikers left | 22:06 |
| → EvilDMP joined | 22:08 |
| → mago joined | 22:10 |
|
mago
| Im having trouble pushing.. | 22:10 |
|
| HELP SOS | 22:10 |
|
| fatal: the remote end hung up unexpectedly | 22:10 |
| ← Lord_of_Life left | 22:10 |
|
mago
| First I got that, then i increased the buffer.. | 22:10 |
|
| git config http.postBuffer 999288000 | 22:11 |
|
| Tried some random values.. | 22:11 |
|
| Then I get that: | 22:11 |
|
| fatal: protocol error: bad line length 81920.72 MiB/s | 22:11 |
| → Lord_of_Life joined | 22: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 left | 22: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 morning | 22:14 |
| → molt joined | 22:14 |
|
mago
| If you are up for it you could help me.. | 22:14 |
| ← cmc left | 22:15 |
| → cmc joined | 22:15 |
|
lantech19446
| I can try, what do you need help with? | 22:16 |
| → odoood joined | 22: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 left | 22: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/Group2 | 22:19 |
|
| Im following those steps: | 22:21 |
|
| https://github.community/t/how-to-upload-an-entire-folder/1056/7 | 22:21 |
|
lantech19446
| I don't get why you'd push it twice | 22: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 unexpectedly | 22:23 |
|
| Then i increase the buffer: git config http.postBuffer 999288000 | 22:23 |
|
| Then I get: fatal: protocol error: bad line length 81920.72 MiB/s | 22:23 |
|
lantech19446
| this might be completely off the mark but make sure that openssh is installed | 22: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 shot | 22:24 |
| ← Bombe left | 22:25 |
| → Bombe joined | 22: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 left | 22: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 windows | 22: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 new | 22: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 help | 22: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 morning | 22: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 channels | 22:30 |
|
mago
| kyshoc no | 22:31 |
|
eschwartz
| that is true | 22:31 |
|
mago
| git clone is easy but git push OMG | 22:31 |
|
lantech19446
| I knew i recognized your nick I just couldn't place it right away I haven't been very active in there recently | 22:31 |
|
eschwartz
| to be fair, neither have I | 22: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 relax | 22:32 |
| → roadie` joined | 22:33 |
| → forgotmynick joined | 22: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 correct | 22:33 |
|
lantech19446
| oh that's not that big man I did close to a gig earlier and it worked | 22:34 |
|
mago
| The biggest file is like 60 Mb I think | 22:34 |
|
| The folder is 540 MB kyshoc | 22:35 |
|
kyshoc
| okay, that should be fine — just fyi though, GitHub itself (not git) has a hard limit of 100MB per file | 22:36 |
|
| cool, that should be fine too | 22:36 |
|
lantech19446
| huh I'm glad you said that kyshoc cuz i had no idea | 22:36 |
|
kyshoc
| mago: what's your git version (run `git --version` to check)? | 22:37 |
|
mago
| git version 2.25.1 | 22:37 |
| ← roadie` left | 22: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-files | 22:38 |
|
mago
| After unsetting the buffer I get: fatal: the remote end hung up unexpectedly | 22:38 |
|
| Could it be a permissions issue? | 22:38 |
|
lantech19446
| thanks kyshoc | 22:39 |
| → lechner joined | 22:40 |
|
mago
| It says I have direct acces and that i am admin | 22: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 on | 22:42 |
|
mago
| Ok | 22:43 |
| ← keypusher left | 22:43 |
| ← palasso left | 22:45 |
| → kaisyu joined | 22:48 |
| → johnny joined | 22:48 |
| → Adoi joined | 22:49 |
| ← EvilDMP left | 22: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 differences | 22:51 |
| ← sniperwolf left | 22:53 |
| ← Samian left | 22:55 |
| ← lgc left | 22:55 |
| → keypusher joined | 22:55 |
| ← Gurkenglas left | 22:56 |
| ← wender left | 22:56 |
|
mago
| kyshoc thats what i get: | 22:56 |
|
| https://pastebin.com/raw/yctitubT | 22:56 |
| ← odoood left | 22:57 |
|
mago
| The 1.49GB seems off, i only got <600Mb, but i did run a command thrice i think.. | 22:57 |
| ← jstein left | 22:59 |
| ← molt left | 23:00 |
| → molt joined | 23:01 |
|
mago
| Did someone get to have a look at the paste? | 23:02 |
| ← pizdets_ left | 23:02 |
| → pizdets joined | 23: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- joined | 23:05 |
| ← keypusher left | 23:05 |
| ← Adoi left | 23:06 |
| → fstd joined | 23:06 |
| keypushe- → keypusher | 23:08 |
| → howdoi joined | 23: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 joined | 23:09 |
|
mago
| kyshoc is just that when I do: git push origin master | 23:09 |
|
| The number of objects and the size doesnt seem to match with what im actually uploading.. | 23:09 |
| ← christall left | 23:10 |
| → christall joined | 23:11 |
| ← vdamewood left | 23: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 history | 23:13 |
|
mago
| Ok | 23:13 |
| ← christall left | 23: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 joined | 23:14 |
|
mago
| https://pastebin.com/raw/5wyszTDm | 23:15 |
|
kyshoc
| okay, yeah having two commits might be contributing | 23: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 cause | 23:16 |
|
mago
| Ok, that and then rerun the command i was using? Something silly like what? | 23:17 |
| ← natrys left | 23:17 |
|
kyshoc
| correct, run that git config I just shared, then try `git push origin master` again | 23:18 |
|
mago
| kyshoc usually higher version number is better isnt it? | 23:18 |
| ← vysn left | 23:19 |
|
kyshoc
| usually, but not always :-) | 23:20 |
| ← beshr left | 23:21 |
| ← humanface left | 23:23 |
|
mago
| kyshoc i s the command: git push -u origin master | 23:25 |
|
| the same? | 23:25 |
|
kyshoc
| yes, that'll work! | 23:25 |
|
mago
| i got error again | 23:25 |
|
| fatal: the remote end hung up unexpectedly | 23:25 |
|
| Everything up-to-date | 23:25 |
| → Guest23 joined | 23:30 |
| → Xenguy joined | 23:30 |
| ← mago left | 23:33 |
| ← FFY00 left | 23:34 |
| → bambanxx joined | 23:34 |
| → fabio__ joined | 23:34 |
| → platta joined | 23:35 |
| ← FabioP left | 23:39 |
| ← Guest23 left | 23:39 |
| → beshr joined | 23:44 |
| → FFY00 joined | 23:45 |
| ← FFY00 left | 23:47 |
| → FFY00 joined | 23:48 |
| ← FFY00 left | 23:49 |
| ← cliluw left | 23:54 |
| → durham_ joined | 23:57 |
| ← durham left | 23:57 |
| ← durham_ left | 23:59 |
| → durham joined | 23:59 |