| 2022-04-06 |
| ← causa_sui left | 00:01 |
|
parsnip
| https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/more | 00:01 |
| → Xenguy joined | 00:01 |
| → rgrinberg joined | 00:01 |
|
shailangsa
| going to use git bash as that resolves the issue though | 00:01 |
|
parsnip
| i would avoid cmd.exe, i thought PowerShell is the future on Windows | 00:02 |
| → causa_sui joined | 00:02 |
|
Gustavo6046
| wait, windows has a future? | 00:02 |
|
parsnip
| poor choice of words :-P | 00:03 |
| ← epony left | 00:03 |
| → chenqisu1 joined | 00:03 |
|
Gustavo6046
| you sure? | 00:03 |
|
| :P | 00:03 |
|
| i think the Windows market share might actually go down in the following years | 00:04 |
| → epony joined | 00:04 |
|
Gustavo6046
| but the details of that are a conversation for another channel | 00:04 |
|
parsnip
| one can dream | 00:04 |
|
Gustavo6046
| lol | 00:04 |
|
parsnip
| pros and cons | 00:04 |
|
Gustavo6046
| yeah true, they all have pros and cons | 00:04 |
|
| it's hard to tell with linux because there are so many damn distros | 00:05 |
|
| currently i'm using garuda | 00:05 |
| ← epony left | 00:05 |
|
Gustavo6046
| emphasis on I – it might not be the better choice for that many people | 00:05 |
| → duxsco joined | 00:05 |
|
Gustavo6046
| it's neat, i'd say it's like one of them easy-to-use derivates of arch linux, but without manjaro's quirks, and a few other interesting features on top | 00:06 |
|
| it's far from perfect though, and honestly everything ever is | 00:06 |
| ← causa_sui left | 00:06 |
| ← mud left | 00:08 |
| ← gurkenglas left | 00:13 |
| ← pulse left | 00:19 |
| → causa_sui joined | 00:29 |
| → plugwash joined | 00:32 |
|
plugwash
| i'm trying to set up git clone and getweb access with apache, gitweb is working but git clone is not, apache seems to be ignoring the scriptaliasmatch directive and I've no clue why | 00:33 |
|
| any idea how to debug this? | 00:33 |
| → geowiesnot joined | 00:33 |
| ← causa_sui left | 00:33 |
| ← geowiesnot left | 00:43 |
|
plugwash
| nm I was looking at the wrong logfile, the access log was just saying 404, but the error log had more info. | 00:46 |
| → causa_sui joined | 00:52 |
| ← vicfred left | 00:55 |
| williewillus1 → williewillus | 00:57 |
| ← causa_sui left | 00:58 |
| ← MrMagic left | 01:00 |
| ← Yruama left | 01:02 |
| → pulse joined | 01:07 |
| → sa0 joined | 01:09 |
| → causa_sui joined | 01:14 |
| ← wonko-the-sane left | 01:16 |
| ← dermoth left | 01:16 |
| → vysn joined | 01:18 |
| ← causa_sui left | 01:21 |
| → wonko-the-sane joined | 01:23 |
| → causa_sui joined | 01:25 |
| → Jack_shat joined | 01:29 |
| → dermoth joined | 01:29 |
| ← Jack_shat left | 01:30 |
| ← wonko-the-sane left | 01:31 |
| ← causa_sui left | 01:33 |
| ← sa0 left | 01:41 |
| ← srinidhi left | 01:42 |
| → wonko-the-sane joined | 01:43 |
| ← jinsun left | 01:44 |
| → xiongxin joined | 01:45 |
|
quartz
| Hello. I'm still having this problem where I can't stop git from tracking my directory. I get this error: https://ibb.co/QcLZGvX | 01:46 |
|
| I'm using the command git rm -r --cached but it's telling me the directory did not match any files. | 01:46 |
| → anaveragehuman joined | 01:47 |
| → Gustavo6046_ joined | 01:48 |
| → humanBird joined | 01:48 |
| ← Gustavo6046 left | 01:50 |
| → Pseudocrat joined | 01:51 |
| → epony joined | 01:51 |
| ← Gustavo6046_ left | 01:51 |
| → Gustavo6046 joined | 01:51 |
| ← fling left | 01:54 |
| → MrMagic joined | 01:56 |
| → fling joined | 01:56 |
|
BSaboia
| I have a branch which is already pushed. In this branch I accidentally pasted some credentials on a file that should not have them. The branch is mine. I cannot delete the file. What should I do in this case? | 01:57 |
| → Gustavo6046_ joined | 02:00 |
| ← junktext left | 02:01 |
| ← Gustavo6046 left | 02:01 |
| ← Gustavo6046_ left | 02:01 |
| → Gustavo6046 joined | 02:02 |
|
mackerman
| BSaboia: Change the credentials, delete the old ones, and push the deletion to all known remotes | 02:03 |
|
BSaboia
| mackerman, they are not really credentials. It's my login. But I don't want it to be in the code, nor reflog. So I cannot really change it | 02:05 |
|
mackerman
| Secrets that have been git add-ed are compromised. | 02:06 |
| ← vysn left | 02:07 |
| ← xiongxin left | 02:08 |
| → xiongxin joined | 02:08 |
| → mud joined | 02:09 |
|
mackerman
| You can edit history and purge all known references if you like. I still consider such secrets comprmised and should be changed. | 02:09 |
| ← quartz left | 02:09 |
|
BSaboia
| mackerman, I cannot really change my login. It's my private email. I just didn't want it to be accessible in this company's (private) repo. But not super relevant | 02:11 |
|
mackerman
| Only the email, not auth details? That is not credentials then. | 02:11 |
|
| Email in some file's content, or author or committer email? | 02:13 |
|
| The latter you can hide with man gitmailmap | 02:13 |
|
gitinfo
| the gitmailmap manpage is available at https://gitirc.eu/gitmailmap.html | 02:13 |
| → gco joined | 02:18 |
| ← mannequin left | 02:18 |
| ← jimklimov left | 02:19 |
| ← relight left | 02:21 |
| ← Gustavo6046 left | 02:22 |
| ← humanBird left | 02:24 |
| → causa_sui joined | 02:24 |
| → kaiseisei joined | 02:26 |
| ← gco left | 02:30 |
| → Gustavo6046 joined | 02:30 |
| ← pulse left | 02:30 |
| ← Gustavo6046 left | 02:32 |
| ← coaxing left | 02:32 |
| ← causa_sui left | 02:32 |
| → Gustavo6046 joined | 02:33 |
| → jimklimov joined | 02:33 |
| → causa_sui joined | 02:34 |
| → xiongxin1 joined | 02:36 |
| ← xiongxin left | 02:36 |
| xiongxin1 → xiongxin | 02:36 |
| ← causa_sui left | 02:39 |
| ← xiongxin left | 02:53 |
| → causa_sui joined | 02:55 |
| ← subopt left | 02:56 |
| ← fling left | 02:59 |
| → jclsn0 joined | 03:00 |
| → fling joined | 03:00 |
| ← bloody left | 03:01 |
| ← jclsn left | 03:02 |
| ← causa_sui left | 03:03 |
| → donofrio joined | 03:06 |
| → adhawkins_ joined | 03:14 |
| ← adhawkins left | 03:15 |
| adhawkins_ → adhawkins | 03:15 |
| ← donofrio left | 03:16 |
| ← jkl left | 03:17 |
| → jkl joined | 03:18 |
| → xiongxin joined | 03:26 |
|
BSaboia
| mackerman, file's content | 03:27 |
| ← xiongxin left | 03:36 |
| → humanBird joined | 03:37 |
| ← jimklimov left | 03:38 |
| → sa0 joined | 03:39 |
| ← sudoforge left | 03:43 |
| → nosolls1 joined | 03:50 |
| → Xenguy_ joined | 03:51 |
| → hbautista joined | 03:52 |
| ← nosolls1 left | 03:53 |
| ← Xenguy left | 03:54 |
| → causa_sui joined | 03:54 |
| ← plugwash left | 03:57 |
| → saroy joined | 03:58 |
| ← travisghansen left | 04:02 |
| ← fling left | 04:03 |
| ← causa_sui left | 04:03 |
| ← splud left | 04:04 |
| ← tyson2 left | 04:04 |
| → travisghansen joined | 04:04 |
| → xiongxin joined | 04:04 |
| → fling joined | 04:05 |
| ← cdown left | 04:06 |
| → cdown joined | 04:07 |
| ← Murr left | 04:07 |
| → Murr joined | 04:08 |
| → The_Blode joined | 04:10 |
| ← sa0 left | 04:11 |
| ← rgrinberg left | 04:14 |
| ← cdown left | 04:18 |
| ← Gustavo6046 left | 04:21 |
| → splud joined | 04:21 |
| ← The_Blode left | 04:23 |
| ← analoq left | 04:24 |
| → rgrinberg joined | 04:24 |
| ← splud left | 04:26 |
| → analoq joined | 04:26 |
| ← gast0n left | 04:27 |
| ← xiongxin left | 04:29 |
| → cdown joined | 04:33 |
| → The_Blode joined | 04:37 |
| → splud joined | 04:41 |
| ← splud left | 04:43 |
| → splud joined | 04:43 |
| → jimklimov joined | 04:50 |
| ← seifeslimene left | 04:51 |
| → jimklimov1 joined | 04:52 |
| ← rgrinberg left | 04:53 |
| → causa_sui joined | 04:54 |
| ← jimklimov left | 04:55 |
| → madewokherd` joined | 04:58 |
| ← causa_sui left | 04:58 |
| → causa_sui joined | 04:59 |
| ← madewokherd left | 05:00 |
| → c4017_ joined | 05:02 |
| ← ChmEarl left | 05:02 |
| ← causa_sui left | 05:04 |
| ← c4017 left | 05:05 |
| ← fling left | 05:07 |
| → fling joined | 05:08 |
| ← hbautista left | 05:09 |
| → vanessa joined | 05:17 |
| → jinsun joined | 05:19 |
| ← zebrag left | 05:22 |
| ← thiago left | 05:22 |
| → jusski joined | 05:28 |
| → vysn joined | 05:29 |
| ← bindu left | 05:32 |
|
jusski
| i am executing | 05:33 |
|
| git checkout main -- some_file | 05:33 |
|
| but im still seeing it in | 05:33 |
|
| git diff --name-only main | 05:33 |
|
| what i am doing wrong? | 05:33 |
| → bindu joined | 05:34 |
|
jusski
| no changes in staged | 05:35 |
|
parsnip
| what are the changes? merge conflict? | 05:36 |
|
| > The index may contain unmerged entries because of a previous failed merge. By default, if you try to check out such an entry from the index, the checkout operation will fail and nothing will be checked out. Using -f will ignore these unmerged entries. | 05:37 |
|
| -- https://git-scm.com/docs/git-checkout | 05:37 |
|
| damn, as complicated as git is, the documentation is pretty good | 05:39 |
| ← great_taste left | 05:39 |
|
jusski
| git merge main writes already up to date | 05:44 |
| → xiongxin joined | 05:45 |
|
jusski
| oh my bad, this file does not exists in main branch | 05:47 |
|
| somebody moved it to another folder | 05:47 |
|
parsnip
| dang, i'm not so good at diagnosing | 05:49 |
| → mannequin joined | 05:53 |
| ← jimklimov1 left | 05:55 |
| → walterwhip joined | 05:55 |
| → _9pfs joined | 05:55 |
| → roadie joined | 05:56 |
| → kenanmarasli joined | 05:59 |
| → causa_sui joined | 05:59 |
| → mexen joined | 06:00 |
| ← anaveragehuman left | 06:03 |
| ← causa_sui left | 06:04 |
| ← xiongxin left | 06:06 |
| ← Murr left | 06:07 |
| → Murr joined | 06:07 |
| → anaveragehuman joined | 06:08 |
| → Sh4dowmonk joined | 06:09 |
| → causa_sui joined | 06:09 |
| → mattil joined | 06:12 |
| bkircher_afk → bkircher | 06:12 |
| ← causa_sui left | 06:14 |
| → _vanessa_ joined | 06:14 |
| _vanessa_ → vanesaa | 06:16 |
| ← vanessa left | 06:17 |
| → _vanessa_ joined | 06:18 |
| → otisolsen70 joined | 06:19 |
| ← vanesaa left | 06:21 |
| → szymon joined | 06:23 |
| → xiongxin joined | 06:23 |
| ← szymon left | 06:24 |
| → ^vanessa^ joined | 06:24 |
| → causa_sui joined | 06:25 |
| → duxco joined | 06:25 |
| ← duxsco left | 06:26 |
| duxco → duxsco | 06:26 |
| → EvilDMP joined | 06:26 |
| ← _vanessa_ left | 06:27 |
| → _vanessa_ joined | 06:27 |
| ← ^vanessa^ left | 06:30 |
| ← causa_sui left | 06:34 |
| → palasso joined | 06:38 |
| ← xiongxin left | 06:40 |
| → jimklimov joined | 06:42 |
| → coot joined | 06:44 |
| ← jimklimov left | 06:46 |
| → TheCatBehemoth joined | 06:46 |
| → srinidhi joined | 06:51 |
| → sondr3 joined | 06:54 |
| → dionysus69 joined | 06:55 |
| → causa_sui joined | 06:59 |
| ← Sh4dowmonk left | 07:02 |
| ← causa_sui left | 07:04 |
| → feriman joined | 07:08 |
| ← Misotauros left | 07:09 |
|
thomas25
| I've created a branch from master. I've also checked out the master (M1) at this point. I've added a single file to branch and merged it back to master. Now, I've also made some modifications to M1. How do I push the changes I've made? (the master at the remote origin is now ahead of my local copy) | 07:09 |
| ← _9pfs left | 07:10 |
| ← fling left | 07:10 |
| → _9pfs joined | 07:11 |
| ← duxsco left | 07:12 |
| ← _9pfs left | 07:12 |
| → fling joined | 07:13 |
| → _9pfs joined | 07:13 |
| → iomari891 joined | 07:13 |
| → Sh4dowmonk joined | 07:14 |
| ← skapata left | 07:15 |
|
cbreak
| thomas25: merge or rebase | 07:15 |
| → a1eaiactaest joined | 07:16 |
|
cbreak
| or create a new branch and push that | 07:16 |
|
thomas25
| yeah i've followed the hints git gives me but i wish this was more intuitive, still feels like walking in the dark | 07:16 |
| ← _vanessa_ left | 07:23 |
| → causa_sui joined | 07:24 |
| → MajorBiscuit joined | 07:24 |
| ← sondr3 left | 07:25 |
| ← wonko-the-sane left | 07:25 |
| → vimal joined | 07:27 |
| ← causa_sui left | 07:28 |
| → causa_sui joined | 07:29 |
| ← causa_sui left | 07:34 |
| → jimklimov joined | 07:34 |
| → fillx joined | 07:43 |
| → ___nick___ joined | 07:45 |
| → sondr3 joined | 07:49 |
| → wakeup joined | 07:50 |
| → causa_sui joined | 07:54 |
| → Shentino_ joined | 07:55 |
| ← _9pfs left | 07:55 |
| ← Shentino left | 07:56 |
| → zeenk joined | 07:56 |
| Shentino_ → Shentino | 07:56 |
| → _9pfs joined | 07:57 |
| → wonko-the-sane joined | 07:57 |
| → tulpa_ joined | 07:58 |
| ← causa_sui left | 07:58 |
| → causa_sui joined | 07:59 |
| → donofrio joined | 08:00 |
| ← causa_sui left | 08:04 |
| → Haohmaru joined | 08:06 |
| ← donofrio left | 08:06 |
| ← kaiseisei left | 08:08 |
| → kaiseisei joined | 08:08 |
| → sa0 joined | 08:09 |
| → geosmileus joined | 08:11 |
| → AnapodoPsalidaki joined | 08:11 |
| ← kenanmarasli left | 08:12 |
| ← geosmile left | 08:12 |
| → Sazhen86 joined | 08:13 |
| ← AnapodoPsalidi left | 08:13 |
| ← fling left | 08:15 |
| ← chenqisu1 left | 08:15 |
| ← MajorBiscuit left | 08:16 |
| ← fillx left | 08:16 |
| ← _9pfs left | 08:17 |
| → fling joined | 08:17 |
| → MajorBiscuit joined | 08:18 |
| → ilogger2 joined | 08:40 |
| → duxsco joined | 08:41 |
| → thomas25 joined | 08:42 |
| → Sulky joined | 08:43 |
| → swistak joined | 08:45 |
| → DNH joined | 08:46 |
| → Misotauros joined | 08:46 |
| → donofrio joined | 08:52 |
| → Cork joined | 08:52 |
| → ueberall joined | 08:54 |
| → synthmeat joined | 08:57 |
| → gas51627 joined | 08:58 |
| → causa_sui joined | 08:59 |
| → omero joined | 08:59 |
| → wonko-the-sane joined | 08:59 |
| → MajorBiscuit joined | 09:01 |
| ← causa_sui left | 09:04 |
| ← Sulky left | 09:14 |
| ← duxsco left | 09:17 |
| → Sulky joined | 09:17 |
| → fling joined | 09:21 |
| → Sh4dowmonk joined | 09:22 |
| ← Sulky left | 09:22 |
| → Sulky joined | 09:23 |
| → gurkenglas joined | 09:24 |
| → causa_sui joined | 09:24 |
| → zen_coder joined | 09:27 |
|
zen_coder
| with "git diff HEAD^ --name-only" I can see all files changes of current commit | 09:28 |
| → adgtl joined | 09:28 |
|
zen_coder
| how can I see what files were removed in current commit? | 09:28 |
|
ikke
| --diff-filter=D | 09:28 |
| ← causa_sui left | 09:28 |
| ← Sulky left | 09:29 |
| → causa_sui joined | 09:29 |
| → Sulky joined | 09:29 |
| → squirrel joined | 09:29 |
|
zen_coder
| ikke: thx, how can I filter out the deleted files, and show only modified and added? | 09:32 |
|
selckin
| you read the diff-filter option manual | 09:33 |
|
ikke
| man git diff | 09:33 |
|
gitinfo
| the git-diff manpage is available at https://gitirc.eu/git-diff.html | 09:33 |
| ← causa_sui left | 09:34 |
| → Sulky_ joined | 09:34 |
| ← Sulky left | 09:37 |
| → Sulky__ joined | 09:40 |
|
zen_coder
| I am doing now: "git diff HEAD^ --name-only --diff-filter=ACMRTUXB" | 09:42 |
| ← Sulky_ left | 09:42 |
|
ikke
| --diff-filter=d | 09:43 |
|
| "Also, these upper-case letters can be downcased to exclude." | 09:43 |
| → john_johnk joined | 09:43 |
| → zer0bitz joined | 09:48 |
| → gildasio joined | 09:52 |
| → dsrt^ joined | 09:53 |
| → causa_sui joined | 09:59 |
| → bluepenquin_ joined | 10:00 |
| → Willtech joined | 10:01 |
| → sa0 joined | 10:02 |
| ← wonko-the-sane left | 10:03 |
| → wonko-th1-sane joined | 10:03 |
| ← causa_sui left | 10:04 |
| → mic4ael joined | 10:06 |
| → Sazhen86 joined | 10:07 |
| → Murr joined | 10:07 |
| ← john_johnk left | 10:11 |
| → c4017 joined | 10:12 |
| ← Sazhen86 left | 10:18 |
| → john_johnk joined | 10:20 |
| ← fling left | 10:23 |
| → fling joined | 10:23 |
| → causa_sui joined | 10:24 |
| → analpaper joined | 10:26 |
| ← analpaper left | 10:26 |
| → analpaper joined | 10:26 |
| → parsnip joined | 10:29 |
| → vitali64 joined | 10:32 |
| ← causa_sui left | 10:33 |
| → causa_sui joined | 10:34 |
| ← causa_sui left | 10:43 |
| ← john_johnk left | 10:45 |
| → ecraven joined | 10:46 |
|
ecraven
| hello ;) I'd like to find the commit that removed a file from a directory. I know the directory, but not the exact file name. is there a way to show *all* filenames that have existed in a directory, and then to find the commit that removes that file? | 10:47 |
| → enoq joined | 10:47 |
| → john_johnk joined | 10:48 |
|
j416
| ecraven: git log -- path | 10:48 |
|
| ecraven: git log --name-only --path | 10:48 |
|
| er | 10:48 |
|
| ecraven: git log --name-only -- path | 10:48 |
|
ecraven
| thanks! | 10:49 |
| → vishal joined | 10:49 |
|
ecraven
| perfect, thanks! | 10:50 |
| → tyson2 joined | 10:51 |
| → The_Blode joined | 10:51 |
| ← john_johnk left | 10:52 |
| ← Misotauros left | 10:53 |
| ← sa0 left | 10:55 |
| → john_johnk joined | 10:55 |
| → sa0 joined | 10:55 |
| → apo joined | 10:56 |
|
canton7
| ecraven, You might want --name-status, to show when each file was added/deleted/modified | 10:59 |
| → rsx joined | 11:00 |
|
ecraven
| really cool that this is so simple, thanks again ;) | 11:00 |
|
osse
| ecraven, j416: perhaps --diff-filter=D can do some work here too | 11:01 |
|
| to only show commits that delete something | 11:01 |
| ← zen_coder left | 11:03 |
| → lpapp joined | 11:04 |
|
lpapp
| hi, is it possible to pull the pre-receive hook code from the server to a client? | 11:04 |
|
| To see why it might reject things | 11:04 |
|
| Probably not as this could expose vulnerabilities | 11:04 |
|
ikke
| no, git does not expose it | 11:05 |
| → kenan-office joined | 11:05 |
|
lpapp
| ok, thanks, getting remote: GitLab: You can only use an existing protected branch ref as the basis of a new protected branch. | 11:07 |
|
| but I do push a branch based on a protected branch, so was surprised what is going on, and it is ok from the gitlab ui | 11:07 |
|
| but I guess it is a question for #gitlab | 11:07 |
| → bartman joined | 11:11 |
| → iomari891 joined | 11:13 |
| → zmt00 joined | 11:14 |
| → coaxing joined | 11:22 |
| ← iomari891 left | 11:23 |
| → causa_sui joined | 11:24 |
| → eroux joined | 11:26 |
| ← causa_sui left | 11:29 |
| → causa_sui joined | 11:29 |
| → menace joined | 11:34 |
| ← menace left | 11:34 |
| ← causa_sui left | 11:34 |
| ← Sh4dowmonk left | 11:39 |
| → nyah joined | 11:40 |
| → causa_sui joined | 11:44 |
| ← causa_sui left | 11:49 |
| → geowiesnot joined | 11:49 |
| → bertvvvs joined | 11:51 |
| ← mic4ael left | 11:56 |
| → causa_sui joined | 11:59 |
| ← geowiesnot left | 12:03 |
| ← causa_sui left | 12:04 |
| → mic4ael joined | 12:05 |
| ← kenan-office left | 12:07 |
| → wakeup joined | 12:13 |
| ← dsrt^ left | 12:17 |
| → MrMagic joined | 12:18 |
| → Misotauros joined | 12:20 |
| → bloody joined | 12:21 |
| → v9fk1yn3nu joined | 12:35 |
| → sondr3 joined | 12:36 |
| → casaca joined | 12:42 |
| → dimi1947 joined | 12:46 |
| ← Sulky__ left | 12:51 |
| → causa_sui joined | 12:54 |
| → Sulky__ joined | 12:55 |
| → feriman joined | 12:56 |
| ← feriman left | 12:57 |
| → AbleBacon joined | 12:57 |
| → feriman joined | 12:57 |
| ← causa_sui left | 12:59 |
| ← dimi1947 left | 12:59 |
| → zen_coder joined | 13:00 |
| → duxsco joined | 13:02 |
| → causa_sui joined | 13:04 |
| ← feriman left | 13:05 |
| ← Misotauros left | 13:06 |
| → feriman joined | 13:06 |
| → iomari891 joined | 13:11 |
| → pulse joined | 13:11 |
| → cdown_ joined | 13:18 |
| → kenanmarasli joined | 13:20 |
| cdown_ → cdown | 13:20 |
| → randm joined | 13:22 |
| → dimi1947 joined | 13:25 |
| ← randm left | 13:27 |
| → randm joined | 13:27 |
| ← fling left | 13:35 |
| → thiago joined | 13:36 |
| → fling joined | 13:37 |
| ← duxsco left | 13:44 |
| ← v9fk1yn3nu left | 13:45 |
| → defjam joined | 13:51 |
| → quartz joined | 13:55 |
| ← squirrel left | 13:59 |
| → Yruama joined | 14:02 |
| ← iomari891 left | 14:02 |
| → zebrag joined | 14:07 |
| ← Murr left | 14:07 |
| → Xenguy__ joined | 14:07 |
| → Murr joined | 14:07 |
| ← gurkenglas left | 14:08 |
| ← Willtech left | 14:08 |
| → Willtech joined | 14:09 |
|
quartz
| Hello. I'm trying to remove an entire directory from being tracked by git. I'm using the command git rm -r --cached /home/nick/Desktop/Columbia\ 2022 but I get the error: fatal: pathspec '/home/nick/Desktop/Columbia 2022' did not match any files | 14:09 |
|
| Sorry to ask this again in here, I'm just not sure how to resolve this. | 14:09 |
| ← lpapp left | 14:10 |
| → structoha joined | 14:13 |
|
canton7
| quartz, is that path right? It implies that your whole Desktop is a git reop? | 14:16 |
|
| *a git repo | 14:16 |
| ← Sulky__ left | 14:22 |
|
mackerman
| quartz: Have you committed the removal of that from the staging area? From previously, as git rm doesn't think it is there anymore | 14:22 |
|
| git status would show any differences | 14:22 |
|
quartz
| Uhhh | 14:22 |
|
| No, it's just that one folder "Columbia 2022" | 14:24 |
|
| Which is located on the desktop | 14:24 |
|
mackerman
| If the repo is only one folder, do you want to track it git any more? | 14:24 |
|
quartz
| mackerman: Sorry I'm new to git. I want to keep the folder "Columbia 2022" on my desktop, I just want git to stop tracking it | 14:24 |
|
| mackerman: No. I'm not sure what I did honestly. The repo and the folder are nothing alike | 14:25 |
|
mackerman
| In other words, do you plan to use this git repo any more? | 14:25 |
|
quartz
| mackerman: No | 14:25 |
|
mackerman
| Then back the folder up and delete the .git directory in it | 14:25 |
|
quartz
| When I do "ls" I don't see a .git directory | 14:26 |
| → a1eaiactaest joined | 14:26 |
|
canton7
| quartz, so "Columbia 2022" is a git repository, and you want to stop it from being a git repository? | 14:26 |
|
mannequin
| well i use git quite a while now | 14:27 |
|
| and i can say | 14:27 |
|
| man it's smart | 14:27 |
|
canton7
| 'ls' doesn't show hidden files and folders, and since '.git' starts with a '.', it's considered hidden. Use 'ls -a' | 14:27 |
|
quartz
| canton7: No, Columbia 2022 is not a git repository. Honeslty I'm not sure wtf I did | 14:27 |
|
| This is so confusing to me lol I'm new to git | 14:27 |
|
| Sorry | 14:27 |
|
mackerman
| What did you think you were telling git to remove ? | 14:27 |
|
quartz
| mackerman: I just want git to stop tracking my folder "columbia 2022" | 14:28 |
|
canton7
| quartz, can you cd into 'Columbia 2022' and run 'git rev-parse --show-toplevel' ? | 14:28 |
| ← structoha left | 14:28 |
|
canton7
| (and tell us what the output is?) | 14:28 |
|
quartz
| canton7: Ahh I see the .git file! | 14:28 |
|
| OK | 14:28 |
|
| canton7: /home/nick/Desktop/Columbia 2022 | 14:29 |
| → sentriz joined | 14:29 |
|
canton7
| Right, so 'Columbia 2022' *is* a git repository, and you should find the folder 'Columbia 2022/.git' | 14:30 |
|
| (something is a git repostiory if it or one of its parents has a .git dir in it) | 14:30 |
|
quartz
| Ahhh OK | 14:31 |
|
| So I should run the command git rm -r --cached in that .git directory? | 14:31 |
|
canton7
| No | 14:31 |
|
| Let's just confirm what you want first. Are you sure that you want to stop 'Columbia 2022' from being a git repository? That means if you made any commits, etc, in that folder, those will be lost | 14:32 |
|
quartz
| canton7: Yes, I literally have no need for it. | 14:32 |
|
canton7
| Cool, just delete the .git dir them. 'rm -rf .git' | 14:32 |
| → warblr joined | 14:32 |
|
quartz
| I was trying to commit ONE file to a repository for school, and I wanted to do it from my terminal | 14:32 |
|
| well, I totally messed up, as you can tell | 14:33 |
|
| I just don't want the folder "Columbia 2022" to be deleted | 14:33 |
|
mackerman
| What repo did you intend to use? | 14:33 |
|
quartz
| I just want git to stop tracking it | 14:33 |
|
canton7
| Yep, if you run 'rm -rf .git' from inside the 'Columbia 2022' folder, then you'll just delete 'Columbia 2022/.git' | 14:33 |
|
quartz
| mackerman: Uhhh one my professor set up for us. I ended up committing my one file using the git website rather than the terminal | 14:34 |
|
canton7
| This is where you're using confusing terminology. "Stop tracking" means that you have a git repository, and you want it to stop keep track of that folder. When in fact you don't want to keep the git repository at all | 14:34 |
|
| *stop keeping track | 14:34 |
|
quartz
| canton7: OMG it worked! Thank you! | 14:35 |
| → gast0n joined | 14:35 |
| → structoha joined | 14:36 |
| ← structoha left | 14:36 |
| → Sulky__ joined | 14:36 |
| → subopt joined | 14:39 |
| ← fling left | 14:40 |
|
quartz
| So I can't commit files to a git repository from terminal just by using a password? I need some type of security hash token? | 14:41 |
|
canton7
| quartz, remember that a git repository is entirely contained on your machine. When you commit something, you're adding it to that .git directory in the root of your repository. You don't need a password to interact with your own filesystem | 14:41 |
| → fling joined | 14:41 |
| ← Willtech left | 14:42 |
|
canton7
| If you want to *push* commits to a repository on another machne, at that point you'll probably need a password. And what you need is determined by whoever controls the machine that you're pushing to. GitHub for example lets you authenticate using an SSH key or a token -- you're not allowed to use your password, for obvious security reasons | 14:42 |
|
mackerman
| When someone already has an existing repo, like that one of your professor's, you may "git clone" it to have your own copy, entirely local. | 14:43 |
|
quartz
| mackerman: Right | 14:43 |
|
mackerman
| What to do with it after depends on your work flow, including if you need to collaborate with others and merge their changes. | 14:45 |
|
quartz
| canton7: So when I commit a file, that means I'm pushing all commits in the staging area into that .git directory? Than it's possible to "push" that .git directory into the remote github server? | 14:45 |
| → masber joined | 14:45 |
|
canton7
| quartz, 'push' specifically refers to taking commits in your local repository and transferring them to a remote machine. When you commit a file, that creates a commit in your local git repository (which is stored in that .git dir) | 14:46 |
|
| The staging area holds files which will be included in the next commit. It doesn't hold commits. | 14:46 |
|
quartz
| canton7: Ahhh OK | 14:46 |
|
masber
| hi, I am trying to rebase master changes into my branch and I get a conflict https://dpaste.org/C8WDC/raw . I have fixed README.md file, then run git add README.md && git rebase --continue and it just undo my changes and gets me back to the conflicted state | 14:46 |
|
canton7
| I recommend starting with a good git resource, and learning from the beginning. !book is the classic text although it's quite long. !bottomup and !cs are good quicker intros | 14:46 |
|
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 | 14:46 |
|
| 'Git from the bottom up' starts with explaining the building blocks of git and proceeds to tell you how they fit together. https://jwiegley.github.io/git-from-the-bottom-up/ | 14:46 |
|
| "Git for Computer Scientists" is a quick introduction to git internals for people who are not scared by phrases like Directed Acyclic Graph. http://eagain.net/articles/git-for-computer-scientists/ See also !concepts !bottomup | 14:46 |
|
masber
| how should I fix the conflicts while rebasing? | 14:47 |
|
quartz
| And I thought git was suppose to be easy to learn :( | 14:47 |
|
canton7
| quartz, whatever gave you that impression >< The secret with git is to learn about the underlying data structure -- what a commit is, how a commit refers to its parent, what a branch actually is, etc. Use graphical tools such as gitk to visualise your history. Once you can see and understand what's going on, all of the commands suddenly start | 14:48 |
|
| making sense | 14:48 |
|
| masber, !eek | 14:48 |
|
gitinfo
| masber: [!eekaconflict] Merge conflicts are a natural part of collaboration. When facing one, *don't panic*. Read "How to resolve conflicts" in man git-merge and http://git-scm.com/book/ch3-2.html#Basic-Merge-Conflicts then carefully go through the conflicts. Picking one side verbatim is not always the right choice! A nice video explaining merge conflicts: https://www.youtube.com/watch?v=zz7NuSCH6II | 14:48 |
|
canton7
| (rebase and merge conflicts are pretty much the same, except that 'ours' and 'theirs' refer to different things) | 14:49 |
| → gh34 joined | 14:49 |
|
canton7
| Remember that when you 'git checkout A; git rebase B', git will checkout B and then apply successive patches from A. So at any given point, you're standing on the result of the latest successfully-applied patch, and you're applying the next one. So if you get a conflict, one side is the change introduced by A + whatever patches have been applied so | 14:50 |
|
| bar, and the other side is the next patch from B to be applied | 14:50 |
|
| Ack got A and B confised | 14:50 |
|
| Remember that when you 'git checkout A; git rebase B', git will checkout B and then apply successive patches from A. So at any given point, you're standing on the result of the latest successfully-applied patch, and you're applying the next one. So if you get a conflict, one side is the change introduced by *B + whatever patches have been applied | 14:50 |
|
| so bar, and the other side is the next patch from *A to be applied | 14:50 |
|
masber
| I know that | 14:51 |
|
quartz
| Can't imagine the IQ of the guy who invented git | 14:52 |
|
masber
| what I don't understand is why git rebase --continue applies the same commit I just changed | 14:52 |
|
quartz
| canton7: Thanks for the links by the way. | 14:52 |
|
masber
| s/changed/fixed/g | 14:52 |
| → stef204 joined | 14:52 |
|
canton7
| masber, well I don't know what you know unless you tell me :) | 14:52 |
|
masber
| xD true | 14:53 |
|
| so I run git rebase master | 14:53 |
|
canton7
| masber, when rebase hits a conflict, it will stop with that latest patch partially applied. It's up to you to fix the conflicts and 'git add' everything, then you run 'git rebase --continue', and the rebase finishes applying that patch | 14:53 |
|
masber
| it applies one commit from master at a time | 14:54 |
|
| then it finds a conflict and stops | 14:54 |
|
| I get that | 14:54 |
| ← sondr3 left | 14:54 |
|
masber
| now I fix the conflict | 14:54 |
|
canton7
| almost -- it checks out master, then applies the commits from the branch you had checked out when you ran 'git rebase master' | 14:54 |
| → Akiva joined | 14:54 |
| ← dimi1947 left | 14:55 |
| ← feriman left | 14:56 |
|
masber
| ok, wait, what? | 14:57 |
|
| so git rebase master, actually modifies the master branch and not the one I am in? | 14:57 |
|
canton7
| That's what I described before, and you said "I know that" >< . "git rebase master" means "Take the commits which HEAD has and master doesn't have, and play them on top of master" | 14:57 |
|
| I should say, it checks out the commit which 'master' points to | 14:58 |
| → stutz joined | 14:58 |
| → Guest69 joined | 14:58 |
| → ChmEarl joined | 14:58 |
|
canton7
| It doesn't modify the master branch -- but it jumps to the commit which master points to, then applies successive commits from the branch you had checked out when you ran 'git rebase master', then finally updates that branch to point to the last such applied commit | 14:58 |
|
stutz
| is there a way to list all branches/commits/refs that do not include a file? I am like 99.9% sure that the file I am looking at was deleted (which is the state that I want) but I can't seem to find the branch (rather the one I thought it'd be correct is not) | 14:59 |
|
canton7
| stutz, you might be able to script something with 'git ls-tree' and 'git for-each-ref'? | 15:00 |
|
masber
| ok | 15:00 |
|
| so let say I have master, featureA and featureB branches | 15:00 |
|
canton7
| stutz, if you're completely failing to find this change anywhere, it might have been done as part of an !evil merge | 15:00 |
|
gitinfo
| stutz: [!evil_merge] What you describe _can_ be done, but results in an "evil merge": a commit that purports to be a merge, but does not actually take all changes from all sides. This violates the assumptions that tools and humans make about merges, and usually results in confusion and pain down the road. | 15:00 |
|
masber
| featureA and featureB forked from the same master commit | 15:00 |
|
| then featureA and master merges | 15:00 |
| → rgrinberg joined | 15:00 |
|
masber
| and I want to apply those new changes to featureB branch | 15:01 |
|
canton7
| stutz, ignore the first bit of the trigger. But an evil merge is one which makes a change that isn't present in either of its parents. The git tooling is pretty bad at finding changes introduced by evil merges | 15:01 |
|
masber
| I understand the way to do this would be to git checkout master; git rebase featureB | 15:01 |
|
| right? | 15:02 |
|
canton7
| masber, so both master and featureA have gained new commits, but they're still separate? | 15:02 |
|
stutz
| could be a messed up rebase for all I know, point is I'd just like to find the state where the file is gone cos that's the one I need :D | 15:02 |
|
masber
| master and featureA merges, featureA can be deleted | 15:02 |
|
| featureA can be deleted because its changes are now in master | 15:03 |
|
stutz
| I was hoping for git to have some plumber functioni that allows me to look for a file (or its absence) but I guess scripting it is then | 15:03 |
|
| thanks canton7 | 15:03 |
|
canton7
| OK, so master has gained new commits, and you want those to be present in the featureB branch? So what you want to go from is this: https://gitirc.eu/g/QC.png to this: https://gitirc.eu/g/QC.png? | 15:04 |
|
masber
| they both same picture, but yes that is the end goal | 15:05 |
| → zumba_addict joined | 15:05 |
|
canton7
| Bleh sorry. From this: https://gitirc.eu/g/QB.png to this: https://gitirc.eu/g/QC.png | 15:06 |
|
| Or, if we want to get fancy: https://gitirc.eu/g/QG.png | 15:06 |
|
masber
| yes, that is correct :) | 15:07 |
|
canton7
| masber, OK, so you want to take featureB, and change its commits so they're sat on top of the latest master | 15:08 |
|
| So that's 'git checkout featureB; git rebase master' | 15:08 |
|
masber
| ok | 15:09 |
|
| thank you | 15:09 |
|
canton7
| Note that you're not applying changes *to* featureB -- you're taking featureB and rewriting it so that it sites on top of those new commits | 15:10 |
| ← Sulky__ left | 15:11 |
|
masber
| yeah | 15:12 |
|
| so master pointer is still the same and history instact | 15:12 |
|
canton7
| Yep | 15:12 |
| → Gustavo6046 joined | 15:14 |
| ← Gustavo6046 left | 15:15 |
| → Gustavo6046 joined | 15:16 |
| ← a1eaiactaest left | 15:16 |
| → dionysus69 joined | 15:19 |
| → gurkenglas joined | 15:21 |
|
quartz
| canton7: Sorry to bug you again, but I can't git pull from the terminal using a user name and password anymore? | 15:25 |
|
canton7
| quartz, like I said, it depends on what machine you're pulling from | 15:25 |
|
| There's no global standard for how authentication is done. It depends on the server you're talking to | 15:26 |
|
| Are you talking to github? gitlab? bitbucket? gitea? gitolite? Your friend's PC? Something else? | 15:26 |
|
quartz
| canton7: The repo I want to pull from is github | 15:26 |
|
canton7
| Then yes, you need to use an access token or ssh key for github. You can't use your password. | 15:26 |
|
quartz
| Oh I didn't realie there were so many versions of git | 15:26 |
| ← ecraven left | 15:27 |
|
canton7
| They're not "versions of git". They're platforms which are built on top of git, but also provide things like authentication, a web interface, issue tracker, pull requests, etc | 15:27 |
|
dzho
| git+EEE | 15:31 |
| ← enoq left | 15:32 |
| ← dionysus69 left | 15:35 |
| → dionysus69 joined | 15:35 |
| ← dionysus69 left | 15:35 |
| → dionysus69 joined | 15:37 |
| → sandipan joined | 15:41 |
| → v9fk1yn3nu joined | 15:44 |
| → Payam joined | 15:44 |
|
Payam
| hi | 15:44 |
|
| How do I check if a repository is a github or gitlab repository? | 15:44 |
|
ikke
| check the url? | 15:44 |
|
| git itself does not know about 'github repository' or 'gitlab repository' | 15:45 |
| ← vitali64 left | 15:45 |
| → vitali64 joined | 15:45 |
|
nedbat
| Payam: btw, one repo can have a number of remotes, including some on github and some on gitlab | 15:48 |
|
| Payam: what do you want to do with the repo if and only if it's a github repo? | 15:48 |
|
parsnip
| can have both as remotes too | 15:49 |
| → madewokherd joined | 15:50 |
| → Thanatermesis joined | 15:51 |
| Xenguy__ → Xenguy | 15:51 |
|
Payam
| nedbat nothing. I only group them | 15:51 |
|
nedbat
| Payam: group them how? I'm interested | 15:52 |
|
Payam
| tbh I just am interested in Gitlab repositories | 15:52 |
|
| so I want to "not" care about other. Just a print saying "this is a gitlab repo" | 15:53 |
| → hololeap_ joined | 16:01 |
| ← bertvvvs left | 16:01 |
| → junktext joined | 16:03 |
|
parsnip
| probably you could have gitlab metadata there | 16:05 |
|
| many github projects have clues, like a .github subdirectory | 16:05 |
| → bertvvvs joined | 16:05 |
|
parsnip
| or a README can provide a link to the remote | 16:05 |
|
| elisp packages usually have metadata for where the source can be found | 16:06 |
| → saroy|afk joined | 16:08 |
| ← sandipan left | 16:11 |
| ← rgrinberg left | 16:12 |
| → jole joined | 16:12 |
| ← john_johnk left | 16:12 |
| → john_johnk joined | 16:12 |
| ← quartz left | 16:14 |
| → iomari891 joined | 16:15 |
| → sandipan joined | 16:16 |
| ← zen_coder left | 16:17 |
| → napping joined | 16:17 |
|
napping
| Hi, is there any way to also change the working file during `add -p`, like if I'm correcting a typo? | 16:17 |
| ← saroy|afk left | 16:19 |
| ← wakeup left | 16:24 |
| ← zumba_addict left | 16:30 |
| → sudoforge joined | 16:31 |
|
parsnip
| you mean you discover a typo during `add -p`? good question | 16:31 |
| ← madewokherd left | 16:33 |
|
napping
| also if you are selecting a subset of changes with add -p and want to tag a subset with a TODO or something for a closer look after dividng the commits | 16:35 |
| → emanuele6 joined | 16:38 |
| ← MajorBiscuit left | 16:38 |
| ← emanuele6 left | 16:39 |
| → emanuele6 joined | 16:39 |
|
parsnip
| to the first question, i see this "e - manually edit the current hunk" | 16:39 |
|
| at https://git-scm.com/docs/git-add | 16:39 |
|
napping
| Sure, but that only affects what's added to the index, afterwards you'll see some staged changes, and a new unstaged change reintroducing the typo | 16:41 |
| → liefer1 joined | 16:41 |
| ← fling left | 16:44 |
| → fling joined | 16:46 |
| → jelmer joined | 16:46 |
| ← jelmer left | 16:46 |
| → pf1337 joined | 16:48 |
| → jelmer joined | 16:49 |
| ← masber left | 16:50 |
| ← hololeap_ left | 16:51 |
| → xkuru joined | 16:51 |
| ← pf1337 left | 16:51 |
| → hololeap_ joined | 16:53 |
| → geowiesnot joined | 16:54 |
|
parsnip
| i'm horrible at CLI git. i just started a tutorial | 16:55 |
| → stephen joined | 16:55 |
|
stephen
| how do i check which commit a branch was created from? | 16:55 |
| → hitman joined | 16:55 |
| → great_taste joined | 16:56 |
|
ikke
| git does not record that | 16:57 |
|
nedbat
| stephen: branches don't remember where they were created | 16:57 |
|
napping
| stephen: git merge-base can find a common ancestor. If you want actual history it could only be found in the reflog | 16:57 |
|
stephen
| got it, thanks | 16:57 |
|
napping
| What would you like for newbranch after git checkout -b newbranch some-branch; git reset --hard unrelated-branch | 16:58 |
| → skapata joined | 16:59 |
| ← skapata left | 16:59 |
| → skapata joined | 16:59 |
|
stephen
| so if they don't know where they are created from, how can i rebase my specific commits onto another branch | 16:59 |
|
| clearly there is some point in history it knows where to start pulling commits from | 16:59 |
| → Guest96 joined | 16:59 |
|
Guest96
| what is the use of -u in "git push -u origin master" | 17:00 |
|
jast
| you give the original branch as the <upstream> and the new branch with --onto | 17:00 |
|
| Guest96: it associates the local master branch with the master branch on origin, so that "git pull" and "git push" without arguments will use that. (you can have multiple remotes, each with its own master branch) | 17:00 |
|
stephen
| no im saying, based on your comment, you say git does not know 'where/when' a branch was created | 17:00 |
|
| so what im asking is why does rebasing work then to rewrite only the new commits ive added | 17:01 |
|
thiago
| stephen: you just remember what branches they are | 17:01 |
|
| git won't remember for you | 17:01 |
|
jast
| rebase often defaults to the upstream branch | 17:01 |
|
| so e.g. if you created your local branch foo from origin/foo, or you did "git push -u origin foo" at some point, the default upstream for rebase will be "origin/foo" | 17:01 |
|
thiago
| git has a feature that allows a branch locally to be configured to track another | 17:01 |
|
| it's stored in .git/config | 17:01 |
|
Guest96
| jast so now everytime I do git push or pull it will be done against origin, right? | 17:01 |
|
thiago
| it's not part of the repository history | 17:01 |
|
Guest96
| do I understand it correctly? | 17:02 |
|
thiago
| so when you run "git rebase" or "git pull", it uses that information to determine which branch to rebase on top of or merge | 17:02 |
|
| Guest96: not necessarily. That's all subject to the configuration | 17:03 |
|
Guest96
| I don't understand it then, what's the use of -u? | 17:04 |
|
thiago
| that saves in the config | 17:04 |
| ← geowiesnot left | 17:05 |
| ← coaxing left | 17:06 |
| ← john_johnk left | 17:06 |
|
napping
| stephen: If you checked out a local version of a remote branch, then git does record that in the branch.<name>.remote and branch.<name>.merge options and rebase uses it | 17:07 |
|
| Either way, rebase figures out where exactly to look at history from by finding a common ancestor | 17:11 |
|
| Besides, rebase usually changes where your branch is attached to the target branch | 17:12 |
| → coaxing joined | 17:13 |
| → adonis joined | 17:19 |
| ← iomari891 left | 17:19 |
|
adonis
| is there a way to grab a list of the git tags actually being used by commits in my repo? | 17:20 |
|
ikke
| What do you mean with "used by commits" | 17:20 |
| → OnkelTem joined | 17:21 |
| → seifeslimene joined | 17:21 |
|
adonis
| I have a weird issue, where after setting an upstream on my repo the list of tags for the "upstream" got merged with the list from "origin" | 17:21 |
| ← hitman left | 17:22 |
|
rewt
| a tag is a pointer to a commit... commits don't reference tags | 17:22 |
| → funhouse joined | 17:22 |
|
adonis
| at some point those got pushed so origin now has tags from both upstream and origin and I need to undo that by finding the list of tags that are actually pointing to commits in origin | 17:22 |
|
rewt
| all tags are local, so when you fetched from the remote, you fetched all the remote's tags | 17:22 |
|
adonis
| rewt: you are right, by used I meant pointing.. | 17:22 |
|
napping
| Would it help to know which tags point to ancestors of some commit? | 17:23 |
| ← Guest96 left | 17:23 |
| → saroy|afk joined | 17:25 |
|
ikke
| git tags --merged <branch> | 17:25 |
|
| that should tags that are reachable from <branch> | 17:26 |
| → machinehum joined | 17:26 |
|
napping
| (which is maybe not helpful if your local branches are built on top of remote branches and some of the unwanted tags are in those ancestors) | 17:27 |
|
adonis
| let me try that to see what I get | 17:27 |
| ← sandipan left | 17:27 |
| → sandipan joined | 17:32 |
| → quartz joined | 17:32 |
| → madewokherd joined | 17:34 |
| ← saroy|afk left | 17:35 |
| → sobkas joined | 17:38 |
| ← machinehum left | 17:39 |
| → machinehum joined | 17:41 |
| → Jacques joined | 17:45 |
| ← v9fk1yn3nu left | 17:45 |
| ← fling left | 17:47 |
| → fling joined | 17:48 |
| → parsnip0 joined | 17:50 |
| → feriman joined | 17:52 |
| → luke-jr joined | 17:53 |
| ← hololeap_ left | 17:57 |
| → hololeap_ joined | 17:59 |
| → cvmn joined | 18:03 |
| ← Jacques left | 18:04 |
|
quartz
| I'm trying to push some changes locally to a git repository on GitHub. I'm trying to do this through the terminal. I committed one file and I just want to push the changes to a specific branch of a github repository. It won't let me push the changes when I type: git push | 18:11 |
| ← sandipan left | 18:12 |
|
quartz
| I guess it's best not to use the terminal for beginners | 18:12 |
| ← liefer1 left | 18:12 |
| → liefer joined | 18:14 |
| ← bluepenquin_ left | 18:16 |
|
mackerman
| git on the terminal is the common language on this channel, easiest to talk about in a text medium, and the most powerful. | 18:16 |
| → v9fk1yn3nu joined | 18:16 |
|
mackerman
| quartz: What error do you get? | 18:17 |
|
quartz
| mackerman: All I want to do is push the changes I made to a remote github repository. | 18:17 |
|
mackerman
| You will need credentials, which for GitHub means a ssh key or a personal access token. | 18:17 |
|
quartz
| I have that | 18:17 |
|
parsnip0
| what error? | 18:17 |
|
jast
| what error do you get? | 18:18 |
|
quartz
| Actually, I'm not sure I set up the github correctly | 18:18 |
|
| When I type git remote -v it does not show anything | 18:18 |
|
| But on my terminal I get the green "git master" icon thing on the end of the terminal | 18:18 |
|
| They need to offer courses on how to use git, this is crazy | 18:19 |
|
jast
| did you create the local repo from scratch using "git init", rather than as a clone from the repo on GitHub? | 18:19 |
| ← vitali64 left | 18:19 |
|
quartz
| jast: I think I did both :( | 18:19 |
|
jast
| so, normally "git clone" sets up a remote that would show up in "git remote -v" | 18:19 |
|
| is the github repo completely empty? i.e. not even a readme or license file or anything | 18:20 |
|
parsnip0
| others will persevere, but you were asked for the error three times | 18:20 |
|
jast
| (the answer affects the options we have to fix up your existing local repo so that you can actually push) | 18:22 |
|
quartz
| No the github repo is not empty | 18:22 |
|
| I did a git clone, I remember that much | 18:22 |
|
jast
| all right, do commits from the github repo show up when you do "git log"? | 18:22 |
|
quartz
| Yes | 18:23 |
|
jast
| just as an extra sanity check, what does this say: git config remote.origin.url | 18:23 |
| ← hololeap_ left | 18:23 |
| ← rsx left | 18:23 |
| → hololeap_ joined | 18:23 |
|
quartz
| jast: Nothing | 18:23 |
|
jast
| okay, that's what I expected | 18:24 |
|
quartz
| But I did a git clone | 18:24 |
|
jast
| so, apparently you cloned the github repo but, at some point, deleted the remote (by accident I'm guessing) | 18:24 |
|
| that's not too bad, we can re-add it | 18:24 |
|
quartz
| How is that possible | 18:24 |
|
jast
| "git remote rm" | 18:24 |
|
parsnip0
| or the clone failed? or the clone was somewhere else? | 18:24 |
|
jast
| or by editing .git/config | 18:24 |
|
| well, if your commits show up with "git log" you've got to be in approximately the right place | 18:24 |
|
parsnip0
| are the commits same as remote? | 18:24 |
|
quartz
| parsnip0: Uhhh I'm not sure | 18:25 |
|
jast
| we'll find out when trying to repair this :) | 18:25 |
|
quartz
| I just cloned it. I tried to make some changes on my end and I did commit one file | 18:25 |
|
parsnip0
| k | 18:25 |
|
quartz
| Maybe I should just use the github desktop app | 18:25 |
|
| lol | 18:25 |
|
jast
| so, let's try and re-add that remote. do you want to push via SSH (with an SSH private key) or via HTTP (username/password)? | 18:25 |
|
parsnip0
| didn't github disable password recently? | 18:26 |
|
quartz
| Well I had to clone with a SSH private key | 18:26 |
|
parsnip0
| like a month ago? | 18:26 |
|
quartz
| parsnip0: Yes | 18:26 |
|
jast
| no idea, I have 2FA active which disables password by itself | 18:26 |
| → rgrinberg joined | 18:26 |
|
jast
| okay, so let's try the SSH setup | 18:26 |
|
| assuming your github repo is at github.com/foo/bar, do this: | 18:26 |
|
| git remote add origin [email@hidden.address] | 18:26 |
|
quartz
| Oh shoot I lost the SSH key I generated :( | 18:27 |
|
| God this gets worse and worse | 18:27 |
|
jast
| whoops | 18:27 |
|
| the good news is you can add another one in the github web interface | 18:27 |
|
quartz
| Yeah I just did that | 18:28 |
|
jast
| once you have the remote re-added, "git push" should try to actually do something, and then give you a different error :) | 18:29 |
| ← napping left | 18:29 |
|
jast
| or it might just tell you that it doesn't know where to push to, which is fine, too | 18:30 |
|
quartz
| When I make a new branch, it copies everything from master? I thought a branch could just be a few files from the main branch, or everything from the main branch | 18:30 |
| → EvilDMP joined | 18:31 |
|
jast
| typically a branch just starts off with the exact same contents of the commit/branch you're on at the time | 18:31 |
|
| and they share history, so for instance the next time you commit to that branch, in a comparison of the two branches your new branch will come out as "one commit ahead" | 18:32 |
|
| it's possible to create a completely disconnected branch, though, with no common history and no common files (unless/until you add some) | 18:32 |
|
| it's not the most common use case, but it exists :) look at the --orphan option for "git checkout" | 18:33 |
|
| we have manpages here for your convenience: man git-checkout | 18:33 |
|
gitinfo
| the git-checkout manpage is available at https://gitirc.eu/git-checkout.html | 18:33 |
|
quartz
| Uhhh OK | 18:34 |
|
| Let me fix the git remote add thing now | 18:34 |
|
| jast: OK I just added the repo, and git remote -v returns the repo name | 18:36 |
| ← tyson2 left | 18:38 |
| → Sulky joined | 18:41 |
| → hitman joined | 18:43 |
| ← hitman left | 18:44 |
|
quartz
| I'm trying to swtich to a branch on my local git repo. I'm doing git checkout <branch name> but it's telling me: error: pathspec 'indent-feature' did not match any file(s) known to git | 18:45 |
|
parsnip0
| will that be a new branch name, or one existing already on remote? | 18:46 |
|
quartz
| parsnip0: I just created the branch via the github web interface on the repo | 18:47 |
|
| So maybe my local repo needs to be updated somehow? | 18:47 |
|
parsnip0
| maybe try `git fetch`? | 18:47 |
|
quartz
| What will that do | 18:47 |
| → liefer5 joined | 18:48 |
|
quartz
| nevermind I'll look it up, sorry dumb question | 18:48 |
|
parsnip0
| fetch branch refs from remote | 18:48 |
|
| it's sort of half of "git pull" | 18:48 |
|
| git pull is approximately git fetch + git merge | 18:48 |
|
| basically, search term could be like, "how do i checkout a remote branch" | 18:49 |
|
| *git | 18:49 |
|
| but connecting the random claims on internet to actual information found in git manual or book is a good practice | 18:50 |
| ← liefer5 left | 18:50 |
|
parsnip0
| i try to prefer the git manual and git book, but if i use external results, i try to confirm somewhere in manual | 18:50 |
| ← liefer left | 18:50 |
|
parsnip0
| it also gets you used to how things are described in manual | 18:51 |
| → duxsco joined | 18:52 |
| → liefer joined | 18:52 |
| ← fling left | 18:52 |
|
quartz
| When I do git fetch it says: fatal: protocol 'git@https' is not supported | 18:53 |
|
ikke
| quartz: sounds like a messed up remote url | 18:53 |
| → fling joined | 18:54 |
| → liefer2 joined | 18:54 |
|
quartz
| Maybe I don't need the https | 18:55 |
|
ikke
| not if you use ssh | 18:56 |
|
| which you seem to be using | 18:56 |
|
parsnip0
| yep, above was said, "git remote add origin [email@hidden.address] | 18:56 |
|
| [email@hidden.address] | 18:56 |
| ← liefer left | 18:57 |
| liefer2 → liefer | 18:57 |
|
quartz
| parsnip0: When I do that (without the https) it tells me: origin already exists :( | 18:57 |
|
| Why does nothing work right fo rme lol :( | 18:58 |
| → dslegends joined | 18:58 |
|
ikke
| git remote set-url origin <new-url> | 18:58 |
|
parsnip0
| i only meant that you weren't advised to put https | 18:58 |
| ← coaxing left | 18:59 |
|
quartz
| ikke: now it says "does not appear to be a git repository | 18:59 |
|
| I didn't add https | 18:59 |
|
| in the url name | 18:59 |
| ← liefer left | 19:00 |
|
quartz
| Maybe because the repo is private? I have access rights under my account. | 19:00 |
| ← Payam left | 19:00 |
|
parsnip0
| maybe it has to be [email@hidden.address] ? | 19:01 |
|
| https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#changing-a-remote-repositorys-url | 19:01 |
| → liefer joined | 19:01 |
|
ikke
| parsnip0: git is smart enough to append it if necesary | 19:01 |
|
parsnip0
| ah | 19:01 |
| → coaxing joined | 19:02 |
| ← gildasio left | 19:02 |
| → gildasio joined | 19:04 |
| → mjoerg joined | 19:04 |
|
parsnip0
| ikke: perhaps they could test `ssh -T [email@hidden.address] per https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection | 19:04 |
|
ikke
| that should show the user they are authenticated as | 19:05 |
|
quartz
| It has nothing to do with the fact that it's a private repo? | 19:05 |
|
ikke
| quartz: perhaps | 19:05 |
| ← mjoerg left | 19:06 |
|
ikke
| quartz: how many user accounts do you have? | 19:06 |
|
quartz
| ikke: One | 19:06 |
| ← great_taste left | 19:06 |
| → great_taste joined | 19:06 |
| → LuxuryMode joined | 19:06 |
|
ikke
| Ok, so I expect that account to have access to that repo | 19:06 |
|
parsnip0
| what command provoked "does not appear to be a git repository" | 19:07 |
|
quartz
| git fetch | 19:07 |
|
ikke
| quartz: can you try what parsnip suggested | 19:07 |
|
parsnip0
| `ssh -T [email@hidden.address] | 19:07 |
|
ikke
| ssh -T [email@hidden.address] | 19:07 |
|
quartz
| The authenticity of host 'github.com (140.82.112.3)' can't be established. | 19:08 |
|
| How is that possible, it's a very established site | 19:08 |
|
ikke
| That's normal for ssh when you connect the first time | 19:08 |
|
quartz
| [email@hidden.address] Permission denied (publickey). | 19:09 |
|
ikke
| Did you generate an ssh keypair and added the public key to github? | 19:09 |
| → cousteau joined | 19:09 |
|
ikke
| And this also suggests the remote url is still incorrect | 19:09 |
|
quartz
| ikke: No idea what tha tis | 19:09 |
|
| Holy shit it's taken me an entire day to learn how to push a simple file to a github repo lol | 19:10 |
|
ikke
| https://docs.github.com/en/authentication/connecting-to-github-with-ssh | 19:10 |
|
quartz
| Maybe it's better to do it from https? | 19:10 |
|
| Or does that mean I can't connect via terminal? | 19:10 |
|
ikke
| You need to generate a personal access token | 19:10 |
|
| https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token | 19:11 |
|
quartz
| ikke: Yes I have one | 19:11 |
|
parsnip0
| you mean that's an alternative | 19:11 |
|
| ssh, or token | 19:11 |
|
ikke
| quartz: then use https and use that token | 19:11 |
| → Misotauros joined | 19:12 |
|
ikke
| and copy the url from the project page (there is a green " | 19:12 |
|
quartz
| Oh I thought the token method was ssh | 19:12 |
|
ikke
| "code" button) | 19:12 |
|
parsnip0
| iiuc, ssh and token are disjoint methods | 19:12 |
|
| and github removed password access a month ago | 19:12 |
|
ikke
| ssh uses a key pair | 19:12 |
|
parsnip0
| we all using ssh key pair | 19:12 |
|
mackerman
| "ssh key" is ssh. "personal access token" is generated passwords over https. | 19:13 |
| ← EvilDMP left | 19:13 |
| ← funhouse left | 19:13 |
|
ikke
| What github changed is that you cannot use your password anymore, but need to use a access token | 19:13 |
|
quartz
| omg you guys it worked | 19:13 |
|
parsnip0
| congrats! | 19:13 |
| → EvilDMP joined | 19:13 |
|
parsnip0
| you are welcome to use GitHub Desktop app, but this channel wouldn't be able to help as much. | 19:14 |
|
| as was said earlier, CLI git is the common denominator | 19:14 |
|
quartz
| Yeah I needed the .git at the end of the url for some reason | 19:14 |
|
parsnip0
| maybe | 19:15 |
|
| i'm skeptical, based on what ikke said. maybe multiple things changed. | 19:15 |
|
| i've leaned heavily on magit as a git UI, which hinders my ability to keep up on this channel. | 19:15 |
|
quartz
| OK now I can git checkout <branch name> | 19:16 |
| ← coaxing left | 19:19 |
|
quartz
| I made changes to one file on my local repo, but I want to push them to a remote repo. When I type 'git push origin <branch name>' it says "everything up to date" but how is that possible? | 19:19 |
| → hololeap joined | 19:19 |
|
ikke
| quartz: you need to commit the change first | 19:19 |
| ← hololeap_ left | 19:20 |
| → coaxing joined | 19:20 |
|
quartz
| ikke: Yes I just did that. | 19:20 |
| ← coaxing left | 19:21 |
|
ikke
| what does git status say? | 19:21 |
|
quartz
| It still tells me "everything up to date | 19:21 |
| → coaxing joined | 19:21 |
|
quartz
| Your branch is up to date with 'origin/indent-feature'. | 19:21 |
|
| Nothing to commit working tree clean | 19:22 |
|
ikke
| did you commit before or after you checked out the branch? | 19:22 |
|
parsnip0
| maybe the change is already there | 19:22 |
|
| ah | 19:22 |
|
quartz
| I think before | 19:22 |
|
ikke
| then it's committed in the previous branch (probably master?) | 19:22 |
|
parsnip0
| git log --oneline --graph --all --pretty=format:"%h" | 19:23 |
|
| quartz: can you share result of above in a pastebin site? | 19:24 |
|
| hmm, no decorate | 19:24 |
|
ikke
| !situation | 19:24 |
|
gitinfo
| Please post the url returned by ' git log -n 20 --all --graph --format="%h %p %d %s" | curl -F text=@- https://upaste.de ' to give us an idea about what your situation is (increase the -n argument if your problem is more complex than 20 commits can explain) | 19:24 |
|
parsnip0
| change "%h" to "%h%d" | 19:25 |
|
quartz
| ikke: I tried to commit it on the branch I'm on now | 19:25 |
|
parsnip0
| if you don't want to share commit messages, remote %s | 19:25 |
|
| oh, --oneline is redundantj | 19:26 |
|
| s/j// | 19:26 |
|
| *remove %s | 19:26 |
|
quartz
| https://upaste.de/ppQ | 19:26 |
| → funhouse joined | 19:27 |
|
parsnip0
| that makes things clearer, no? | 19:27 |
|
ikke
| is 945d282 your commit? | 19:27 |
|
| git show 945d282 | 19:27 |
|
quartz
| parsnip0: I'm honestly not really sur ehow to read it | 19:27 |
|
| ikke: I'm not sure | 19:27 |
|
ikke
| run that command | 19:28 |
|
parsnip0
| quartz: run it with %s locally, it might help you interpret | 19:28 |
| → epony joined | 19:28 |
|
parsnip0
| but we can pretty much read it without the %s | 19:28 |
|
| run `git show 945d282` as suggested, might confirm if that was the file changes you were looking for | 19:29 |
|
quartz
| yes they are | 19:29 |
|
| but I don't see it reflected on the repo when I look at the files via the web on github | 19:30 |
|
ikke
| git cherry-pick 945d282 | 19:30 |
|
parsnip0
| conceptually, i think you want to move the indent-feature "branch ref" over to where master is right now | 19:30 |
|
ikke
| git branch -f master origin/main | 19:30 |
|
quartz
| branch 'master' set up to track 'origin/main'. | 19:31 |
|
ikke
| quartz: what does git status say now? | 19:31 |
|
quartz
| Your branch is up to date with 'origin/indent-feature' | 19:32 |
|
| Uhh | 19:32 |
|
| I think I'm exhausted from this lol | 19:32 |
|
ikke
| quartz: you forgot the cherry-pick? | 19:32 |
|
quartz
| what does that do | 19:33 |
|
ikke
| copy the commit onto the current branch | 19:33 |
|
quartz
| Oh | 19:33 |
| → liefer2 joined | 19:33 |
|
quartz
| Yeah OK I just did that | 19:33 |
|
| Git terminal now has an up arrow and 1 on it | 19:33 |
|
ikke
| now you can push your branch | 19:33 |
|
quartz
| Which means it's waiting for me to push the commit? | 19:33 |
|
ikke
| I suggest you to read the first couple of chapters of https://git-scm.com/book/en/v2 | 19:34 |
|
anddam
| should tags be auto-completed when typing "tags/" then startin a tag name? | 19:35 |
|
quartz
| ikke: Yes someone suggested it in here earlier. | 19:35 |
|
anddam
| I do have bash-completion for git enabled | 19:35 |
|
quartz
| So now I have to do: git push origin indent-feature? | 19:35 |
|
ikke
| quartz: yes | 19:35 |
|
parsnip0
| ikke: https://gitexercises.fracz.com/ is another good resource? | 19:35 |
|
ikke
| probably | 19:36 |
|
parsnip0
| quartz: interactive exercises ^ (maybe after reading those chapters mentioned) | 19:36 |
| → hololeap_ joined | 19:37 |
|
quartz
| parsnip0: Wow thanks so much :) | 19:38 |
|
parsnip0
| :-) | 19:38 |
|
quartz
| Yeah interactive exercises helped me learn vim | 19:38 |
| → tyson2 joined | 19:38 |
|
quartz
| OK thanks everyone for your help, I could have not done this by googling my way thorugh it | 19:38 |
| ← hololeap left | 19:38 |
| ← liefer left | 19:38 |
| liefer2 → liefer | 19:38 |
|
ikke
| 80% of using git is getting learning a specific workflow | 19:39 |
|
quartz
| Yeah I'm trying to work exclusively from terminal | 19:39 |
|
ikke
| That's fine | 19:39 |
|
quartz
| I mean, how else would you interact with git? the desktop app? | 19:39 |
|
ikke
| yeah, there are all kinds of interfaces | 19:39 |
|
| dedicated tools or integrated into editors | 19:39 |
|
parsnip0
| quartz: there's a link in the /topic, that leads to https://gitolite.com/gcs.html and https://jwiegley.github.io/git-from-the-bottom-up/ | 19:40 |
|
ikke
| But personally using the CLI is the best way to learn git | 19:40 |
|
parsnip0
| in a sense, it's got the best support | 19:40 |
|
ikke
| :) | 19:40 |
| ← liefer left | 19:40 |
|
parsnip0
| i generally don't ask questions about magit here ;-) | 19:41 |
| → Jong joined | 19:41 |
|
ikke
| I happen to use it | 19:41 |
| → liefer joined | 19:41 |
|
quartz
| OK thanks everyone for your help, I need to go and eat now. | 19:41 |
| → magic_ninja joined | 19:41 |
| ← quartz left | 19:42 |
| ← Gustavo6046 left | 19:43 |
| → Gustavo6046 joined | 19:43 |
| ← Akiva left | 19:43 |
| ← hololeap_ left | 19:43 |
| → hololeap_ joined | 19:45 |
| ← dionysus69 left | 19:47 |
| ← EvilDMP left | 19:49 |
| ← seifeslimene left | 19:49 |
| ← great_taste left | 19:49 |
| ← stephen left | 19:49 |
| → CATS joined | 19:49 |
| → seifeslimene joined | 19:50 |
| ← fling left | 19:56 |
| → fling joined | 19:58 |
| ← pulse left | 20:01 |
| → great_taste joined | 20:01 |
| ← skapata left | 20:01 |
| → EvilDMP joined | 20:01 |
| → geowiesnot joined | 20:02 |
| ← sobkas left | 20:03 |
| → Flooo joined | 20:06 |
|
Flooo
| Hi | 20:06 |
|
| I have a problem with my submodule. I changed the commit but it seems the top level repository is not seeing it | 20:08 |
|
| git status does not show it as modified and git add does not work too | 20:08 |
| ← EvilDMP left | 20:08 |
|
Flooo
| how can i solve this? | 20:08 |
| ← gh34 left | 20:09 |
| ← geowiesnot left | 20:09 |
| → pulse joined | 20:09 |
|
Guest69
| High level question: I never know how granular to make my commits. Typically I'll end up with a few hundred lines of diffs across a half-dozen files, many of which are not logically related. | 20:11 |
|
nedbat
| Guest69: make them more granular than that :) | 20:11 |
|
Guest69
| for example: I fixed a logging issue, fixed a formatting issue, edited some comments, fixed a bug and added a feature which is kinda related to the bug and kinda not... do I commit these all as one big blob, or try to take the time and commit these 5-ish things one at a time? | 20:11 |
| ← duxsco left | 20:12 |
|
nedbat
| Guest69: i would separate them into 5 commits | 20:12 |
|
| (i would try to) | 20:12 |
|
Guest69
| okay and each commit is like 20-70 lines of diffs probably | 20:12 |
|
nedbat
| 20-70 sounds like a good size | 20:13 |
| → xylz joined | 20:13 |
| ← Sulky left | 20:13 |
| → iffraff joined | 20:14 |
|
Flooo
| Guest69: i would make minimum 5 commits, maybe more depending if the are woth to split up | 20:14 |
| → Sh4dowmonk joined | 20:14 |
|
Flooo
| But of course you should not need more time to split up the stuff than doing the actual change ;-) | 20:16 |
| ← zer0bitz left | 20:16 |
|
Flooo
| Solved my problem with not recognized submodule change by switching branches of top-level repo | 20:18 |
| → Lord_of_Life_ joined | 20:18 |
| ← feriman left | 20:19 |
| → cliluw joined | 20:20 |
| Lord_of_Life_ → Lord_of_Life | 20:21 |
| → EvilDMP joined | 20:21 |
| → a1eaiactaest joined | 20:23 |
| → dionysus69 joined | 20:28 |
| ← Sh4dowmonk left | 20:28 |
|
avalon
| Guest69: think of it from the point of view of the person that might have to review your commits. you want them to be relatively self contained and digestible - nobody wants to review several hundred lines of diffs that touch a bunch of different areas of the code base in unrelated ways | 20:30 |
| ← adonis left | 20:31 |
| ← cliluw left | 20:35 |
| → awmv joined | 20:36 |
| → t0mm13b_ joined | 20:38 |
| → zumba_addict joined | 20:39 |
|
anddam
| can I remove all stale branches at once? | 20:39 |
| → anaveragehuman joined | 20:40 |
|
anddam
| to be more clear I want to delete local branches whose remote counterparts are gone | 20:40 |
|
| and I am on windows so my scripting capabilities are severely capped | 20:40 |
| → Sh4dowmonk joined | 20:41 |
| ← Sh4dowmonk left | 20:42 |
| ← anaveragehuman left | 20:47 |
| ← gas51627 left | 20:48 |
|
mackerman
| anddam: git remote prune | 20:49 |
| → szkl joined | 20:57 |
| ← donofrio left | 20:58 |
| → lgc joined | 20:59 |
| → zeenk joined | 21:00 |
| ← fling left | 21:00 |
| ← lgc left | 21:00 |
| ← xylz left | 21:01 |
| → fling joined | 21:02 |
|
anddam
| nope, that will keep the local branches, but git branch -vv will show "gone" for the remotes | 21:04 |
|
| well I ended up doing it by hand, it was easier anyway | 21:05 |
|
| but I am curious if there's a syntax for that, or that is left as an exercise to the reader | 21:05 |
| → donofrio joined | 21:06 |
| ← madewokherd left | 21:06 |
| → kexec joined | 21:06 |
| ← kenanmarasli left | 21:07 |
| ← Xenguy left | 21:07 |
| ← dionysus69 left | 21:08 |
| → pretty_dumm_guy joined | 21:08 |
| ← bertvvvs left | 21:09 |
|
kexec
| if i create a commit with --date and then push it, git log shows the entered date,, but github shows the date and time when the commit was actually created (not the date and time i entered through --date)... why is that? or to force the entered date to show on github? | 21:10 |
|
foo
| Does "github" or "gitlab" handle git merging differently? We recently had an issue where (to my surprise) a git merge did not properly show 5 lines as being an addition... which broke some stuff and caused some confusion. One of our devs blamed the fact that it's because we're not using github or gitlab and that those two "merge more intelligently" ... I believe "git is git" ... there are no "smarter ways of | 21:13 |
|
| merging" - can anyone speak to this? I'm open to his thoughts, I simply didn't realize if that was the case. | 21:13 |
|
ljharb
| afaik github just uses git | 21:14 |
|
| but also, you're not using github or gitlab? O.o | 21:14 |
|
| foo smacks ljharb | 21:15 |
|
foo
| ljharb: No. :) gitolite | 21:15 |
|
| I'd imagine they all use git ... but maybe not | 21:15 |
|
ljharb
| even tho the dev is wrong, the thing they want is good :-p | 21:16 |
|
cousteau
| foo: there's a difference between what git does when merging and what it shows you | 21:18 |
|
| once you've merged, all git knows is: what are the two parent commits, what the code looked like in those commits, and what the code looks like now. | 21:18 |
|
| if you use a tool to visualize the diff, it will GENERATE the diff when you request to visualize it. Git does not store this diff anywhere; it stores complete snapshots of the code. | 21:19 |
|
| So... maybe Github is displaying things differently. | 21:19 |
| → Akiva joined | 21:20 |
|
cousteau
| ...wait, did you mean "show 5 lines as being a deletion" as in really "show", or as in "understand"? Because I think I misunderstood what you meant. | 21:20 |
|
| if this is about how git *merges* rather than how it displays the merges, then... well, github definitely or most likely uses git for merges, but it might tweak the default options | 21:21 |
|
| like, instead of defaulting to strategy X, it defaults to strategy Y, which is smarter about whatever | 21:21 |
|
foo
| cousteau: first of all, I appreciate your willingness to make sense of what I'm saying - thank you. For clarity, we use gitolite, with git. I did a git merge feature-branch. I fixed two conflicts. Then I did git diff --cached ... and I could clearly see that git was not showing me 5 lines - this is the first time I've ever seen this. What that meant is: we had 5 lines in there that should have been removed (it | 21:22 |
|
| was moved down in the code) | 21:22 |
|
cousteau
| Or, you have an old version of git, and it isn't as smart about merges. Git very recently introduced a new merging strategy that is now the default; maybe that is smarter in some regards | 21:22 |
|
foo
| Ohhhhh | 21:23 |
|
cousteau
| oh. Well, git diff doesn't show everything on a merge, be careful with that. | 21:23 |
|
foo
| cousteau: I wonder, if that's a version of gitolite or local git | 21:23 |
|
| cousteau: I believe git diff (CLI) only shows modifications? | 21:23 |
|
j416
| foo: with arguments it can diff other things than the work tree | 21:24 |
|
cousteau
| if you have two commits, it'll show differences directly. But with merges involved, things get funky | 21:24 |
| → wakeup joined | 21:24 |
|
cousteau
| I'd give you details if I understood 10% of it... | 21:24 |
|
foo
| lol | 21:25 |
|
| Fair enough | 21:25 |
|
j416
| haha. | 21:26 |
| ← cvmn left | 21:26 |
|
foo
| Can someone verify if github or gitbucket merges differently? My sense is, the developer was referring to the UI on merging | 21:26 |
|
j416
| I've been using git almost daily for over a decade and still haven't made much sense of the merge diffs | 21:26 |
|
foo
| haha, fair enough. | 21:27 |
|
j416
| (but I'm sure they make some sense, if you try) | 21:29 |
|
cousteau
| I think merge diffs only show the stuff that isn't in either of the ancestors | 21:29 |
|
| ...kinda | 21:29 |
|
| or that is in one of the ancestors when it should be in the other | 21:29 |
|
| i.e. only shows what you changed over a regular git merge | 21:30 |
|
foo
| I wonder if a loom (screen recording) would help get my point across. | 21:30 |
|
| I've never seen this before | 21:30 |
|
cousteau
| anyway. I assume gitolite has a GUI with a cool "Merge these two branches!" button that does all the work, right? | 21:31 |
|
foo
| cousteau: nah, no UI | 21:31 |
|
cousteau
| Maybe that button doesn't do the same thing as `git merge`, but rather `git merge --strategy=whatever --strategy-option=dunno` | 21:31 |
|
| oh | 21:31 |
|
| ...then what the hell is gitolite? | 21:32 |
|
foo
| cousteau: let's me specify perms to branches, https://gitolite.com/gitolite/index.html - , let's me set up git hosting for a couple projects | 21:32 |
|
cousteau
| I see | 21:32 |
|
| but I suppose gitolite itself doesn't merge, right? It just hosts a git repository, and if you want to merge you pull, merge, and push | 21:33 |
|
| (and if you try to push to a forbidden branch, then you get a paddlin') | 21:33 |
|
| because in that case it's your local git what's doing the merging, not gitolite | 21:34 |
| ← Flooo left | 21:34 |
| → madewokherd joined | 21:34 |
| ← Gustavo6046 left | 21:34 |
|
cousteau
| if it were something like github, I suppose it can "do some magic" when you merge through it. I can imagine that github may not do a "plain, option-less merge" when merging two branches through the GUI | 21:35 |
| ← hololeap_ left | 21:36 |
| → adonis joined | 21:36 |
| → john_johnk joined | 21:37 |
| → hololeap_ joined | 21:37 |
|
adonis
| whats the official way to deal with 'env: python: No such file or directory' when doing git commit on mac os 12.3. Mac os 12.3 removed python 2.7 which it seemed the git binary was using? | 21:37 |
| ← Akiva left | 21:38 |
| ← zeenk left | 21:39 |
|
cousteau
| ...install python again? | 21:39 |
|
| cousteau wonders if it HAS to be 2.7 or if python 3 will work just fine. After all, 2.7 is probably deprecated by now. | 21:40 |
|
cousteau
| actually don't pay much attention to me since I have no idea what the "official" fix is. (But you do have an up-to-date git, right?) | 21:41 |
|
adonis
| I have git updated to the latest yes | 21:41 |
|
| but I wonder if I can somehow get env to pickup python3 which I do have. | 21:42 |
| ← john_johnk left | 21:42 |
|
cousteau
| normally, python would link to python2 or python3 | 21:42 |
|
| but it's weird that nowadays there are still `#!/usr/bin/env python` scripts that don't specify either python2 or python3 explicitly | 21:43 |
|
adonis
| I tried doing alias python='python3' or even the absolute path to it but env still complains | 21:43 |
|
cousteau
| as far as I know, env won't get aliases | 21:44 |
|
| you'd need a symlink | 21:44 |
| → w_lehinsun joined | 21:44 |
|
cousteau
| doesn't have to be in /usr/bin (or whatever Mac uses); could be local, anywhere on the $PATH | 21:44 |
|
adonis
| right now python doesn't link to python3 on mac os 12.3 so yea let me try linking on those dirs you mentioned. | 21:44 |
|
cousteau
| be careful though, because if a script is in python2, calling it with python3 might fail | 21:45 |
| ← great_taste left | 21:45 |
| ← adgtl left | 21:46 |
| ← a1eaiactaest left | 21:46 |
|
adonis
| cousteau: good point. its better if I link python to python 2.7.x | 21:47 |
|
cousteau
| if you still have it, yes, definitely do link it to whichever version it was before | 21:47 |
|
| ...can't see any python script in git though | 21:47 |
| → MajorBiscuit joined | 21:48 |
|
cousteau
| (I recall that there were some python scripts, e.g. git-p4, but I can't find any on core git using python, on a quick and dirty and probably incomplete search) | 21:48 |
|
adonis
| cousteau: when I open the git binary for editing/inspecting I do see references to python in there though | 21:49 |
|
cousteau
| oh | 21:50 |
|
| ...well, I guess it's calling python with a script that is stored *somewhere else* | 21:50 |
|
| do you see how it's calling python? what script it's passing it? | 21:50 |
|
adonis
| nah, it’s a binary file :) | 21:50 |
| → john_johnk joined | 21:51 |
|
adonis
| that’s a machine executable file, not sure what the proper term would be :) | 21:51 |
|
cousteau
| yeah, I got that... I thought you were inspecting the binary and somehow found "python" in it | 21:51 |
|
adonis
| that’s what I pretty much did lol, theres a bunch of chars that can't be read but yea, python is referenced | 21:52 |
|
cousteau
| I see that the git source code has makefiles that try to figure out where is python installed; maybe the officialest solution for your case is "just recompile git"? | 21:53 |
|
| namely, the Makefile file has a PYTHON_PATH that defaults to /usr/bin/python. | 21:55 |
|
adonis
| cousteau: the makefiles having those references wouldn't tie into to python being in the binary though right? | 21:56 |
|
cousteau
| only .py file I see in the source code is git-p4.py, and it seems to be compatible with both python2 and python3... so I suspect you're safe with whatever version of python you have | 21:57 |
| → great_taste joined | 21:57 |
|
cousteau
| adonis: I think those references on the makefile determine how the binary will be compiled, so it'll eventually have a reference to that specific path | 21:58 |
|
| ...then again... that defines a path, so it doesn't use env. Your problem said something about env not finding python. | 21:58 |
|
adonis
| pretty much | 21:58 |
|
| specifically calling git commit -m "message", gives 'env: python: No such file or directory' | 22:00 |
|
| git add is ok | 22:00 |
| ← MajorBiscuit left | 22:01 |
| ← madewokherd left | 22:03 |
| ← awmv left | 22:03 |
| ← fling left | 22:04 |
| → fling joined | 22:06 |
| ← Murr left | 22:07 |
| → Akiva joined | 22:07 |
| → Murr joined | 22:07 |
|
adonis
| cousteau: how do I get env to pickup the path I specify for python? I tried doing env python=<python3 path here> git commit -m "test" but it won't pick it up. | 22:10 |
|
| env is picking the value up but git won't pick it up from env | 22:11 |
|
cousteau
| env python=... will only run the command with a $python environment variable | 22:14 |
|
adonis
| oh | 22:14 |
|
cousteau
| not set the path to `python` | 22:15 |
|
| you have to put a `python` executable in one of the directories listed in your $PATH | 22:15 |
| → ramblebamble joined | 22:15 |
|
cousteau
| for example, ``ln -s /usr/bin/python3 /usr/local/bin/python`` (assuming /usr/local/bin/python does not exist yet) | 22:16 |
|
| or mkdir /tmp/python-path; ln -s /usr/bin/python3 /tmp/python-path/python; env PATH="/tmp/python-path:$PATH" git commit... | 22:17 |
|
ramblebamble
| Hi there, got a quick question, I know that notes are not pushed upstream, and for my situation tags are a bit heavy weight, is there a way to mark commits residing on disjunct branches as leading to the same worktree structure? | 22:17 |
|
adonis
| yea I did that lol but wanted to not have to do that as python will now be linked to running python3 | 22:17 |
|
cousteau
| adonis: and let me see if there is some obscure env variable for setting git's python | 22:17 |
| → impermanence joined | 22:18 |
|
another|
| ramblebamble: lightweight tags? | 22:19 |
|
ramblebamble
| another|, no... I actually ment tags of any kind | 22:20 |
|
another|
| how are leightweight tags too heavy? | 22:21 |
|
cousteau
| forty-one whole bytes, man... | 22:22 |
|
ramblebamble
| I do not mean the byte-size, but the implications, tags are usually used to denote deployments, etc. I was hoping for something more distinct, or being able to tie to commits together in that regard | 22:24 |
|
another|
| yeah, gotta do a lot of jogging to counter those | 22:24 |
| ← tyson2 left | 22:24 |
|
ramblebamble
| a bit more context | 22:24 |
| → tyson2 joined | 22:24 |
|
another|
| annotated tags are usually for releases. lightweight tags for your own remarks | 22:25 |
|
ramblebamble
| I am currently thinking on orphaned checkouts, and how you might want to use one branch to serve your private repository and the other to serve e.g. heroku for deployment. You cherry pick the changes you want to deploy, maybe even rebase(but I am reading up on that as we speak). In any case, I require a way to symbolize that commit abc in branch a yields the same working tree as commit cbd on branch | 22:26 |
|
| j. | 22:26 |
| → jazzy joined | 22:27 |
|
ramblebamble
| While your description of tag-usage is correct, it is not always followed, e.g. CI/CD starts running on any tag it encounteres etc. | 22:27 |
| → tmz joined | 22:27 |
| ← john_johnk left | 22:28 |
| → john_johnk joined | 22:31 |
| ← EvilDMP left | 22:33 |
|
another|
| what would be the point of the separate branch? | 22:34 |
| → analpaper_ joined | 22:34 |
|
ramblebamble
| disjunct history over a common codebase/project | 22:35 |
| → cebor joined | 22:35 |
|
ramblebamble
| e.g. with Heroku or the AUR repository of Arch Linux you have a repository where you push to once you want to deploy, but then again you also have a remote where you want to develop | 22:35 |
|
| it allows you to publish only the bare minimum changeset, not show how the sausage is made so to speak in the remote used for publishing | 22:36 |
|
| but retain the information in the remote you use for development | 22:36 |
| ← analpaper left | 22:37 |
|
ramblebamble
| to enable this seemlessly tying commits together in the described way would be nice | 22:37 |
| ← junktext left | 22:39 |
| ← stef204 left | 22:42 |
|
another|
| id doesn't sound like you want disjunct history then. wouldn't simple feature branches serve that use case? | 22:43 |
| ← parsnip left | 22:44 |
|
ramblebamble
| no, if I want to retain information by keep other things private, I cannot rebase and ommit some commit-messages etc. that will cause trouble rebasing etc. and keeping those feature-branches open all the time. dedicated repos would be best, but that is also cumbersome in its own way, hence my idea with the orphaned branches | 22:45 |
| ← impermanence left | 22:46 |
| ← john_johnk left | 22:47 |
| → john_johnk joined | 22:49 |
|
cousteau
| adonis: does your repository have any hooks that may be calling python? | 22:51 |
|
| because otherwise it seems strange that python is being invoked, unless I'm missing something (as a normal git user who is not a git developer/maintainer or anything) | 22:52 |
| → dtux_ joined | 22:53 |
| → walterwhip joined | 22:54 |
| ← john_johnk left | 22:55 |
| dtux_ → dtux | 22:57 |
| ← hololeap_ left | 22:57 |
| → hololeap_ joined | 22:57 |
| ← walterwhip left | 22:58 |
| → geowiesnot joined | 23:00 |
|
adonis
| cousteau: you got it.. that’s the issue. there's a pre commit hook that ends up calling a python script | 23:00 |
| → madewokherd joined | 23:03 |
| → pizdets joined | 23:04 |
|
adonis
| cousteau: heres the script: github.com/hallettj/git-format-staged/releases/tag/v3.0.0 and what do you see for version 3.0.0? A fix to use python3, nice.. | 23:04 |
| → dvanloon7 joined | 23:09 |
| dvanloon7 → dvanloon | 23:09 |
| ← sa0 left | 23:09 |
| ← Akiva left | 23:10 |
|
cousteau
| ah, cool :) | 23:10 |
|
| honestly I have no idea how I guessed that | 23:10 |
| → sa0 joined | 23:11 |
| ← sa0 left | 23:15 |
| → parsnip joined | 23:15 |
| → Akiva joined | 23:27 |
| → bertvvvs joined | 23:31 |
| ← gurkenglas left | 23:32 |
| ← kexec left | 23:33 |
| ← DNH left | 23:36 |
| → TheCatBehemoth joined | 23:41 |
|
ramblebamble
| ok just to wrap things up, another|, apparently there isn't a way at least non that I could see. Then lightweight tags it is with changes on the CI/CD side. thanks for th support and ear. 'till next time | 23:44 |
| ← TheCatBehemoth left | 23:45 |
| ← wakeup left | 23:46 |
| ← rgrinberg left | 23:47 |
| ← ramblebamble left | 23:47 |
| → skapata joined | 23:53 |
| ← skapata left | 23:53 |
| → skapata joined | 23:53 |