| 2021-09-22 |
| → adlternative joined | 00:01 |
| → mrfhitz joined | 00:02 |
| ← lgc left | 00:10 |
| ← adlternative left | 00:11 |
| ← computeiro left | 00:12 |
| ← sarab left | 00:13 |
| → computeiro joined | 00:13 |
| → sarab joined | 00:19 |
| ← magic_ninja left | 00:20 |
| ← natrys left | 00:25 |
| → avarab joined | 00:33 |
| ← avar left | 00:33 |
| ← gioyik left | 00:36 |
| → igemnace joined | 00:37 |
| ← bket left | 00:37 |
| → ash_worksi joined | 00:37 |
| ← durham left | 00:40 |
| → bket joined | 00:49 |
| ← computeiro left | 00:49 |
| ← bket left | 00:57 |
| ← ash_worksi left | 00:58 |
| ← alzgh left | 00:59 |
| → magic_ninja joined | 01:06 |
| ← jwillikers left | 01:07 |
| → bket joined | 01:09 |
| ← hornhack left | 01:12 |
| → hackinghorn joined | 01:13 |
| ← sarab left | 01:13 |
| → durham joined | 01:17 |
| ← ___nick___ left | 01:17 |
| → ___nick___ joined | 01:19 |
| ← m-atoms left | 01:23 |
| → greyrat joined | 01:27 |
| → thelounge6619 joined | 01:27 |
| → lucerne joined | 01:27 |
| ← keypusher left | 01:29 |
| ← magic_ninja left | 01:30 |
| ← alkino left | 01:30 |
| ← elkalamar left | 01:32 |
| ← anton left | 01:32 |
| → magic_ninja joined | 01:32 |
| ← nyah left | 01:33 |
| → gioyik joined | 01:35 |
| → nightstrike joined | 01:39 |
| ← magic_ninja left | 01:41 |
| → magic_ninja joined | 01:42 |
| ← sgn left | 01:43 |
| → anton joined | 01:44 |
| ← gioyik left | 01:44 |
| → sgn joined | 01:45 |
| → adlternative joined | 01:50 |
| → a6a45081-2b83 joined | 01:59 |
| → causasui joined | 02:06 |
| → Dotz0cat joined | 02:14 |
| → Guest85 joined | 02:17 |
| → hoochmonger joined | 02:24 |
| ← causasui left | 02:25 |
| → twb joined | 02:26 |
|
twb
| I keep forgetting this. If I want to start a completely new branch, not connected to anything, how do I do that? | 02:26 |
| → gioyik joined | 02:28 |
| → causasui joined | 02:32 |
| ← mrfhitz left | 02:32 |
| ← gioyik left | 02:33 |
| → jetchisel joined | 02:35 |
| ← deltab left | 02:36 |
| ← causasui left | 02:41 |
| ← FinnElija left | 02:44 |
| → causasui joined | 02:44 |
| → FinnElija joined | 02:46 |
| → deltab joined | 02:46 |
| ← christall left | 02:47 |
| → christall joined | 02:47 |
| ← Guest17 left | 02:48 |
| ← jonosterman left | 02:48 |
| → jonosterman joined | 02:50 |
| → gioyik joined | 02:53 |
| ← christall left | 02:58 |
| ← gioyik left | 02:59 |
| ← hnOsmium0001 left | 03:07 |
| ← ChmEarl left | 03:07 |
| ← zebrag left | 03:17 |
| ← sgn left | 03:19 |
| → sgn joined | 03:20 |
| ← junktext left | 03:21 |
| ← anton left | 03:22 |
| → zebrag joined | 03:22 |
| ← austin987 left | 03:28 |
| → christall joined | 03:28 |
| → hnOsmium0001 joined | 03:31 |
| ← AnAverageHuman left | 03:33 |
| ← pulse left | 03:33 |
| → gioyik joined | 03:35 |
| ← gioyik left | 03:40 |
| → lpapp_ joined | 03:40 |
| → austin987 joined | 03:43 |
| ← lpapp_ left | 03:45 |
| ← christall left | 03:49 |
| ← Xaldafax left | 03:52 |
| ← ferdna left | 03:52 |
| → aniruddha joined | 03:53 |
| ← hoochmonger left | 04:00 |
| ← cweiss left | 04:01 |
| → cweiss joined | 04:02 |
|
bradyt
| O.O | 04:03 |
|
| if i knew the name of it, i could give a hint quickly | 04:03 |
|
| what are those called? parentless commits? | 04:03 |
|
| but you mean not even a commit? | 04:03 |
|
| a new root commit? | 04:04 |
|
twb
| bradyt: no commits at all, exactly | 04:06 |
|
bradyt
| eww | 04:06 |
|
twb
| the same as if you did "git init" | 04:06 |
|
| I ended up futzing it with filter-repo | 04:06 |
|
| bradyt: you look funny with your work nick on | 04:06 |
|
bradyt
| why would you want _no_ commit? | 04:06 |
|
| twb: yeah i mention my repos elsewhere and i don't feel a need to express myself elsewhere ;) | 04:07 |
|
twb
| bradyt: so that I can cherry-pick some other commits to be the start of a fresh branch | 04:07 |
|
bradyt
| oh, yeah, hard to manipulate the root commits i guess | 04:08 |
|
twb
| Basically I had a commit history with derp.c derp.c derp.c derp.c good.c good.c <delete derp.c> | 04:08 |
|
| And I wanted to just go "actually pretend derp.c never existed, it can go in its own 'failed experiments' repo" | 04:08 |
| ← zebrag left | 04:13 |
| ← subopt left | 04:14 |
| ← gast0n left | 04:15 |
| → christall joined | 04:17 |
| ← pyeveryt_ left | 04:17 |
| → hbautista joined | 04:17 |
| → pyeverything joined | 04:17 |
| → fulljab joined | 04:18 |
| → ThomasD13 joined | 04:18 |
|
twb
| Is it possible to make tig colorize "fixup!" and "squash!" strings? | 04:19 |
| ← pyeverything left | 04:22 |
| ← vishal left | 04:35 |
| ← christall left | 04:36 |
| → vishal joined | 04:39 |
| ← bket left | 04:39 |
| → bket joined | 04:42 |
| → saroy joined | 04:44 |
| ← fulljab left | 04:47 |
| ← locrian9 left | 04:47 |
| → fulljab joined | 04:48 |
| → Brumaire joined | 04:50 |
| → pyeveryt_ joined | 04:52 |
| → gioyik joined | 04:52 |
| ← k-man left | 04:54 |
| ← a6a45081-2b83 left | 04:54 |
| → k-man joined | 04:55 |
| ← hbautista left | 04:58 |
| ← Guest85 left | 04:59 |
| → gnoo joined | 05:01 |
| → hbautista joined | 05:01 |
| → Mo joined | 05:12 |
| ← durham left | 05:14 |
| ← lavos left | 05:14 |
| → lavos joined | 05:15 |
| ← squirrel left | 05:15 |
| ← bradyt left | 05:15 |
| → lpapp_ joined | 05:15 |
| → bradyt joined | 05:15 |
| ← hexology left | 05:17 |
| → blmt8 joined | 05:17 |
| ← deepy left | 05:18 |
| ← cluelessperson left | 05:18 |
| → deepy joined | 05:18 |
| → hexology joined | 05:18 |
| → cluelessperson joined | 05:18 |
| ← jonosterman left | 05:18 |
| ← blmt left | 05:19 |
| blmt8 → blmt | 05:19 |
| ← Brumaire left | 05:21 |
| → jonosterman joined | 05:21 |
| ← LiENUS left | 05:27 |
| → LiENUS joined | 05:33 |
| ← hbautista left | 05:41 |
| → dimi1947 joined | 05:46 |
| ← dimi1947 left | 05:47 |
| → ash_worksi joined | 05:47 |
| → alkino joined | 05:49 |
| → beshr joined | 05:50 |
| ← thiago left | 05:51 |
|
lpapp_
| hi, what is the best way to show our QA engineers how branching works in git? What gets to where when we backport to a release branch, what commits are not their from main, etc? Is it gitk or something similar? | 05:52 |
|
| or just a generic git branching model picture? | 05:52 |
| ← pyeveryt_ left | 05:54 |
| ← ash_worksi left | 05:54 |
| ← thekingofbandit left | 05:54 |
|
ikke
| I think something generic would work better | 05:55 |
|
lpapp_
| is there a stock git photo for this | 05:55 |
|
| screenshot* | 05:55 |
|
| but in general, what do you use for the branching | 05:55 |
|
| I remember there was even a command line output similar to gitk | 05:55 |
|
| but I cannot remember the exact command. | 05:55 |
| → thekingofbandit joined | 05:56 |
|
lpapp_
| it was some "ascii chart" of the way branches happened to be. | 05:56 |
|
| with | / and \ indicators. | 05:56 |
|
ikke
| !lol | 05:58 |
|
gitinfo
| A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all | 05:58 |
| → kenanmarasli joined | 05:58 |
| ← kenanmarasli left | 05:58 |
| → kenanmarasli joined | 05:58 |
|
lpapp_
| hmm, this is not what I have seen once. | 05:59 |
|
| This does not seem to show graphs. | 05:59 |
|
| it seems to show: * hash commit-title only. | 06:00 |
|
| git log --oneline --graph --decorate --all | 06:00 |
|
bookworm
| that's what oneline does.... | 06:00 |
|
lpapp_
| ah, without --all, it is better | 06:00 |
|
bookworm
| without all you'll only see commits reachable from the current branch | 06:01 |
|
lpapp_
| without all, I get | for the main flow, and then / | \ for branching off and then merging back to the main flow. | 06:01 |
|
| without -all* | 06:01 |
|
| without --all* | 06:01 |
|
| should @gitinfo be corrected to remove --all? Or is it a Mac specific thing? | 06:03 |
| ← R2robot left | 06:03 |
|
lpapp_
| oh, I see, it actually works, just need to scroll up, it prints a lot more than just the graph itself! | 06:04 |
|
| sorry then | 06:04 |
|
| oh no, I am lost. | 06:05 |
|
ikke
| Normally a pager is opened | 06:06 |
|
lpapp_
| is there a page that explains the output? | 06:06 |
|
| |/| | | | | | | | | | | | 06:06 |
|
| when I scroll down, I see a lot of that | 06:06 |
|
| it feels overwhelming at first why so many |s | 06:06 |
|
ikke
| it means there are lots of parallel branches that were later merged | 06:07 |
|
lpapp_
| but if I scroll down more, they seem to grow like anything | 06:07 |
|
| the |s | 06:07 |
|
| | | * | | | | | | | | | | | | | | | | | | | | | | | | | | 06:08 |
| → R2robot joined | 06:08 |
|
lpapp_
| | | | | | | | | | | | |_|_|_|_|_|_|_|/ / / / / / / / / / / / / / | 06:08 |
|
| this output is really heavy | 06:08 |
| ← jonosterman left | 06:08 |
|
lpapp_
| maybe not the best to show to QA, even I am confused myself as a dev. | 06:08 |
|
ikke
| yes, history can become quite complex over time | 06:09 |
|
| that's why I mentioned a generic branching overview might be better | 06:09 |
|
lpapp_
| I guess what would be useful to show them is that the release branches branched off at a certain point | 06:09 |
|
| and after that, whatever goes to main, it does not go to them | 06:09 |
| ← twb left | 06:09 |
|
lpapp_
| it would be good to show this to them visually, maybe it is better than words | 06:09 |
|
| and when we fix something, it goes into main, and if we backport a change, it goes to old release branches to as and when. | 06:09 |
|
ikke
| Something like https://nvie.com/posts/a-successful-git-branching-model/ | 06:09 |
| → jonosterman joined | 06:10 |
| → ttree joined | 06:11 |
| ← beencubed left | 06:13 |
|
lpapp_
| thanks, I find this image complex: https://nvie.com/img/git-model@2x.png | 06:14 |
|
| I was hoping to see a main, topic branches, and release branches, that is all | 06:14 |
|
ikke
| yes, git flow is a little bit more advanced | 06:14 |
|
lpapp_
| is there a simple representation | 06:15 |
|
| basically, we use main, release branches, and topic branches | 06:15 |
|
| I think that is all to it. | 06:15 |
|
ikke
| https://githubflow.github.io/, but that does not have a diagram | 06:15 |
|
lpapp_
| probably a standard way of working, I would imagine? | 06:15 |
|
| yeah, a graphical presentation would probably be better perceived. | 06:15 |
|
| "We consider origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. " | 06:19 |
|
| oh, okay, so it is the same as main for us | 06:19 |
|
| that is why our flow is slightly simpler than git flow. | 06:19 |
|
| or perhaps, this develop branch could be considered a long-lived topic branch in our workflow. | 06:20 |
|
| but definitely not an overarching branch. | 06:20 |
| → wernerf joined | 06:21 |
| wernerf → wernerfred | 06:21 |
|
lpapp_
| features branches and hotfix branches, not sure what the difference is | 06:22 |
| ← fulljab left | 06:22 |
|
lpapp_
| other than one is bug, other is feature | 06:22 |
|
| but that is just semantics, mechanically, they are pretty much the same? | 06:22 |
|
| it is a branch for a "topic" | 06:22 |
|
ikke
| how do you use release branches | 06:22 |
|
| lpapp_: in git flow, hotfix branches are directly created on master, while topic branches are created on develop | 06:23 |
|
| other than that, not a lot of difference | 06:23 |
|
lpapp_
| oh, I see, that is why we do not have a difference... because we do not have develop. | 06:24 |
|
| thanks | 06:24 |
|
| what I found over the years working for different companies and on different projects, some prefer fixing bugs in main first, then backport the first to release branches, and some people prefer fixing a bug in a release branch first and then backport to main. | 06:25 |
|
ikke
| lpapp_: https://imgur.com/a/oeNjWih | 06:25 |
|
| basis | 06:25 |
|
lpapp_
| e.g. git-flow: Must merge back into: | 06:25 |
|
ikke
| Created with https://excalidraw.com/ | 06:25 |
|
lpapp_
| develop and master | 06:25 |
|
| we do the opposite | 06:25 |
|
| we fix in main and then backport, unless it is really only release specific and not applicable in main | 06:26 |
|
| ikke: thanks, I usually use inkscape | 06:26 |
| → pyeverything joined | 06:26 |
|
ikke
| Ok, so you use release branches to continue support on released versions? | 06:27 |
|
lpapp_
| yep! | 06:27 |
|
ikke
| right, makes sense | 06:27 |
|
lpapp_
| because our customers do not often upgrade | 06:27 |
|
ikke
| in git-flow, releases branches happen before the actual release | 06:27 |
|
lpapp_
| once they get a major release, they practically stick to it for a very long time | 06:27 |
|
| and we want them to benefit from bugfixes we are doing for newer releases. | 06:27 |
|
| yes, that is when they are branched off | 06:28 |
|
| before RC1 | 06:28 |
|
| but we do not fix bugs there first and then merge back to main | 06:28 |
| → christall joined | 06:34 |
| ← alkino left | 06:36 |
|
lpapp_
| ikke: when was the github flow written? It still refers to master. | 06:37 |
|
ikke
| long time ago | 06:37 |
|
lpapp_
| "GitHub is 35 employees now" | 06:37 |
|
| yes... | 06:37 |
|
ikke
| https://i.imgur.com/tHPVkOS.png | 06:38 |
| → srinidhi joined | 06:40 |
|
ikke
| Something like that/ | 06:40 |
| ← Betal left | 06:41 |
|
lpapp_
| ikke: looks like what I described is closer to github flow | 06:42 |
|
ikke
| yes | 06:43 |
|
| though they don't have release branches | 06:43 |
|
lpapp_
| yes, looks good, so only need adding the backporting workflow to it and then it is more or less complete. | 06:43 |
|
| right, so we are in-between. | 06:43 |
|
ikke
| a service like github mostly only needs to support one deployment | 06:43 |
|
lpapp_
| yep | 06:44 |
|
| is there a "standard flow" out there like ours? | 06:44 |
|
| github flow + release branches? | 06:45 |
|
ikke
| Not aware of any fancy name for it | 06:45 |
| ← jazzy left | 06:45 |
| ← Furai left | 06:47 |
|
lpapp_
| not just name, but like a description | 06:48 |
|
| so that I do not need to describe it from scratch. I can refer QA to an existing description. | 06:48 |
|
ikke
| Not aware of anything written down | 06:48 |
|
lpapp_
| ok, thanks. | 06:48 |
| → rsx joined | 06:48 |
|
lpapp_
| so, these are the two main well-known flows documented in public? | 06:49 |
| ← AbleBacon left | 06:49 |
|
ikke
| There are probably others, but I don't know / recollect them | 06:50 |
|
lpapp_
| ok, thanks. | 06:50 |
| → Furai joined | 06:55 |
| ← Furai left | 06:55 |
|
lpapp_
| ikke: how about this? https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow | 06:55 |
| → Furai joined | 06:55 |
| → palasso joined | 06:57 |
|
ikke
| seems like they merge their release branches back | 06:57 |
| ← ttree left | 06:57 |
|
ikke
| so sounds more like git flow without an intermediate develop branch | 06:58 |
| ← jonosterman left | 06:58 |
|
lpapp_
| ikke: https://www.endoflineblog.com/img/oneflow/feature-branch-rebase-final.png I do not get this. How do the 3 purple circles become two? | 07:00 |
|
ikke
| Maybe they squashed one commit when rebasing/ | 07:01 |
| → jonosterman joined | 07:01 |
| ← gnoo left | 07:01 |
|
lpapp_
| ikke: yes, it looks like they remove the release branches, so they probably do not need to maintain old releases | 07:02 |
| ← srinidhi left | 07:02 |
|
lpapp_
| they also use hotfixes from the gitflow model | 07:02 |
|
| hotfix branches, that is | 07:02 |
| ← christall left | 07:03 |
|
ikke
| yes, but at this point there is very little difference between them and feature branches | 07:04 |
| → AnapodoPsalidaki joined | 07:06 |
| ← unluckyshrubbery left | 07:09 |
| ← gioyik left | 07:12 |
| → average joined | 07:21 |
| ← jrofd left | 07:24 |
| → srinidhi joined | 07:24 |
| ← dviola left | 07:27 |
| → dviola joined | 07:29 |
| → elkalamar joined | 07:31 |
| ← jetchisel left | 07:34 |
| → christall joined | 07:35 |
| ← tejr left | 07:39 |
| → tejr joined | 07:40 |
| ← christall left | 07:40 |
| ← Xenguy left | 07:43 |
| → Xenguy joined | 07:43 |
| ← jonosterman left | 07:49 |
| → EvilDMP joined | 07:51 |
| → jonosterman joined | 07:51 |
| ← Gustavo6046 left | 07:57 |
| → Gustavo6046 joined | 07:57 |
| → xiongxin8802 joined | 07:58 |
| ← xiongxin8802 left | 07:58 |
| → xiongxin joined | 07:59 |
| → TomyWork joined | 08:00 |
| → sarab joined | 08:03 |
| ← sarab left | 08:03 |
| ← thekingofbandit left | 08:03 |
| ← tejr left | 08:07 |
| → tejr joined | 08:07 |
| → john_johnk joined | 08:08 |
| ← Tobbi_ left | 08:18 |
| → Tobbi_ joined | 08:18 |
| → nyah joined | 08:20 |
| ← jimklimov1 left | 08:21 |
| ← lpapp_ left | 08:23 |
| → virr joined | 08:25 |
|
virr
| hello | 08:25 |
| ← rahl left | 08:25 |
|
virr
| I did a mistake, did the file changes in wrong branch (forget the checkout), is there a way to bring the changes to the right branch without do it manually? | 08:26 |
|
ikke
| virr: !float | 08:26 |
|
gitinfo
| virr: If you have made a change in your working directory and have NOT YET COMMITTED, you may "float" that change over to another (`git checkout existing_branch`) or new (`git checkout -b newbranch`) branch and commit it there. If the files you changed differ between branches, the checkout will fail. In that case, `git stash` then checkout, and `git stash apply` and go through normal conflict resolution. | 08:26 |
| → rahl joined | 08:27 |
|
virr
| I did the commit :( | 08:27 |
|
baltazar
| virr: you can git reset HEAD^ then I think | 08:28 |
|
virr
| but I lose the changes, right | 08:28 |
|
| ? | 08:28 |
| → mrfhitz joined | 08:28 |
|
ikke
| baltazar: they have not committed yet | 08:29 |
|
baltazar
| virr: by default it does --mixed, which only changes the index, not the worktree | 08:29 |
|
| ikke: 10:27 < virr> I did the commit :( | 08:29 |
| → jimklimov joined | 08:29 |
|
ikke
| then checkout that branch you want it on | 08:29 |
|
| git cherry-pick <first-branch> | 08:29 |
|
| then reset the first branch a commit back | 08:30 |
|
virr
| ok, it seems to work | 08:31 |
|
| now i can commit to the right branch | 08:31 |
| → lpapp_ joined | 08:31 |
|
virr
| thanks | 08:35 |
| ← j`ey left | 08:36 |
| → gordonfish- joined | 08:36 |
| → baltazaar joined | 08:37 |
| ← cweiss left | 08:37 |
| ← Arokh left | 08:37 |
| → cweiss0 joined | 08:37 |
| → Arokh joined | 08:37 |
| ← baltazar left | 08:37 |
| baltazaar → baltazar | 08:37 |
| ← xD- left | 08:37 |
| ← gordonfish left | 08:38 |
| ← sco1 left | 08:38 |
| ← samuelbernardo left | 08:38 |
| ← pieguy128 left | 08:38 |
| → sco1 joined | 08:38 |
| → samuelbernardo joined | 08:38 |
| → pieguy128 joined | 08:38 |
| → xD- joined | 08:39 |
| ← jonosterman left | 08:39 |
| → theoceaniscool joined | 08:40 |
| → jonosterman joined | 08:41 |
| → cadmio joined | 08:41 |
|
cadmio
| Hello | 08:42 |
|
| I want to update my repository via command line on github | 08:42 |
|
| I've created an access token, but when logging in I get "remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead." | 08:43 |
| ← xiongxin left | 08:43 |
|
ikke
| cadmio: did you use the access token as password? | 08:43 |
| → af joined | 08:43 |
| ← mrfhitz left | 08:43 |
|
cadmio
| no I didn't | 08:45 |
|
ikke
| Then you should | 08:45 |
|
| just creating the token is not sufficient | 08:45 |
| → jetchisel joined | 08:46 |
|
cadmio
| ok thanks | 08:47 |
| ← cadmio left | 08:47 |
| ← hnOsmium0001 left | 08:47 |
| → alkino joined | 08:49 |
| → mrfhitz joined | 08:51 |
| → xiongxin joined | 08:53 |
| → xx joined | 08:54 |
| ← baltazar left | 08:54 |
| ← skapata left | 08:54 |
| ← mrfhitz left | 08:55 |
| → baltazar joined | 08:56 |
| ← jinsun left | 08:57 |
| → hqdruxn08 joined | 08:58 |
| ← adlternative left | 09:00 |
| ← hqdruxn08_ left | 09:01 |
| ← sudoforge left | 09:03 |
| ← lavos left | 09:05 |
| → molt joined | 09:06 |
| → hornhack joined | 09:13 |
| ← virr left | 09:14 |
| → unluckyshrubbery joined | 09:14 |
| ← hackinghorn left | 09:16 |
| → mrfhitz joined | 09:17 |
| ← mrfhitz left | 09:18 |
| → mrfhitz joined | 09:19 |
| ← mrfhitz left | 09:19 |
| ← R2robot left | 09:21 |
| → mrfhitz joined | 09:22 |
| ← Murr left | 09:27 |
| → Murr joined | 09:28 |
| ← jonosterman left | 09:28 |
| → jinsun joined | 09:28 |
| → jonosterman joined | 09:30 |
| ← mrfhitz left | 09:33 |
| → mrfhitz joined | 09:33 |
| → christall joined | 09:38 |
| → robz joined | 09:45 |
| → natrys joined | 09:49 |
| ← Mo left | 09:51 |
| → keypusher joined | 09:56 |
| → hackinghorn joined | 09:59 |
| ← hornhack left | 10:00 |
| → jla joined | 10:01 |
| ← saroy left | 10:01 |
| → saroy joined | 10:01 |
|
| jla .. just cloned a fresh remote repo, and trying to checkout onto another branch (but master) | 10:01 |
|
jla
| would 'git fetch' download all branches to my hard disk so that i can happily 'git checkout otherBranch' from master ? That's not occuring... what am i missing ? | 10:03 |
| → keypushe- joined | 10:03 |
|
ikke
| jla: depending on the fetchspec | 10:04 |
|
jla
| ? | 10:04 |
|
ikke
| if you did git clone -b <branchname> <remote> | 10:04 |
| ← keypusher left | 10:04 |
|
ikke
| then git gets setup to just fetch that single branch | 10:04 |
|
jla
| ah | 10:04 |
|
| i just made standard 'git clone git@...reponame ' | 10:05 |
|
ikke
| git config remote.origin.fetch | 10:05 |
| keypushe- → keypusher | 10:06 |
| → computeiro joined | 10:06 |
| → ConstantDesc joined | 10:06 |
|
jla
| when i do 'git branch --list' i just see 'master' branch... even after 'git fetch (--all )' | 10:06 |
|
ikke
| git branch --remote | 10:07 |
| ← christall left | 10:08 |
|
wyre
| hi guys, could I do a rebase in a fork of a branch in the upstream that isn't present in the fork? | 10:08 |
|
| I mean, guess I have an upstream with `master` and `branch1` and I do a fork of this and I create a branch like `branch2` in my fork, but people in the upstream keeps working on `branch1` ... could I do a rebase of my `branch2` in that `branch1`? | 10:10 |
|
ikke
| You can fetch from upstream and then rebase branch2 onto branch1, yes | 10:11 |
|
wyre
| ikke, so the commits in branch1 will be created in branch2, right? | 10:12 |
|
ikke
| wyre: commits don't belong to a single branch | 10:12 |
|
| the commits in branch2 are appended to the commits in branch1 | 10:13 |
| ← igemnace left | 10:14 |
|
jla
| thXs ikke , i solved it with 'for remote in `git branch -r`; do git branch --track $remote; done' prior to git fetch + pull (--all) ^^ | 10:17 |
|
ikke
| just git fetch is enough | 10:18 |
| ← jonosterman left | 10:18 |
|
ikke
| pull is fetch and merge into local branch | 10:18 |
| → jonosterman joined | 10:20 |
| ← shalok left | 10:21 |
| → shalok joined | 10:21 |
| → hqdruxn08_ joined | 10:21 |
|
jla
| ah | 10:24 |
| ← hqdruxn08 left | 10:25 |
| ← dhch left | 10:30 |
| ← wernerfred left | 10:38 |
| → cousteau joined | 10:38 |
| ← ConstantDesc left | 10:38 |
| → jwillikers joined | 10:38 |
| ← nightstrike left | 10:39 |
| → reset joined | 10:46 |
| → ConstantDesc joined | 10:51 |
| ← xiongxin left | 10:54 |
| → gnoo joined | 10:54 |
| → momomo joined | 10:55 |
| → dhch joined | 10:55 |
| → wernerf joined | 10:57 |
| wernerf → wernerfred | 10:57 |
| ← ConstantDesc left | 11:01 |
| → daoudr joined | 11:03 |
| ← jla left | 11:04 |
| → ConstantDesc joined | 11:07 |
| ← ConstantDesc left | 11:20 |
| ← betelgeuse left | 11:20 |
| → betelgeuse joined | 11:21 |
| → lgc joined | 11:21 |
| → ConstantDesc joined | 11:21 |
| ← causasui left | 11:22 |
| → Swahili joined | 11:29 |
| ← mrfhitz left | 11:30 |
| → hoochmonger joined | 11:31 |
| → jla joined | 11:35 |
| ← alkino left | 11:36 |
| → KaitoDaumoto joined | 11:36 |
| ← KaitoDaumoto left | 11:37 |
| → KaitoDaumoto joined | 11:38 |
| ← KaitoDaumoto left | 11:38 |
| → KaitoDaumoto joined | 11:38 |
| ← KaitoDaumoto left | 11:38 |
| → alkino joined | 11:40 |
| ← jla left | 11:44 |
| ← LuKaRo left | 11:49 |
| → LuKaRo_ joined | 11:50 |
| → onizu joined | 12:01 |
| → christall joined | 12:05 |
| → alzgh joined | 12:11 |
|
alzgh
| hello, I'm relatively new to git. I use `git add --interactive` a lot and sometimes when I manually edit the hunk, I get errors that the patch couldn't be applied. I don't know the reason tho. | 12:11 |
|
| Other times it works. | 12:12 |
|
| I can show you an example if it helps to get to the bottom of the problem. | 12:12 |
| ← computeiro left | 12:13 |
|
ikke
| alzgh: manipulating diffs is kind of tricy | 12:14 |
|
| tricky* | 12:14 |
| → xiongxin8802 joined | 12:14 |
|
ikke
| things like context matter | 12:14 |
|
alzgh
| ikke: do you mean that nothing can be done about it? | 12:15 |
|
ikke
| It means you need to be familiar with the diff format and how patches are applied. | 12:16 |
|
| There are other tools which make it easier to selectively stage changes | 12:17 |
|
| for example, tig allows you to select per line to stage it | 12:17 |
|
alzgh
| my current problem concerns a hunk that contains the tail of my document. I want to add some lines from the beginning of that hunk and leave the rest of the tail untouched. This isn't surely very complicated, I assue? | 12:19 |
|
| *assume | 12:19 |
| → momomo_ joined | 12:20 |
| ← momomo left | 12:22 |
|
alzgh
| Also, if you know of a good read(s) about how I can overcome this problem by learning how diffs work, I'll be happy to educate myself :D ikke | 12:23 |
|
ikke
| alzgh: the format is called unified diff | 12:23 |
| → tirnanog joined | 12:24 |
| ← ConstantDesc left | 12:27 |
| ← christall left | 12:28 |
| → otisolsen70 joined | 12:29 |
|
osse
| alzgh: there's a guide at the bottom of the editor | 12:30 |
|
| alzgh: fro mwhat you said it sounds like you want to delete the lines you don't want to add | 12:31 |
| ← chexum left | 12:32 |
| → chexum joined | 12:35 |
| → ConstantDesc joined | 12:36 |
|
alzgh
| osse: I know that guide. I use it regularly. My problem is that git throws (in my ignorant view) random errors for some patches where I edit a hunk and does not do this in others. | 12:39 |
|
| This should have been an easy edit. | 12:39 |
|
ikke
| yes, but sometimes you hit edge cases (literally and figuratively) | 12:39 |
|
alzgh
| Just remove the lines at the end or comment them out using `#`. But it throws an error and I can't understand why. | 12:40 |
|
ikke
| alzgh: can you show the diff? | 12:40 |
|
alzgh
| yes ikke, that must be it and me not knowing all the inner workings leads to not being able to debug. | 12:40 |
|
| ikke: yes | 12:40 |
|
ikke
| alzgh: not sure if it matters, but one thing that git tries to help you with is to adjust the hunk header numbers | 12:42 |
|
| @ -x,y +x,y @ | 12:42 |
|
| It could be failing there | 12:43 |
|
alzgh
| https://paste.centos.org/view/c60f8f09 | 12:50 |
|
| if you look at the last 4/5 hunk, I want only the first 2 lines of that hunk | 12:50 |
|
| ikke: | 12:51 |
|
| when I go into edit mode and delete the rest of the lines, it doesn't work | 12:51 |
|
| when I comment out the rest of lines it also doesn't work | 12:51 |
| → R2robot joined | 12:52 |
|
alzgh
| It's actually the 5/5 hunk, the last | 12:52 |
| → christall joined | 12:52 |
|
ikke
| Do you remove '\ No newline at end of file'? | 12:52 |
|
alzgh
| should I or should I not? | 12:52 |
|
ikke
| I'm not certain. I don't think it's official part of the diff format | 12:53 |
|
alzgh
| I removed it know and it was accepted with a warning saying: | 12:54 |
| ← alkino left | 12:57 |
|
alzgh
| warning: 1 line adds whitespace errors. | 12:58 |
|
| sorry for the delay | 12:58 |
|
osse
| missing newline at the end of the file is concidered a whitespace error by git i think | 12:59 |
|
| you can just ignore it | 12:59 |
|
alzgh
| nice | 12:59 |
|
| In some previous projects, I would get a similar error when trying to edit hunks | 12:59 |
|
| In those cases the hunks always involved `#`. They were MD files and I had to use `#` for H1 | 13:00 |
|
| I can see why git would be confused, but I don't know what to do about it. | 13:01 |
| → gh34 joined | 13:02 |
| ← jonosterman left | 13:04 |
| → jonosterman joined | 13:05 |
| ← Swahili left | 13:05 |
| ← dviola left | 13:08 |
| → dviola joined | 13:08 |
| ← wernerfred left | 13:11 |
| → pulse joined | 13:14 |
| ← Xenguy left | 13:17 |
| ← chexum left | 13:22 |
| → chexum joined | 13:22 |
| ← jonosterman left | 13:22 |
|
roxlu
| would it be possible to find/retrieve a file from a git repository which has been removed and all I know is the name of the file? | 13:23 |
| → jonosterman joined | 13:24 |
|
osse
| try git log -- '**/file.txt' | 13:25 |
|
| the first listed commit should be the one that removed it | 13:25 |
| → zebrag joined | 13:25 |
| ← ThomasD13 left | 13:27 |
| ← Murr left | 13:27 |
|
roxlu
| hmm can't find it .. maybe wasn't part of the repos in the first place. I'm not sure how ffmpeg (which is the repos) handles this. https://ffmpeg-devel.ffmpeg.narkive.com/ZLifxdzv/patch-v2-examples-vaapi-dec-scaling-add-a-vaapi-decoding-scaling-sample | 13:27 |
| → Murr joined | 13:28 |
| ← TJ- left | 13:28 |
| → TJ- joined | 13:29 |
| ← lpapp_ left | 13:30 |
| → kek_ joined | 13:30 |
|
kek_
| hi | 13:30 |
| ← jonosterman left | 13:33 |
| ← elibrokeit left | 13:33 |
| → jonosterman joined | 13:34 |
| → elibrokeit joined | 13:35 |
| ← jonosterman left | 13:39 |
|
alzgh
| hi kek_ | 13:41 |
| → wernerf joined | 13:41 |
| → jonosterman joined | 13:41 |
|
kek_
| I made branch A. I checked out branch A. I commited stuff and pushed branch A and made a merge request. I now want to work on something else and make a branch B for it. But to work on B I need A. I thought I could just merge A into B and start working but then I basically already merged it, surpassing the merge request I just did. Now the reason I need A to work on B is simple: It won't compile without A but it does not depend on A. There's a | 13:42 |
|
| dependency X of version 3.3 and I upgraded it locally to 3.4 and in A I solve some simple type issues which are backwards compatible. So I only need A in B because I can't compile it locally otherwise. Ofc the solution would be to have proper dependency management but that's not gonna happen (not in my power), I don't even think they fixed the version of the dependency. People just hope it works basically (and we get a lot of issues from it, but | 13:42 |
|
| whatever). What should I do? Can I somehow "temporarily merge A into B, work on B, ditch A, and push B"? (that would not break anything). | 13:42 |
| wernerf → wernerfred | 13:45 |
| ← Dotz0cat left | 13:45 |
|
kek_
| I think I just downgrade the dependency and work on it and try to convince the "boss" to implement better dependency management. | 13:47 |
| → fulljab joined | 13:48 |
|
osse
| You can start B from the tip of A, and after A is accepted you can rebase B onto the main branch | 13:48 |
|
alzgh
| based and git pilled :D | 13:49 |
| → Brumaire joined | 13:49 |
|
ikke
| You could also try to merge updating the dependency firs, and then both A and B can be based on that | 13:49 |
|
| (if it makes sense) | 13:49 |
| → Dotz0cat joined | 13:49 |
|
kek_
| osse, thanks, might do that alzgh ikke didn't get what you were saying but I think what osse said makes sense and seems. At least to my limited git knowledge. | 13:53 |
| → Swahili joined | 13:56 |
| ← Brumaire left | 13:58 |
| → Brumaire joined | 13:58 |
| ← fulljab left | 13:58 |
| ← deltab left | 14:03 |
| → AnAverageHuman joined | 14:04 |
| → deltab joined | 14:10 |
| ← jwillikers left | 14:10 |
| → hnOsmium0001 joined | 14:12 |
| → fulljab joined | 14:14 |
| → geirha1 joined | 14:14 |
| ← elkalamar left | 14:15 |
| geirha1 → geirha | 14:15 |
| ← hoochmonger left | 14:21 |
| → sadtaco joined | 14:26 |
| → arcatech joined | 14:26 |
| ← natrys left | 14:28 |
| ← Brumaire left | 14:29 |
| ← jonosterman left | 14:29 |
| → sudoforge joined | 14:30 |
| → jonosterman joined | 14:31 |
| ← jonosterman left | 14:31 |
| → jonosterman joined | 14:33 |
| ← christall left | 14:34 |
| → thiago joined | 14:39 |
| → christall joined | 14:39 |
| → gast0n joined | 14:42 |
| ← cousteau left | 14:43 |
| ← wernerfred left | 14:43 |
| → Xaldafax joined | 14:53 |
| → AbleBacon joined | 14:57 |
| ← fulljab left | 15:00 |
| → ChmEarl joined | 15:07 |
| ← average left | 15:11 |
| ← kenanmarasli left | 15:11 |
| → odoood joined | 15:11 |
| gordonfish- → gordonfish | 15:17 |
| → elkalamar joined | 15:18 |
| ← jonosterman left | 15:18 |
| → jonosterman joined | 15:22 |
| ← jonosterman left | 15:24 |
| → jonosterman joined | 15:25 |
| → thekingofbandit joined | 15:25 |
| ← jonosterman left | 15:26 |
| ← kek_ left | 15:26 |
| → jonosterman joined | 15:26 |
| ← Murr left | 15:27 |
| → Murr joined | 15:28 |
| ← jonosterman left | 15:31 |
| → jmartin joined | 15:32 |
| ← jmartin left | 15:32 |
| → jonosterman joined | 15:32 |
| ← jonosterman left | 15:34 |
| → jonosterman joined | 15:34 |
| ← jonosterman left | 15:35 |
| → jonosterman joined | 15:35 |
| ← madewokherd left | 15:36 |
| → Null_A joined | 15:37 |
| ← jonosterman left | 15:38 |
| → jonosterman joined | 15:39 |
| → subopt joined | 15:43 |
| subopt → _subopt | 15:43 |
| ← pulse left | 15:43 |
| → jazzy2 joined | 15:44 |
| jazzy2 → jazzy | 15:46 |
| → Guest63 joined | 15:47 |
| ← srinidhi left | 15:47 |
|
Guest63
| Hello there. This is my first post. What would be the set of git commands any newbie should master? | 15:48 |
| → Brumaire joined | 15:49 |
| → average joined | 15:49 |
|
ikke
| clone, status, add, commit, log, diff, show, branch, fetch, push, merge, checkout (or switch + restore). A bit further rebase and pull | 15:51 |
|
cbreak
| Guest63: man git-xxx is a great command to start with for any xxx subcommand :) | 15:55 |
|
| git has very good man pages in my opinion | 15:55 |
|
tang^
| !book | 15:56 |
|
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:56 |
|
tang^
| lots of good reading material, too | 15:57 |
|
Guest63
| thanks guys! | 15:57 |
| _subopt → subopt | 16:00 |
| → mokulus joined | 16:01 |
| ← cyberpear left | 16:01 |
| → fulljab joined | 16:02 |
| ← fulljab left | 16:03 |
| → madewokherd joined | 16:04 |
| → dionys joined | 16:04 |
| ← tejr left | 16:04 |
| → tejr joined | 16:05 |
| → Guest17 joined | 16:05 |
| ← rsx left | 16:05 |
| → jimklimov1 joined | 16:07 |
| → durham joined | 16:07 |
| → m0viefreak joined | 16:08 |
| ← jimklimov left | 16:08 |
| ← jonosterman left | 16:08 |
| ← xiongxin8802 left | 16:08 |
| → jonosterman joined | 16:10 |
| → meator joined | 16:12 |
| → kenanmarasli joined | 16:14 |
| → junktext joined | 16:15 |
| ← axisys left | 16:16 |
| → axisys joined | 16:17 |
| ← austin987 left | 16:19 |
| → maroloccio joined | 16:22 |
| ← jonosterman left | 16:22 |
| ← Null_A left | 16:23 |
| → Null_A joined | 16:23 |
| → jonosterman joined | 16:23 |
| → Null_A_ joined | 16:26 |
| → Null_A__ joined | 16:28 |
| ← alzgh left | 16:29 |
| ← Null_A left | 16:29 |
| → Null_A joined | 16:30 |
| → austin987 joined | 16:30 |
| ← Null_A_ left | 16:31 |
| → perrierjouet joined | 16:32 |
|
perrierjouet
| hi all | 16:32 |
|
| can we do this git submodule add --recursive ? | 16:32 |
| ← Null_A__ left | 16:33 |
| ← Guest63 left | 16:33 |
|
cbreak
| perrierjouet: you can git clone --recursive and then submodule add | 16:35 |
| ← TomyWork left | 16:35 |
| ← odoood left | 16:36 |
| ← Null_A left | 16:36 |
| ← meator left | 16:38 |
| → Null_A joined | 16:41 |
| → LuxuryMode joined | 16:51 |
| ← john_johnk left | 16:52 |
| → z3r0 joined | 16:52 |
| ← Brumaire left | 16:53 |
| → meator joined | 16:53 |
| ← AnAverageHuman left | 16:55 |
| → natrys joined | 16:55 |
| → Null_A_ joined | 16:55 |
| ← Null_A left | 16:58 |
| ← jonosterman left | 16:58 |
| → jonosterman joined | 17:00 |
| ← meator left | 17:00 |
| ← gnoo left | 17:01 |
| → Null_A joined | 17:01 |
| → cousteau joined | 17:04 |
| ← Null_A_ left | 17:04 |
|
cousteau
| Hi | 17:04 |
| → ash_worksi joined | 17:05 |
| → odoood joined | 17:05 |
| ← christall left | 17:05 |
| → christall joined | 17:06 |
| → cek joined | 17:06 |
|
cousteau
| Is it possible to make git worktree use relative paths? I just `cat ../the_worktree/.git` and it says `gitdir: /home/cousteau/the_project/the_git_repo/.git/worktrees/the_worktree` instead of the more convenient `gitdir: ../the_git_repo/.git/worktrees/the_worktree` | 17:07 |
|
| Like, why isn't this the default behavior? Or at least the default behavior when I add the worktree using a relative path (which I did) | 17:08 |
|
| ...Or is it the default behavior on newer versions? | 17:09 |
| ← christall left | 17:11 |
| ← Swahili left | 17:11 |
| → AnAverageHuman joined | 17:14 |
|
cousteau
| In fact, do .git files (gitdir: ...) always use absolute paths (e.g. on submodules)? If so, shouldn't they default to relative paths? I remember having trouble or uncertainty when moving projects around because of absolute paths being used somewhere | 17:17 |
|
| OK, submodules are smart enough to use relative paths | 17:22 |
| → srinidhi joined | 17:22 |
| → christall joined | 17:22 |
|
cousteau
| Both in the submodule's folder .git and in the .gitmodules file | 17:23 |
| ← AnAverageHuman left | 17:24 |
| → fulljab joined | 17:25 |
|
cousteau
| BUT, the config option submodule.the_submodule.url uses absolute paths | 17:25 |
|
| Weird | 17:25 |
| ← fulljab left | 17:26 |
|
cousteau
| Why would .git/config and .gitmodules use different values for the url field? | 17:27 |
| → fulljab joined | 17:27 |
| ← Murr left | 17:27 |
| ← christall left | 17:27 |
| → Murr joined | 17:27 |
| ← fulljab left | 17:28 |
| → christall joined | 17:29 |
| → AnAverageHuman joined | 17:34 |
|
cousteau
| I guess I'll write to the mailing list to complain :) | 17:35 |
| ← sudoforge left | 17:38 |
| → pulse joined | 17:38 |
| ← AnAverageHuman left | 17:40 |
| ← ash_worksi left | 17:41 |
| → whytwulf joined | 17:44 |
| ← whytwulf left | 17:45 |
| ← ConstantDesc left | 17:45 |
| → whytwulf joined | 17:46 |
| → fulljab joined | 17:46 |
| ← whytwulf left | 17:46 |
| → Brumaire joined | 17:47 |
| ← fulljab left | 17:48 |
| → fulljab joined | 17:48 |
| ← jonosterman left | 17:48 |
| → ash_worksi joined | 17:51 |
| → jonosterman joined | 17:51 |
|
imMute
| cousteau: I think config URLs need to be absolute so that git can actually use them. and .gitmodules URLs can be absolute or relative depending on your needs. | 17:53 |
| → clime joined | 17:53 |
| ← durham left | 17:54 |
| → skapata joined | 17:54 |
| ← skapata left | 17:54 |
| → skapata joined | 17:54 |
| → whytwulf joined | 17:56 |
| ← whytwulf left | 17:56 |
|
cousteau
| imMute: I don't think they NEED to be absolute. They could be "relative to the project's top dir", and let git do the relativification | 17:57 |
|
imMute
| cousteau: URLs refer to remotes, not the local path... | 17:57 |
|
ikke
| I think the difference is that worktrees are more external to the git repository | 17:57 |
| ← z3r0 left | 17:57 |
|
ikke
| If they were relative, and you moved the git repository, the worktrees would break | 17:57 |
|
cousteau
| Otherwise you get errors when moving projects around. One should be able to move entire projects to other paths without fear of errors due to absolute paths | 17:58 |
| → hornhack joined | 17:58 |
|
cousteau
| ikke: true, but if they're in the same super-directory, and you move the whole super-directory, they wouldn't break (if they were relative) | 17:59 |
| → sudoforge joined | 17:59 |
| ← hackinghorn left | 18:00 |
|
cousteau
| And if you specified the path of the worktree as a relative path, chances are that it is in the same super-directory as the git project. That's why I was thinking on making it absolute or relative depending on how you specified it when creating the worktree | 18:00 |
|
imMute
| that would make sense to me. let the user decide which mode to use. | 18:01 |
|
cousteau
| Alternatively, an --absolute-path/--relative-path switch (which may default to whichever style the user used when specifying the path) | 18:04 |
|
| s/may/probably should/ | 18:05 |
| → con3 joined | 18:05 |
| → durham joined | 18:05 |
|
cousteau
| Gotta go, bye! I'll see if I can send an email to the mailing list later | 18:06 |
| ← cousteau left | 18:06 |
| ← nvmd left | 18:08 |
| ← ash_worksi left | 18:10 |
| ← sudoforge left | 18:11 |
| ← elkalamar left | 18:11 |
| ← odoood left | 18:13 |
|
Gustavo6046
| How do I changelog? | 18:13 |
|
imMute
| Gustavo6046: nano CHANGELOG | 18:13 |
|
Gustavo6046
| :< | 18:13 |
|
| how do I changelog with git? | 18:14 |
| → cyberpear joined | 18:14 |
|
ikke
| Gustavo6046: if you have good commit hygene, you could use git shortlog | 18:14 |
|
imMute
| you mean how do you ask git for a change log? 'git log ...' with appropriate options for the commit ranges and data you want. | 18:14 |
| → mrfhitz joined | 18:14 |
|
Gustavo6046
| ikke: My commit hygiene is mehh, but I can try tags | 18:14 |
| → nvmd joined | 18:15 |
|
Gustavo6046
| can I sign and annotate a tag at the same time? | 18:15 |
|
| just -as? | 18:16 |
|
| -a's description almost implies that it doesn't like -s | 18:16 |
|
ikke
| Gustavo6046: A signed tag is annotated by default | 18:17 |
|
| so it's implied | 18:17 |
|
Gustavo6046
| Ah | 18:17 |
|
ikke
| Well, not only by default, it must be annotated | 18:17 |
| ← unluckyshrubbery left | 18:17 |
|
Gustavo6046
| ahhh, I see | 18:17 |
| → unluckyshrubbery joined | 18:17 |
| ← durham left | 18:18 |
| → durham joined | 18:19 |
|
Gustavo6046
| and how do I one-time view a specific file from another commit? | 18:21 |
|
ikke
| git show <commit>:<path/to/file> | 18:22 |
|
Gustavo6046
| oh, ooh | 18:22 |
| → sudoforge joined | 18:22 |
|
Gustavo6046
| thank you! | 18:24 |
| ← nvmd left | 18:26 |
| ferr_ → fercell | 18:27 |
| ← saroy left | 18:27 |
| ← average left | 18:31 |
| ← koolazer left | 18:35 |
| → snedd joined | 18:35 |
| ← jonosterman left | 18:38 |
| ← imMute left | 18:38 |
| → imMute joined | 18:38 |
| ← imMute left | 18:41 |
| → imMute joined | 18:41 |
| → jonosterman joined | 18:41 |
| ← Guest17 left | 18:42 |
| → Guest17 joined | 18:42 |
| → voltron joined | 18:43 |
| → irrgit joined | 18:44 |
| ← vdamewood left | 18:44 |
| ← fulljab left | 18:49 |
| → sadako joined | 18:52 |
| ← kenanmarasli left | 18:53 |
| ← sadtaco left | 18:53 |
| → meator joined | 18:57 |
| ← shailangsa left | 19:01 |
| → vdamewood joined | 19:11 |
|
lantech19446
| I created a second branch on github to avoid my changes going to production prematurely, it's populated, making the branch on my local repo and pushing from it were no problem but i can't seem to figure out how to pull from it | 19:20 |
|
osse
| lantech19446: how did you push to it? | 19:22 |
|
lantech19446
| first I did git push --set-upstream origin changes | 19:23 |
|
| then I just did git push | 19:23 |
|
osse
| then git pull should work out of the box | 19:23 |
|
lantech19446
| from a different computer? | 19:23 |
|
osse
| no | 19:23 |
|
| from a different computer you can git pull origin changes | 19:24 |
|
lantech19446
| because when I try git pull --set-upstream origin changes it tells me it's not valid | 19:24 |
|
ikke
| lantech19446: you want to use git fetch for new branches | 19:24 |
|
| and then checkout | 19:24 |
|
| lantech19446: git pull = fetch + merge | 19:24 |
|
| I assume you don't want to immediately merge that branch in your currently checked out branch? | 19:25 |
|
lantech19446
| it's ok to do that on this computer i just can't do it on the production server | 19:25 |
| → nvmd joined | 19:25 |
|
lantech19446
| at some point i'll need to merge the two branches on github and then just pull from my master branch | 19:25 |
| ← pizdets left | 19:25 |
|
osse
| what is the error message | 19:26 |
|
lantech19446
| I'm not getting one now I apparently just can't set my upstream to that branch | 19:26 |
| ← EvilDMP left | 19:26 |
|
osse
| set-upstream is not a valid git pull flag | 19:26 |
|
| it is for push, though | 19:26 |
|
lantech19446
| ok | 19:26 |
| → EvilDMP joined | 19:27 |
| → pizdets joined | 19:28 |
| ← jonosterman left | 19:28 |
| ← yates left | 19:29 |
| → jonosterman joined | 19:30 |
| → ash_worksi joined | 19:31 |
| ← LuxuryMode left | 19:31 |
|
lantech19446
| well that's working now, now i just gotta figure out what on earth this person was thinking when they coded this | 19:32 |
| → Gustavo6046_ joined | 19:32 |
| ← Gustavo6046 left | 19:33 |
| ← mokulus left | 19:33 |
| Gustavo6046_ → Gustavo6046 | 19:35 |
| → hackinghorn joined | 19:37 |
| ← hornhack left | 19:39 |
| → Betal joined | 19:40 |
| → sniperwolf joined | 19:46 |
| → alzgh joined | 19:48 |
|
alzgh
| good bot gitinfo | 19:48 |
|
| I can only recommend 'Pro Git' | 19:48 |
|
Gustavo6046
| Is it common practice to have code reformatters (like Python's black) run by a "CI" tool with results auto-amended to your commit and pushed upstream? | 19:50 |
|
imMute
| Gustavo6046: I'd rather it run locally, so I can decide when to run it and when to commit the results. | 19:50 |
|
Gustavo6046
| Ah. | 19:51 |
|
| Good point. | 19:51 |
|
ikke
| yeah, running these things locally is a lot better | 19:51 |
|
imMute
| Gustavo6046: at most, a CI-run formatter should simply block PRs until the formatter doesn't change anything (ie, you've run it locally) | 19:51 |
|
Gustavo6046
| Yeah | 19:51 |
|
ikke
| CI could warn when things are not according to style | 19:51 |
|
Gustavo6046
| Yah | 19:51 |
|
| Ohhh, that | 19:51 |
|
| that's what flake8 does, not reformatting. I'm stupid | 19:51 |
|
| Thanks! | 19:51 |
| → teut joined | 19:54 |
| → cousteau joined | 19:54 |
|
cousteau
| Sup | 19:54 |
| ← meator left | 19:54 |
|
teut
| so I pushed some changes on origin/master . now on local I reset head to head~4 --hard . now I did git pull origin master. With a fix of little 4 line conflict , it merged but all those commits I got back | 19:55 |
|
cousteau
| Is there a way to see the complete diff3 of a merge commit? `git diff HEAD HEAD^1 HEAD^2` only seems to show the conflict resolution changes | 19:55 |
|
teut
| I did not want that but to push local to origin but pulled origin to resolve cnonflicts | 19:56 |
|
| what should I have used? | 19:56 |
|
osse
| i don't follow completely, but it sounds like you wanted to push --force | 19:57 |
|
teut
| I should ve done just a force push I think in this situation | 19:57 |
|
| ya, ok so I will do it next time | 19:58 |
|
ikke
| yes | 19:58 |
|
| You can still undo the merge and still force push | 19:58 |
|
teut
| how? | 19:58 |
|
| git revert ?? | 19:58 |
|
| or reflog? | 19:58 |
|
ikke
| reset --hard HEAD~ if the merge (pull) is the last thing you did | 19:58 |
|
cousteau
| teut: I'm a bit confused. You pushed master to origin/master, now master = origin/master, then rewinded master 4 commits, now origin/master is ahead of master by 4 commits, then you pulled origin/master, which fast-forwarded master those 4 commits so that master = origin/master | 19:59 |
|
teut
| ya you are correct | 19:59 |
|
| I got merge conflicts though because I merged my collegue's branch | 20:00 |
|
cousteau
| So pulling origin/master pretty much undoes the rewinding | 20:00 |
| → travaldo joined | 20:00 |
|
cousteau
| Oh | 20:00 |
|
teut
| he has 1 little change | 20:00 |
|
| had* | 20:00 |
|
| 1 commit I guess so | 20:00 |
|
| but it was a merge so shouldnt matter | 20:00 |
| ← clime left | 20:01 |
|
cousteau
| You can avoid guessing by opening `gitk --all&` and seeing the commit graph in all its glory :) | 20:01 |
| ← Null_A left | 20:01 |
|
cousteau
| I find gitk very helpful | 20:02 |
| → odoood joined | 20:02 |
|
teut
| https://dpaste.org/Qn7g | 20:02 |
|
| The ampersand (&) character is not allowed. The & operator is reserved for future use; | 20:03 |
|
cousteau
| Huh? | 20:03 |
|
ikke
| I think they use windows / powershell | 20:03 |
|
teut
| ikke I created a commit after git add instead of git merge --continue by mistake | 20:03 |
|
| ya | 20:03 |
|
| I m on windows | 20:04 |
|
cousteau
| Oh | 20:04 |
|
teut
| I used git bash now | 20:04 |
|
| it worked | 20:04 |
| → elkalamar joined | 20:04 |
|
cousteau
| Then gitk --all with whatever powershell uses to open programs in the background | 20:04 |
|
teut
| ya there is a tree now in the git gui | 20:04 |
| ← jonosterman left | 20:05 |
| ← pizdets left | 20:05 |
|
teut
| I already have extensions in vscode | 20:05 |
|
| but both are tough to understand | 20:05 |
| → pizdets joined | 20:05 |
|
teut
| yukk, the tree looks horrible | 20:05 |
|
| I did too much merging | 20:05 |
|
cousteau
| Not really. Each ball is a commit. It descends from another commit just below it, so that whenever you commit you add a ball on top of another. | 20:06 |
|
teut
| ikke so what can I do to revert it seeing the reflog? | 20:06 |
|
| ya thats fine cousteau | 20:06 |
|
ikke
| You don't need to use the reflog to undo a merge | 20:06 |
|
teut
| I showed reflog so that you can understand better what I did | 20:07 |
|
| I forgot what I did, often I do | 20:07 |
| ← srinidhi left | 20:07 |
| → jonosterman joined | 20:08 |
|
teut
| I think reset to 2c8b05f should do it | 20:08 |
| → shailangsa joined | 20:08 |
| → Null_A joined | 20:08 |
|
ikke
| Yes, most likely | 20:08 |
| ← arcatech left | 20:10 |
|
cousteau
| Re: three-way diff. Apparently `git diff HEAD HEAD^1 HEAD^2` (merge diff) isn't supported in 2.18, which is the newest version I could get my hands on | 20:11 |
|
| Which explains why I didn't understand why I was getting the output I was getting | 20:11 |
|
teut
| thanks that fixed it | 20:11 |
|
cousteau
| Oh wait, I found a git 2.30 installed in a random place. (Who the hell maintains this machine?) | 20:13 |
|
teut
| if I force pull a colleague's master , will my master become exactly like his? | 20:13 |
|
ikke
| there is no force pull | 20:14 |
|
| teut: What you want to use is fetch | 20:14 |
|
| and then potentially reset --hard | 20:14 |
|
teut
| oh ok | 20:14 |
|
| that would be dangerous to have | 20:14 |
|
| yes got it thanks | 20:15 |
| → ZacSharp joined | 20:15 |
| ← voltron left | 20:16 |
| ← teut left | 20:16 |
| → fulljab joined | 20:16 |
| ← fulljab left | 20:16 |
| ← snedd left | 20:16 |
|
cousteau
| OK nope, using git 2.30.0 won't do it either | 20:17 |
|
ikke
| cousteau: I've never heard of a 3-way diff | 20:17 |
|
| At least, not by specifying 3 commits | 20:18 |
|
| to git diff | 20:18 |
| ← sudoforge left | 20:18 |
| ← jonosterman left | 20:18 |
| ← Null_A left | 20:18 |
| → jonosterman joined | 20:21 |
| → Null_A joined | 20:22 |
| → junktext_ joined | 20:23 |
|
cousteau
| -c. I wanted git diff -c. | 20:24 |
|
| ikke: 3-way as in the merge and the two parents. | 20:24 |
| ← junktext left | 20:25 |
| → sudoforge joined | 20:25 |
| ← cek left | 20:25 |
| ← jimklimov1 left | 20:26 |
| ← lessless left | 20:27 |
|
cousteau
| Why is -c not mentioned in the git diff synopsis nor options sections? | 20:28 |
| ← ash_worksi left | 20:29 |
| → ash_worksi joined | 20:29 |
| ← unluckyshrubbery left | 20:30 |
| → unluckyshrubbery joined | 20:30 |
|
cousteau
| git show -c HEAD also does what I wanted. But what's this mysterious undocumented -c feature? | 20:30 |
| ← Null_A left | 20:32 |
|
cousteau
| And why does it generate lines saying "diff --combined" on the output but there is no `--combined` option to either diff or git diff? (it's -c, not --combined) | 20:33 |
| ← unluckyshrubbery left | 20:33 |
| → unluckyshrubbery joined | 20:33 |
|
ZacSharp
| I think -c is the short name of --combined | 20:34 |
|
| but I remember two options with a c, so maybe it's the other one | 20:35 |
|
cousteau
| Yeah but --combined doesn't work | 20:35 |
|
| There's -c and --cc | 20:35 |
| → jimklimov joined | 20:35 |
| ← sudoforge left | 20:36 |
|
osse
| man git-diff-tree mentions it | 20:36 |
|
gitinfo
| the git-diff-tree manpage is available at https://gitirc.eu/git-diff-tree.html | 20:36 |
|
cousteau
| -c generates lines saying "diff --combined", and --cc generates lines saying "diff --cc". One is consistent but the other isn't | 20:36 |
|
| osse: OK, but why not git-diff? | 20:36 |
|
osse
| --cc is already a long flag :p | 20:36 |
|
| I don't know | 20:36 |
| → Null_A joined | 20:38 |
| ← odoood left | 20:39 |
|
cousteau
| It's a rather short long flag | 20:39 |
|
osse
| I think git diff is sort of a wrapper around diff-files and diff-tree and friends | 20:39 |
|
| at least in its implementation | 20:39 |
|
cousteau
| OK, so -c will only print "interesting" files (those with changes from BOTH parents), and --cc will only print "interesting" hunks | 20:40 |
| ← Brumaire left | 20:40 |
|
cousteau
| But none will print the complete three-way diff | 20:40 |
|
osse
| try -m | 20:41 |
|
cousteau
| In any case, I guess the interesting files are interesting enough. I just wanted to see if the merge did what I expected it to do | 20:41 |
| ← tejr left | 20:42 |
| → tejr_ joined | 20:42 |
|
cousteau
| osse: that doesn't seem to do anything in git diff | 20:43 |
|
| Anyway, I guess I have the info I was looking for after all | 20:44 |
|
| And now I'm going to have... dinner! Bye :D | 20:44 |
| ← cousteau left | 20:45 |
| ← Null_A left | 20:46 |
| → Null_A_ joined | 20:53 |
|
ZacSharp
| Any diff-generating command can take the -c or --cc option to produce a combined diff when showing a merge. This is the default format when showing merges with git-diff(1) or git- | 20:54 |
|
| show(1). Note also that you can give the -m option to any of these commands to force generation of diffs with individual parents of a merge. | 20:54 |
|
| from man git diff | 20:54 |
|
gitinfo
| the git-diff manpage is available at https://gitirc.eu/git-diff.html | 20:54 |
| ← Null_A_ left | 20:59 |
| ← terrorjack left | 21:00 |
| → terrorjack joined | 21:01 |
| ← aniruddha left | 21:02 |
| ← madewokherd left | 21:03 |
| ← otisolsen70 left | 21:07 |
| → Lord_of_Life_ joined | 21:07 |
| ← jonosterman left | 21:08 |
| ← ash_worksi left | 21:08 |
| ← Lord_of_Life left | 21:09 |
| ← sniperwolf left | 21:09 |
| → jonosterman joined | 21:10 |
| → ash_worksi joined | 21:10 |
| Lord_of_Life_ → Lord_of_Life | 21:10 |
| → Null_A joined | 21:12 |
| → Brumaire joined | 21:17 |
| ← Null_A left | 21:19 |
| → Null_A joined | 21:20 |
| → lemontree joined | 21:20 |
| ← theoceaniscool left | 21:25 |
| ← Null_A left | 21:26 |
| ← Murr left | 21:27 |
| → Murr joined | 21:27 |
| → keypushe- joined | 21:28 |
| → ZacSharp3 joined | 21:28 |
| ← keypusher left | 21:28 |
|
lemontree
| after i have successfully pulled, is there a way to show me all new commits which were introduced in this pull? | 21:28 |
| → Null_A joined | 21:28 |
|
osse
| git log HEAD@{1}..HEAD for example | 21:29 |
| ← perrierjouet left | 21:30 |
|
lemontree
| but this is only the last commit | 21:30 |
|
| what if i have more commits pulled? | 21:30 |
| ← gh34 left | 21:30 |
|
osse
| no it isn't | 21:30 |
|
lemontree
| oh | 21:30 |
|
osse
| i often copy and paste the range that is printed | 21:31 |
|
| e.g. abcd1234...def454 master or whatever | 21:31 |
| keypushe- → keypusher | 21:31 |
|
lemontree
| ah yes i was on the wrong repo | 21:31 |
| ← ZacSharp left | 21:31 |
|
lemontree
| thanks. :) | 21:31 |
| ← m0viefreak left | 21:32 |
| ZacSharp3 → ZacSharp | 21:32 |
| → madewokherd joined | 21:36 |
| ← vdamewood left | 21:36 |
| ← ash_worksi left | 21:38 |
| ← junktext_ left | 21:44 |
| → junktext joined | 21:44 |
| → ash_worksi joined | 21:45 |
| tejr_ → tejr | 21:54 |
| ← Samian left | 21:58 |
| ← jonosterman left | 21:58 |
| ← jsmooth left | 21:58 |
| ← natrys left | 21:59 |
| → jonosterman joined | 22:01 |
| → odoood joined | 22:04 |
| ← Null_A left | 22:16 |
| → jwillikers joined | 22:17 |
| → Null_A joined | 22:19 |
| ← nuala left | 22:19 |
| ← christall left | 22:19 |
| ← jwillikers left | 22:22 |
| → nuala joined | 22:23 |
| ← maroloccio left | 22:27 |
| ← mrfhitz left | 22:27 |
| → jwillikers joined | 22:28 |
| ← odoood left | 22:28 |
| ← Null_A left | 22:28 |
| ← junktext left | 22:28 |
| ← palasso left | 22:34 |
| → Xenguy joined | 22:34 |
| → stkrdknmibalz joined | 22:36 |
| → Null_A joined | 22:36 |
| ← nuala left | 22:37 |
| ← wgrant left | 22:41 |
| ← Brumaire left | 22:43 |
| → christall joined | 22:50 |
| → wgrant joined | 22:54 |
| ← ash_worksi left | 23:00 |
| ← unluckyshrubbery left | 23:02 |
| ← pizdets left | 23:03 |
| → pizdets_ joined | 23:04 |
| → unluckyshrubbery joined | 23:05 |
| ← christall left | 23:07 |
| ← unluckyshrubbery left | 23:09 |
| → Swahili joined | 23:11 |
| ← elkalamar left | 23:15 |
| → odoood joined | 23:30 |
| ← ZacSharp left | 23:37 |
| → Moult joined | 23:44 |
|
Moult
| if branch foo has extra commits x y z compared to branch bar, what is the cleanest way to merge x and y (but not z) from foo to bar without creating duplicate commits? keep in mind there are quite a few more than just x and y. | 23:45 |
|
nedbat
| Moult: is z later than x and y? | 23:50 |
| → ash_worksi joined | 23:51 |
|
Moult
| nedbat: hmm some will, some will not. basically i have a list of commits a b c d e, and i will want a b c, not d, and e | 23:51 |
|
nedbat
| Moult: you could merge c and then cherry-pick e | 23:51 |
|
Moult
| nedbat: one solution which works is git merge x, git merge y, but that creates lots of commits. i'm not sure how to select a range of commits. i've tried git merge x..y but it says "x..y not something we can merge" | 23:51 |
|
nedbat
| Moult: you merge a commit, not a range of commits. you can pick the latest commit that has only wanted commits in its history | 23:52 |
| → christall joined | 23:52 |
|
Moult
| nedbat: sorry, i am simplifying, there are about 100 commits i'm choosing from. most i want, except for a few scattered here and there | 23:53 |
|
| nedbat: ah pity i can't merge a range. | 23:53 |
|
nedbat
| Moult: the answer doesn't change. you merge a commit, and you get all of its history | 23:53 |
| ← odoood left | 23:54 |
|
Moult
| nedbat: right, hence your recommendation if i want a b c, i can just merge c | 23:56 |
|
nedbat
| right | 23:56 |
|
Moult
| nedbat: i guess i could simply cherry pick ranges of commits that i want. what is the downside of doing a cherry pick? | 23:58 |
|
nedbat
| Moult: do you mind if i ask you about these branches? Are they meant to live for a long time? why do you need the same commits on two different branches? | 23:59 |