| 2019-05-22 |
| ← mat001 left | 00:00 |
| → rustyshackleford joined | 00:00 |
| → fphilipe joined | 00:00 |
| → butterthebuddha joined | 00:00 |
| ← butterthebuddha left | 00:00 |
|
rustyshackleford
| I have a weird problem - do you see any good solutions? | 00:02 |
|
| so we have these versioned files | 00:02 |
|
| content_0.1.0.json, content_0.2.0.json, content_0.3.0.json | 00:03 |
| → ygivenx_ joined | 00:03 |
|
rustyshackleford
| but if a changes is made to 0.1.0, it should also be made in 0.2.0 and 0.3.0 | 00:03 |
|
| think this could be scripted? | 00:04 |
| ← xcm left | 00:06 |
| → xcm joined | 00:06 |
| ← ygivenx left | 00:07 |
|
vishal
| rustyshackleford: scripted how? as part of some git operation? You can write a script, something like sync_configs, and call it from a hook if needed | 00:08 |
|
rustyshackleford
| well a script that uses/calls git | 00:08 |
|
vishal
| but it really depends on how a 'cahnge' is defined, how the 2/3 versions differ from 1 and each other.. | 00:08 |
|
rustyshackleford
| okay lets add another complicated detail | 00:08 |
|
| there is a release branch for each | 00:09 |
|
| so when we created 0.4.0, we will begin by copying content_0.3.0.json and naming it content_0.4.0.json | 00:09 |
|
| further changes to content_0.1.0.json should be merged upstream | 00:10 |
|
| but also, should be committed somehow to content_0.(x>1).0.json | 00:10 |
|
vishal
| sure you can commit to the 0.1 branch and try cherry-picking to the others.. | 00:10 |
|
| there may be merge conflicts, and you just resolve them | 00:11 |
|
rustyshackleford
| filename is different unfortunately. I can merge 0.1.0 into 0.2.0. content_0.1.0 will be identical on both branches | 00:11 |
|
| but 0.2.0 is now out of date | 00:11 |
|
vishal
| ah hmm | 00:11 |
| ← ygivenx_ left | 00:11 |
|
rustyshackleford
| so i'm thinking a script that can generate a diff | 00:11 |
|
| and somehow add that to the next files | 00:12 |
|
| ...or is time to reconsider this complicated as fuck approach | 00:12 |
|
vishal
| I don't think there would be a git native way to do all of it in one fell swoop (commit) | 00:12 |
|
rustyshackleford
| yeah I don't expect that. But a way to script it would greatly help | 00:12 |
|
vishal
| just script it externally I'd say (and then commit the updates to each branch as needed) | 00:12 |
|
| if the files just contain json, should be doable using bash and jq | 00:13 |
|
rustyshackleford
| never heard of jq. neat | 00:14 |
|
| I was thinking git and bash | 00:14 |
|
vishal
| yeah it is super useful | 00:14 |
|
rustyshackleford
| use git to generate a diff or a patch or something | 00:14 |
|
vishal
| 3jq will even help you learn it | 00:14 |
|
rustyshackleford
| vishal: do you know any nice tutorials or examples? | 00:14 |
|
vishal
| hmm parsing jq with bash is a bad idea | 00:14 |
|
| err parsing json | 00:14 |
|
| diff could work if the changes are always consistent, but they can often fail to apply | 00:15 |
|
| if say 4.0 changed independently of older versions | 00:15 |
|
| with jq you should be able to so some smarter key/value based checking | 00:15 |
|
rustyshackleford
| I don't necessarily need to parse it | 00:16 |
| ← mattcen left | 00:16 |
|
vishal
| but it entirely depends on the contents of these files, and the rules that apply w.r.t. what changes and in what manner | 00:16 |
|
rustyshackleford
| think of it this way: content_0.1.0.json should be mostly a subset of content_.0.2.0.json | 00:16 |
|
| I was hoping to merge the files. I might be able to do this without parsing the content of the files | 00:17 |
|
vishal
| so what happens if you cp 1.0 -> 2.0. then make a new change in 2.0 that isn't in 1.0. then make a fixup in 1.0 that needs to go to 2.0. Your diff can potentially fail to apply in this case | 00:17 |
|
| so you need to be smarter based on how you will merge them | 00:17 |
|
| and git can't 'figure it out' for you | 00:17 |
|
rustyshackleford
| yeah idk how the heck this is going to work | 00:18 |
|
vishal
| and that's where I think parsing and making decisions comes in. But - I could be wrong, and maybe in your use case, a diff will work just fine | 00:19 |
|
| in which case, great! | 00:19 |
|
| its definitely the simpler option | 00:19 |
|
rustyshackleford
| so we have a somewhat retarded merging scheme | 00:19 |
|
| that I think is the root cause of all this | 00:19 |
|
| 0.3.0 branches off of 0.2.0 which branches off 0.1.0 | 00:19 |
| → leb joined | 00:19 |
|
rustyshackleford
| and we merge everything upstream daily | 00:19 |
|
| we tend to have 3 releases in progress at any time | 00:20 |
| → mattcen joined | 00:20 |
|
vishal
| usually release process is that all development and fixes happens of the main 'master' and fixes get backported (cherry-picked) into older release branches as needed | 00:20 |
|
| there are many ways of doing this sort of thing of course | 00:21 |
|
| but generally if the process is getting in the way, and if you can change it to not, then by all means you should :) | 00:21 |
|
rustyshackleford
| this is driven by our business so I don't know a good way around it | 00:22 |
| ← moldybits left | 00:22 |
| → butterthebuddha joined | 00:22 |
|
rustyshackleford
| we want this in the july release, and this other feature in august | 00:22 |
|
| so we have july and august releases on separate branches, being worked on simulataneously | 00:22 |
| → cdown joined | 00:23 |
| ← mattcen left | 00:24 |
|
vishal
| developing features on release branches that are intended to also eventually make it to other release branches sounds nightmarish.. | 00:24 |
| → CodeHex joined | 00:25 |
|
vishal
| it is much easier to develop on a 'has all the things' master, make your commits well formed and contained, and then cherry-pick into these release branches as needed | 00:25 |
|
| with good commit practices, there may still be conflicts here and there, but they /should/ be manageable | 00:26 |
| → victorqueiroz joined | 00:26 |
| ← libertyprime left | 00:27 |
| → ghoti_ joined | 00:28 |
| ← fphilipe left | 00:34 |
|
rustyshackleford
| vishal: I think a backwards approach is better | 00:37 |
|
| well... maybe not. sometimes your depedent on other things | 00:37 |
|
| but suppose you kept your feature outside of master | 00:37 |
|
| until it is done and ready to be released | 00:37 |
|
| merge that release branch and then release from master | 00:37 |
| → mattcen joined | 00:37 |
| ← dysfigured left | 00:38 |
|
rustyshackleford
| our release branch is somewhat nightmarish, but fits with how the business works | 00:38 |
| → dysfigured joined | 00:40 |
| → moldybits joined | 00:40 |
| ghoti_ → ghoti | 00:40 |
| ← butterthebuddha left | 00:46 |
| → butterthebuddha joined | 00:46 |
| → Kaisyu7 joined | 00:53 |
| → yonder joined | 00:53 |
| ← vnr left | 00:55 |
| ← shawn_dones left | 00:57 |
| → thiago joined | 00:58 |
| ← magic_ninja left | 00:59 |
| ← cdown left | 00:59 |
| → magic_ninja joined | 01:00 |
| → cdown joined | 01:00 |
| ← Sasazuka left | 01:02 |
| ← kent\n left | 01:03 |
| → fphilipe joined | 01:03 |
| → kent\n joined | 01:04 |
| ← Fusl left | 01:13 |
| → Fusl joined | 01:14 |
| → rjsalts_ joined | 01:17 |
| ← rjsalts left | 01:17 |
| → azwieg103 joined | 01:22 |
| → Xeago_ joined | 01:24 |
| ← Xeago left | 01:24 |
| Xeago_ → Xeago | 01:25 |
| ← motoko-chan left | 01:27 |
| → bambanx joined | 01:28 |
| ← nic-hartley left | 01:29 |
| ← CodeHex left | 01:36 |
| ← fphilipe left | 01:37 |
| ← durham left | 01:42 |
| ← F0rTex left | 01:44 |
| → F0rTex joined | 01:45 |
| ← boombatower left | 01:46 |
| → j9_ joined | 01:48 |
| ← wildermind left | 01:51 |
| ← Xeago left | 01:52 |
| → Xeago joined | 01:52 |
| → watabou_ joined | 01:53 |
| → Goplat joined | 02:04 |
| ← lagothrix left | 02:04 |
| ← cdown left | 02:04 |
| → lagothrix joined | 02:04 |
| → duderonomy joined | 02:05 |
| → libertyprime joined | 02:06 |
| → cdown joined | 02:06 |
| ← jcbitter left | 02:07 |
| → jcbitter joined | 02:09 |
| ← magic_ninja left | 02:11 |
| rjsalts_ → rjsalts | 02:11 |
| ← azwieg103 left | 02:12 |
| ← jcbitter left | 02:14 |
| → jcbitter joined | 02:15 |
| → magic_ninja joined | 02:22 |
| ← watabou_ left | 02:26 |
| ← mattcen left | 02:30 |
| → mattcen joined | 02:32 |
| ← j9_ left | 02:33 |
| ← kjartan left | 02:33 |
| ← zulutango left | 02:33 |
| → fphilipe joined | 02:33 |
| → zulutango joined | 02:35 |
| ← Cabanossi left | 02:36 |
| ← hugh-adolph left | 02:36 |
| → kjartan joined | 02:37 |
| → Cabanossi joined | 02:40 |
| ← spacesuitdiver left | 02:43 |
| → mat001 joined | 02:51 |
| ← mattcen left | 02:56 |
| ← Enphuego left | 02:58 |
| ← victorqueiroz left | 02:58 |
| ← butterthebuddha left | 03:01 |
| → fatalhalt joined | 03:04 |
| → butterthebuddha joined | 03:04 |
| → mattcen joined | 03:05 |
| ← fphilipe left | 03:07 |
| ← wgrant left | 03:16 |
| → wgrant joined | 03:17 |
| ← mosh left | 03:18 |
| ← Cabanossi left | 03:24 |
| → Cabanossi joined | 03:24 |
| ← libertyprime left | 03:24 |
| → milkt joined | 03:28 |
| ← alyptik left | 03:32 |
| ← sboyd left | 03:35 |
| ← kermit left | 03:39 |
| → kermit joined | 03:44 |
| ← MACscr left | 03:46 |
| → veegee joined | 03:49 |
| → libertyprime joined | 03:51 |
| ← R2robot left | 03:53 |
| ← cd left | 03:53 |
| ← leprechau left | 03:56 |
| ← libertyprime left | 03:57 |
| → leprechau joined | 03:58 |
| → fphilipe joined | 04:03 |
| → Lucas_Gray joined | 04:11 |
| ← royal_screwup21 left | 04:12 |
| ← scientes left | 04:19 |
| → alyptik joined | 04:22 |
| → watabou_ joined | 04:23 |
| ← netj left | 04:24 |
| → regedit_ joined | 04:24 |
| → netj joined | 04:24 |
| ← milkt left | 04:27 |
| ← butterthebuddha left | 04:28 |
| regedit_ → regedit | 04:30 |
| → podlech joined | 04:35 |
| ← cdown left | 04:36 |
| → kapilp joined | 04:41 |
| → Mighty_Mel joined | 04:42 |
| → tsdh joined | 04:44 |
| → blackmesa1 joined | 04:48 |
| ← blackmesa1 left | 04:53 |
| → ferdna joined | 04:54 |
| → g00s joined | 04:55 |
| ← cfoch left | 05:09 |
| → huatou joined | 05:10 |
| ← fatalhalt left | 05:17 |
| ← fphilipe left | 05:18 |
| ← Lucas_Gray left | 05:18 |
| ← podlech left | 05:20 |
| → sauvin joined | 05:21 |
| → macrover joined | 05:23 |
| → fphilipe joined | 05:25 |
| ← dhendrix left | 05:26 |
| ← jimender2 left | 05:26 |
| ← cxc99 left | 05:27 |
| ← mat001 left | 05:27 |
| ← bashfulshell left | 05:27 |
| → blackmesa1 joined | 05:27 |
| ← Nizumzen left | 05:27 |
| ← rodarmor left | 05:28 |
| ← d1rewolf left | 05:28 |
| ← rustyshackleford left | 05:28 |
| ← rougeth left | 05:28 |
| ← PavelB left | 05:28 |
| ← ggherdov left | 05:28 |
| ← nuck left | 05:29 |
| ← egp left | 05:29 |
| ← Fenhl left | 05:29 |
| ← fury left | 05:29 |
| → SkarmoutsosV joined | 05:30 |
| ← Ownix left | 05:30 |
| → jguddas-tr joined | 05:30 |
| ← jsatk left | 05:30 |
| ← bhelgaas left | 05:30 |
| → Mindi joined | 05:32 |
| → d1rewolf joined | 05:33 |
| → egp joined | 05:33 |
| → jsatk joined | 05:33 |
| → Fenhl joined | 05:33 |
| → bhelgaas joined | 05:33 |
| → rodarmor joined | 05:33 |
| → dhendrix joined | 05:33 |
| → jimender2 joined | 05:33 |
| → rougeth joined | 05:33 |
| → rustyshackleford joined | 05:33 |
| → nuck joined | 05:33 |
| → ggherdov joined | 05:33 |
| → bashfulshell joined | 05:33 |
| ← smitop left | 05:33 |
| → PavelB joined | 05:34 |
| → Ivo joined | 05:34 |
| → Ownix joined | 05:34 |
| → Nizumzen joined | 05:34 |
| → fury joined | 05:34 |
| ← jguddas-tr left | 05:34 |
| → BeerLover joined | 05:35 |
| ← ferdna left | 05:36 |
| ← qgTG left | 05:37 |
| ← jcbitter left | 05:39 |
| → nowhere_man joined | 05:42 |
| ← justanotheruser left | 05:42 |
| ← mattcen left | 05:43 |
| ← nowhereman left | 05:45 |
| ← xelxebar left | 05:46 |
| → xelxebar joined | 05:46 |
| → leeN joined | 05:47 |
| → sozuba joined | 05:49 |
| → mattcen joined | 05:50 |
| ← moldybits left | 05:52 |
| ← thiago left | 05:55 |
| ← mattcen left | 05:55 |
| → thefatma joined | 05:57 |
| ← thefatma left | 05:59 |
| → justanotheruser joined | 06:02 |
| ← leb left | 06:02 |
| → MACscr joined | 06:04 |
| → Repox joined | 06:05 |
| ← macrover left | 06:12 |
| → mattcen joined | 06:14 |
| → z|bandito joined | 06:15 |
| → dartmouthed joined | 06:16 |
| ← SkarmoutsosV left | 06:24 |
| → cxc99 joined | 06:24 |
| ← Repox left | 06:24 |
| → Noti joined | 06:25 |
| → chele joined | 06:27 |
| → R2robot joined | 06:28 |
| → dege joined | 06:29 |
| ← leeN left | 06:32 |
| → durham joined | 06:33 |
| ← durham left | 06:33 |
| → mowcat joined | 06:33 |
| → libertyprime joined | 06:34 |
| → bachler joined | 06:39 |
| ← nowhere_man left | 06:40 |
| → TomyWork joined | 06:40 |
| ← Serus left | 06:40 |
| ← freeman42x left | 06:42 |
| → sQVe joined | 06:42 |
| ← Puffball left | 06:45 |
| ← kjartan left | 06:45 |
| → Serus joined | 06:48 |
| ← kapilp left | 06:49 |
| → kjartan joined | 06:50 |
| → Anthaas joined | 06:56 |
| ← Anthaas_ left | 06:56 |
| ← g00s left | 06:57 |
| → n3wborn joined | 06:57 |
| → nowhere_man joined | 06:57 |
| → g00s joined | 06:57 |
| ← Mighty_Mel left | 06:58 |
| → enoq joined | 06:58 |
| ← BeerLover left | 06:59 |
| ← blackmesa1 left | 07:00 |
| → BeerLover joined | 07:03 |
| ← nowhere_man left | 07:04 |
| ← BeerLover left | 07:05 |
| ← fphilipe left | 07:13 |
| → blackmesa1 joined | 07:13 |
| → Repox joined | 07:13 |
| ← libertyprime left | 07:15 |
| ← xcm left | 07:15 |
| → libertyprime joined | 07:16 |
| → xcm joined | 07:17 |
| ← libertyprime left | 07:19 |
| ← yonder left | 07:20 |
| → thefatma joined | 07:20 |
| → interrobangd_ joined | 07:21 |
| → libertyprime joined | 07:21 |
| → sgnls joined | 07:22 |
| → qgTG joined | 07:25 |
| → mathu joined | 07:27 |
| → BeerLover joined | 07:27 |
|
mathu
| i put out a PR on github, but then decided to take another approach for essentially the same problem. a github FAQ says that force push would corrupt the PR so that's right out - what's the idiomatic git way to correct the PR/branch that i took the wrong approach on? or is it just to close the PR and create another one? | 07:30 |
| ← cluelessperson left | 07:31 |
| ← dege left | 07:32 |
| → fphilipe joined | 07:32 |
| ← Fusl left | 07:33 |
| → Fusl joined | 07:34 |
| → DuckyDev joined | 07:35 |
| ← netj left | 07:37 |
| → netj joined | 07:37 |
| → dege joined | 07:39 |
| → mikecmpbll joined | 07:40 |
| → fairuz joined | 07:41 |
| ← Anthaas left | 07:42 |
| → SkarmoutsosV joined | 07:42 |
| → Anthaas joined | 07:42 |
|
mathu
| reading more, sounds like some people on stackoverflow successfully force pushed to a branch with an open PR | 07:42 |
|
| yolo let's try it, i don't know that the reviewer has been online since the first update 0:) | 07:43 |
| ← gxt left | 07:45 |
| ← benharri left | 07:46 |
|
osse
| mathu: force pushing is correct | 07:48 |
|
| from the github FAQ perspective I thin kyou want to "corrupt" the PR in this case | 07:48 |
| → kapilp joined | 07:49 |
| ← duderonomy left | 07:50 |
|
mathu
| yeah, further reading just said the old commits would be unreachable via the web ui. but like, yeah, of course | 07:50 |
|
| thanks for confirming osse! | 07:50 |
| → jguddas-tr joined | 07:50 |
| → T_UNIX joined | 07:54 |
| ← ghoti left | 07:55 |
| ← thefatma left | 07:57 |
| → bolovanos joined | 07:57 |
| ← jguddas-tr left | 08:05 |
| → floppydh joined | 08:05 |
| ← sozuba left | 08:06 |
| → hiroprotagonist joined | 08:07 |
| → weird_error joined | 08:12 |
| ← j7k6 left | 08:13 |
| → ahmed89 joined | 08:13 |
| → thefatma joined | 08:14 |
| → j7k6 joined | 08:14 |
| → jguddas-tr joined | 08:15 |
| ← j7k6 left | 08:15 |
| → j7k6 joined | 08:16 |
| ← j7k6 left | 08:16 |
| → j7k6 joined | 08:17 |
| → sozuba joined | 08:17 |
| ← j7k6 left | 08:18 |
| → j7k6 joined | 08:18 |
| ← g00s left | 08:21 |
| → elichai2 joined | 08:23 |
| → Lucas_Gray joined | 08:24 |
| → TJ- joined | 08:25 |
| ← dege left | 08:33 |
| → OtakuSenpai joined | 08:40 |
| → Tobbi_1 joined | 08:40 |
| ← Tobbi_ left | 08:40 |
| Tobbi_1 → Tobbi_ | 08:40 |
| → rsrx joined | 08:42 |
| → drbean_ joined | 08:47 |
| ← drbean left | 08:49 |
| ← MIsAn left | 08:53 |
| → yuljk joined | 08:53 |
| → lacrymology joined | 08:54 |
| ← sz0 left | 08:59 |
| → sz0 joined | 09:00 |
| ← Murr left | 09:00 |
| → Murr joined | 09:01 |
| ← fairuz left | 09:03 |
| ← dhollinger left | 09:03 |
| ← Lucas_Gray left | 09:04 |
| → gloomy joined | 09:05 |
| → fairuz joined | 09:05 |
| ← strudla left | 09:07 |
| → strudla joined | 09:07 |
| ← dr_lepper left | 09:07 |
| ← nopf left | 09:07 |
| ← sybariten left | 09:07 |
| → i9c joined | 09:08 |
| ← neunon left | 09:08 |
| ← i7c left | 09:08 |
| ← nioncode left | 09:08 |
| ← Soliton left | 09:08 |
| → dr_lepper joined | 09:09 |
| ← hofmann3900 left | 09:09 |
| i9c → i7c | 09:09 |
| → Soliton joined | 09:10 |
| → Lucas_Gray joined | 09:10 |
| ← Jackneill left | 09:10 |
| ← n3wborn left | 09:10 |
| → Jackneill joined | 09:11 |
| → nioncode joined | 09:11 |
| ← blackmesa1 left | 09:13 |
|
hiroprotagonist
| I was hoping that someone could help me clarify what should happen in a specific sitution? | 09:17 |
|
| I inherited a git flow from my predecessor which is based on github flow | 09:17 |
|
| https://guides.github.com/introduction/flow/ | 09:17 |
| → dhollinger joined | 09:17 |
|
hiroprotagonist
| There is a scenario where we create a feature branch and work on that. Before this is merged in work continues, branches created, merged in to master and deployed. | 09:18 |
|
| when it comes to merging the original branch we do a git pull origin master --rebase on the branch, then on master and then merge. | 09:19 |
|
| this seems to be working well and makes sense and creates a nice graph. | 09:19 |
| ← weird_error left | 09:19 |
|
hiroprotagonist
| The scenario I am asking about it when the feature branch has remote tracking. When we do the rebase the tracking gets out of sync. Is it reasonable to do a force push for the feature branch with tracking ? | 09:20 |
| ← bambanx left | 09:20 |
|
hiroprotagonist
| Does this even make sense? | 09:20 |
| ← fairuz left | 09:23 |
| ← catsup left | 09:24 |
| → catsup joined | 09:24 |
| ← catsup left | 09:25 |
| → catsup joined | 09:25 |
| ← Goplat left | 09:29 |
| ← DuckyDev left | 09:31 |
| → hellauer joined | 09:31 |
| ← zamba left | 09:33 |
| → zamba joined | 09:35 |
| ← BeerLover left | 09:42 |
| ← arecaceae left | 09:43 |
| → arecaceae joined | 09:43 |
| → hyperair joined | 09:46 |
|
SilentGhost
| hiroprotagonist: it depends how your ci/cd is setup, I'd say. purely from git perspective, if you're going to delete the branch upon merging you don't need to push, you'd have to use -D when deleting though, but that's a small difference. Naturally, if you want to verify your code in the new state, or perhaps you're in the middle of code review, then pushing is a must. | 09:48 |
| ← mowcat left | 09:48 |
| ← yuljk left | 09:50 |
| → yuljk joined | 09:51 |
| → mms_ joined | 09:51 |
|
mms_
| I am doing git clone for same repo and on cygwin I get all folders but on git bash I am getting just one folder | 09:51 |
|
| can one help troubleshoot/fix this | 09:51 |
| → DuckyDev joined | 09:52 |
| → jacobat joined | 09:53 |
|
mms_
| I did fetch and pull still nothing happened | 09:54 |
|
jacobat
| Is it possible to edit files in a remote git repository without cloning it locally first?? | 09:54 |
|
osse
| mms_: what do you mean by "get all folders" ? | 09:54 |
|
hiroprotagonist
| SilentGhost: we have no ci/cd setup presently. It is normally an issue when in the middle of a PR. I suppose just communicate to the team that a force push will happen. | 09:54 |
|
osse
| jacobat: not via git itself. github has this feature | 09:54 |
|
jacobat
| osse: I was expecting as much. Thanks. | 09:55 |
|
SilentGhost
| hiroprotagonist: you could wait till the end. it's not clear why you need to do rebase before code review is over | 09:55 |
|
mms_
| osse: when I clone on cygwin I see many folders which are there in repo | 09:56 |
|
osse
| mms_: is that a way of saying you cd into the repo and run ls ? | 09:56 |
|
mms_
| osse: yes | 09:56 |
| → blackmesa1 joined | 09:56 |
|
hiroprotagonist
| SilentGhost: Waiting until the end will be fine in most scenarios, however if there are a lot of changes on master then the rebase could get a hairy. | 09:57 |
|
osse
| mms_: !repro | 09:57 |
|
gitinfo
| mms_: [!transcript] Please paste (using https://gist.github.com/ or similar) a transcript ( https://git.io/viMGr ) of your terminal session so we can see exactly what you see | 09:57 |
|
hiroprotagonist
| SilentGhost: Keeping the feature branch up to date as we go along feels better apart from the force push | 09:57 |
| → milkt joined | 09:58 |
|
SilentGhost
| hiroprotagonist: if you're working alone it's not a problem at all, the possible conflicts would have to be resolved sooner or later. I don't think doing multiple rebases simplifies things | 09:58 |
|
mms_
| osse: https://gist.github.com/imiten/d6d7407a751e60c8dc3549fca4d10b15 | 09:59 |
| → BeerLover joined | 10:00 |
|
mms_
| osse: different user on different laptop trying git clone and gets just one folder | 10:00 |
| ikonia_ → ikonia | 10:00 |
| ← jacobat left | 10:00 |
| ← lankanmon left | 10:01 |
|
hiroprotagonist
| SilentGhost: What I have been worried about is that there is a better(tm) way of doing this or not doing this at all. I don't know anyone else who uses git really :) but it sounds like I am not missing anything | 10:01 |
|
osse
| mms_: if you don't have the equivalent output from the other computer I cannot compare | 10:01 |
|
mms_
| ok wait | 10:01 |
|
osse
| also, are you cloning a repo then switching to a different folder? | 10:03 |
|
| or are ~/tmp and /cygdrive/d/work/tmp the same? | 10:04 |
|
mms_
| osse: check now | 10:04 |
|
| osse: updated the git | 10:04 |
|
| osse: gist I mean with other user data | 10:06 |
|
osse
| why cd d: ? | 10:07 |
| ← veegee left | 10:08 |
|
mms_
| its cygwin | 10:11 |
|
| osse: its same as /cygdrive/d | 10:11 |
|
| osse: cygwin thing of file system | 10:12 |
|
osse
| ok, so you're cloning the repo then cd'ing somewhere else? | 10:12 |
|
mms_
| osse: no....its same place | 10:12 |
|
osse
| when did you not just cd Release like you did on the laptop? | 10:12 |
|
mms_
| osse: there are two outputs in that gist. one from my laptop with cygwin and other is from colleage laptop with git bash | 10:13 |
|
| osse: d: etc. is from my laptop and c: is from colleage laptop | 10:13 |
|
| osse: Sagar is colleage and I am Miten | 10:13 |
|
osse
| Yes I realize that | 10:14 |
| ← watabou_ left | 10:16 |
|
osse
| I just don't understand why you cd back and forth | 10:20 |
|
| Basically I don't trust the gist | 10:20 |
| → yyy- joined | 10:21 |
| → mikecmpb_ joined | 10:21 |
|
mms_
| osse: if know some troubleshooting command share | 10:22 |
|
| osse: not sure about your comments.....its 2 outputs shared in that gist... | 10:22 |
|
osse
| in both repos, run: git rev-parse HEAD; git ls-tree HEAD | 10:22 |
|
| mms_: My comments (and questions you didn't answer) is why you cd d: then cd here and there back and forth when you could have just done cd Release after cloning like your colleague did | 10:23 |
|
| mms_: Because it looks to me like you run ls in a different folder | 10:23 |
| ← mikecmpbll left | 10:23 |
| ← Newami left | 10:24 |
|
mms_
| osse: I clonded in d:/work/tmp | 10:27 |
|
osse
| why does the prompt say ~/tmp then? | 10:28 |
|
mms_
| osse: its just file system thing way cygwin shows it....its has its own /home/.... | 10:29 |
|
osse
| So /home/Miten.Mehta/tmp and /cygdrive/d/work/tmp are the same folder? | 10:31 |
|
mms_
| osse: they are different | 10:31 |
|
| osse: I wanted to clone in /cygdrive/d/work/tmp so I went there and did clone | 10:31 |
|
osse
| no you didn't | 10:32 |
|
| not according to the gist | 10:32 |
|
| you cloned first, then changed folders | 10:32 |
| ← regedit left | 10:33 |
|
mms_
| osse: which line is confusing you ? | 10:34 |
| → WhiskerBiscuit joined | 10:35 |
| ← jguddas-tr left | 10:35 |
| → settermjd joined | 10:35 |
|
mms_
| osse: let me come back with one more try | 10:36 |
| ← mms_ left | 10:36 |
| ← mikecmpb_ left | 10:36 |
| → mikecmpbll joined | 10:38 |
| ← dartmouthed left | 10:39 |
| → mms_ joined | 10:44 |
|
mms_
| osse: updated gist | 10:44 |
|
| osse: noticed that on Sagar laptop the git clone is doing checkout step but on mine it does | 10:44 |
| ← gloomy left | 10:46 |
|
mms_
| hi git clone command is not doing the checking out files phase | 10:46 |
| → gloomy joined | 10:47 |
| ← gloomy left | 10:47 |
| ← BeerLover left | 10:48 |
| → watabou_ joined | 10:48 |
| → gloomy joined | 10:49 |
| ← gloomy left | 10:49 |
| → gloomy joined | 10:52 |
| → planetcall|work joined | 10:52 |
| ← gloomy left | 10:52 |
| → lankanmon joined | 10:54 |
| → fairuz joined | 10:54 |
| ← fairuz left | 10:55 |
|
osse
| mms_: now it makes sense | 10:58 |
|
| can you run git rev-parse HEAD; git ls-tree HEAD in both? | 10:58 |
| ← mms_ left | 10:59 |
| ← igemnace left | 11:01 |
| → jguddas-tr joined | 11:02 |
| ← settermjd left | 11:04 |
| ← TJ- left | 11:09 |
| ← elichai2 left | 11:12 |
| → mms_ joined | 11:12 |
|
mms_
| hi on some laptops the repo is not cloning full | 11:12 |
| ← madprops left | 11:13 |
|
mms_
| how to troubleshoot why its not downloading all folders | 11:13 |
|
osse
| can you run git rev-parse HEAD; git ls-tree HEAD in both? | 11:14 |
| ← blackmesa1 left | 11:17 |
| ← ahmed89 left | 11:17 |
|
osse
| and git status | 11:20 |
| ← watabou_ left | 11:22 |
| → blackmesa1 joined | 11:23 |
| → devish joined | 11:26 |
|
devish
| Is there a way to delete a branch (remote) such that it cannot be recovered? | 11:26 |
| → ricekrispie2 joined | 11:27 |
|
_ikke_
| no, not without having direct access to the remote repository | 11:27 |
|
devish
| I have complete access | 11:28 |
| ← mms_ left | 11:28 |
| ← ricekrispie left | 11:29 |
|
grawity
| first just delete the branch as normal, then run `git reflog expire --expire=now --all` and `git gc --prune=now` on the server-side repo | 11:29 |
| → pR0Ps_ joined | 11:29 |
| ← blackmesa1 left | 11:29 |
|
grawity
| (commands copied from github's "oops sensitive data" article) | 11:29 |
| ← pR0Ps left | 11:29 |
| pR0Ps_ → pR0Ps | 11:29 |
|
devish
| cool...thanks | 11:30 |
| → gxt joined | 11:32 |
| → blackmesa1 joined | 11:38 |
| → Jackneilll joined | 11:43 |
| ← Jackneill left | 11:47 |
| → shawn_dones joined | 11:49 |
| ← Murr left | 11:53 |
| → Murr joined | 11:54 |
| → delboy1978uk joined | 11:55 |
|
delboy1978uk
| hi guys o/ | 11:55 |
|
| is there a way of undoing a commit, and leaving the actual changes in place as uncommitted changes? | 11:55 |
|
BtbN
| git reset | 11:55 |
|
delboy1978uk
| doesnt that roll back the changes though? | 11:56 |
|
BtbN
| Only if you do a hard reset. | 11:56 |
|
delboy1978uk
| ah! | 11:56 |
|
| i always do hard resets | 11:56 |
|
| cool, let me try, and thanks BtbN | 11:56 |
|
| awesome | 11:57 |
| → nowhere_man joined | 12:00 |
| → subopt joined | 12:04 |
| ← blackmesa1 left | 12:10 |
| ← milkt left | 12:11 |
| ← WhiskerBiscuit left | 12:18 |
| → no_gravity joined | 12:20 |
|
no_gravity
| Hello! I am looking at a commit with "git log -p --word-diff --word-diff-regex=." but it shows me lines with added tabs as completely deleted and added. | 12:20 |
|
| I never saw that happen. What is going on? | 12:21 |
| → quackgyver joined | 12:24 |
| → Nawab joined | 12:25 |
| ← Nawab left | 12:27 |
| ← OtakuSenpai left | 12:28 |
| → OtakuSenpai joined | 12:28 |
| ← Repox left | 12:33 |
| ← netj left | 12:34 |
| → netj joined | 12:34 |
|
no_gravity
| Figured it out. | 12:36 |
|
| --word-diff --word-diff-regex=. seems to not work for whitespace. | 12:36 |
| ← queip left | 12:37 |
| → fendor joined | 12:41 |
|
fendor
| not entirely git, but how can I reopen a pr that has been merged and reverted afterwards? | 12:41 |
|
Habbie
| what service? | 12:42 |
| ← no_gravity left | 12:43 |
|
_ikke_
| fendor: In most cases, you probably have to create a new PR | 12:43 |
|
fendor
| github | 12:43 |
|
_ikke_
| If the branch has been deleted, you cannot open it anyway | 12:44 |
| ← jguddas-tr left | 12:44 |
|
fendor
| _ikke_, but github pr shows that there is no diff | 12:44 |
| ← satoriprints left | 12:44 |
|
Habbie
| then it was not reverted | 12:44 |
|
| can you show us? | 12:44 |
|
fendor
| Habbie, what is the best way to show? | 12:44 |
|
| github link? | 12:44 |
|
Habbie
| works for me | 12:45 |
|
fendor
| https://github.com/haskell/haskell-ide-engine/commits/master | 12:45 |
|
| revert is Revert "Merge pull request #1237 from fendor/add-package-tests" | 12:45 |
| → queip joined | 12:45 |
|
Habbie
| ok | 12:45 |
|
fendor
| original pr: https://github.com/haskell/haskell-ide-engine/pull/1237 | 12:45 |
| ← queip left | 12:46 |
|
Habbie
| ok | 12:46 |
|
| and the new pr? | 12:47 |
| → azwieg103 joined | 12:47 |
|
fendor
| I didnt open one, couldnt since github says there are no differences | 12:47 |
|
Habbie
| show us that | 12:48 |
|
fendor
| here is the brnach that got merged: https://github.com/fendor/haskell-ide-engine/tree/add-package-tests/test/unit | 12:49 |
| → mowcat joined | 12:49 |
|
fendor
| https://github.com/fendor/haskell-ide-engine/tree/add-package-test | 12:49 |
|
| https://github.com/fendor/haskell-ide-engine/tree/add-package-tests | 12:49 |
| → benharri joined | 12:49 |
|
fendor
| https://github.com/haskell/haskell-ide-engine/compare/master...fendor:add-package-tests | 12:49 |
|
Habbie
| There isn’t anything to compare. | 12:49 |
|
| haskell:master is up to date with all commits from fendor:add-package-tests. | 12:49 |
|
| y | 12:49 |
|
| -y | 12:49 |
|
| did you rebase, as was requested? | 12:49 |
|
| well | 12:50 |
|
| "@fendor Please update this branch to work with current master, and we can merge it again." | 12:50 |
|
| it's best to also rebase | 12:50 |
|
fendor
| Habbie, this request has been reverted in irc. | 12:51 |
|
| but yeah, will try it | 12:51 |
|
| i fail to correctly rebase it... | 12:52 |
| → queip joined | 12:53 |
| ← queip left | 12:53 |
| → dege joined | 12:55 |
|
fendor
| git rebase master, right? | 12:56 |
|
Kobaz
| how come i can do git diff origin/1.9:AEL/CoreCallRouter.ael AEL/CoreCallRouter.ael | 12:56 |
|
| but not git diff AEL/CoreCallRouter.ael origin/1.9:AEL/CoreCallRouter.ael | 12:57 |
|
| oh | 12:57 |
|
| prefix with -- | 12:57 |
|
| git diff -- origin/1.9:AEL/CoreCallRouter.ael AEL/CoreCallRouter.ae | 12:57 |
| → CodeSlingerPaul joined | 12:59 |
| ← dege left | 13:00 |
| ← kjartan left | 13:02 |
| ← xelxebar left | 13:02 |
| → xelxebar joined | 13:02 |
| → courrier joined | 13:02 |
| → rafasc joined | 13:03 |
| → gloomy joined | 13:04 |
| ← mowcat left | 13:04 |
| ← nowhere_man left | 13:06 |
| → kjartan joined | 13:07 |
| → kenlee joined | 13:08 |
| ← devish left | 13:17 |
| → nowhere_man joined | 13:17 |
| ← stfn left | 13:18 |
| → jguddas-tr joined | 13:19 |
| → stfn joined | 13:19 |
| → blackswan joined | 13:19 |
| → watabou_ joined | 13:20 |
|
blackswan
| i am trying to debug a problem with gitlab and setting GIT_CURL_VERBOSE=1 in the environment doesn't seem to do anything. | 13:20 |
|
osse
| maybe you're using ssh ? | 13:20 |
|
blackswan
| oh | 13:21 |
|
| ok | 13:21 |
|
| maybe i don't know what i'm doing is the problem | 13:21 |
|
| thx | 13:21 |
| → Silenced joined | 13:21 |
|
osse
| git remote -v | 13:21 |
| ← sQVe left | 13:21 |
|
osse
| if it's ssh you can use GIT_SSH_COMMAND='ssh -vv' or something like that | 13:21 |
|
blackswan
| my problem is that i am getting "remote: GitLab: You are not allowed to force push code to a protected branch on this project." | 13:22 |
| → queip joined | 13:22 |
|
pandem
| use a different branch or unprotect the branch? | 13:23 |
|
blackswan
| and i do not understand what that means. | 13:23 |
| → howell joined | 13:23 |
|
rafasc
| blackswan: that's a gitlab setting that pretty much means what it says. | 13:23 |
|
blackswan
| i didn't protect a branch. not on purpose. i don't know anything about protecting branches. | 13:23 |
|
pandem
| you can set protected branches on gitlab that you can only merge request to | 13:23 |
|
rafasc
| you are not allowed to force push into that branch. | 13:23 |
|
blackswan
| hence my confusion | 13:23 |
| → ghoti joined | 13:23 |
|
blackswan
| oh | 13:23 |
|
| wait. hmm. | 13:23 |
| ← jguddas-tr left | 13:24 |
|
rafasc
| blackswan: probably some setting protects master by default. | 13:24 |
|
blackswan
| ok, i am an idiot who has not had enough caffeine. | 13:24 |
| → pllong joined | 13:26 |
| → clime joined | 13:27 |
| ← yyy- left | 13:27 |
|
clime
| i just encontered something quite weird | 13:27 |
|
| i tried git pull <repo url> master, and expected it will pull new commits as well as annotated tags attached to those commits. | 13:28 |
|
| Yet, it did not pull tags | 13:28 |
|
| Then i ran git pull <repo url> master --tags and it fetched the tags | 13:28 |
|
| yet --tags option for git pull is undocumented and should not even be needed according to --no-tags description | 13:28 |
|
| anyone knows what's up with this? | 13:29 |
|
osse
| are you sure those tags points to commits in master? | 13:29 |
|
clime
| osse: i would need to check it but i suppose so | 13:29 |
|
osse
| if they aren't then there is no mystery | 13:30 |
| → yyy- joined | 13:30 |
| ← Murr left | 13:30 |
|
clime
| well, there is still the --tags options, which is not documented...at least in my man pages | 13:30 |
|
rafasc
| wrt documentation, I guess that could be explained better. The main cause is that pull is fetch+merge and --tags only applies to the fetch part. | 13:30 |
|
clime
| that's a mystery i think | 13:31 |
|
| ok | 13:31 |
|
rafasc
| if you check git pull -h; you'll see they separate. | 13:31 |
|
clime
| ok, i can see --tags there | 13:32 |
|
| but it is missing in my man pages under 'Options related to fetching' | 13:32 |
|
rafasc
| has to do with pull forwarding options to fetch. You can send a patch to the mailing list improving the documentation. It's a great first contribution | 13:32 |
|
clime
| for man git pull | 13:32 |
|
gitinfo
| the git-pull manpage is available at https://gitirc.eu/git-pull.html | 13:32 |
|
clime
| ok, cool! | 13:32 |
| → Murr joined | 13:33 |
| → cd joined | 13:34 |
|
clime
| thanks, i am cloning the repo upstream repo to see to which branch the tag relate | 13:34 |
| → scientes joined | 13:35 |
|
clime
| but it's probably unnecessary cause i can see it already in my fork... | 13:35 |
|
| well, it is attached to a commit, which is in master and that i downloaded before | 13:36 |
|
osse
| git branch --contains v1.2.3. | 13:36 |
|
| does that print master? | 13:37 |
|
clime
| yes | 13:37 |
|
| in the fork it prints * master | 13:37 |
|
osse
| Which is the same repo you ran "git pull <repo url> master" in ? | 13:38 |
|
rafasc
| but that means you have the tag in the first place, otherwise it would not resolve v.1.2.3 ... | 13:38 |
|
clime
| rafasc: i did already git pull <repo url> master --tags, which downloaded the tag | 13:38 |
|
| osse: yes | 13:39 |
|
osse
| then there are signs of mystery | 13:39 |
|
rafasc
| I think it may be related to the fact you are specifying 'master' | 13:41 |
|
| which is resolved to refs/heads/master:refs/remote/remotename/mater; | 13:41 |
|
| and the tag following only applies when you do a bare $git pull (?); | 13:42 |
|
clime
| rafasc: ah, that's probably true | 13:42 |
|
rafasc
| did not confirm. | 13:42 |
|
clime
| right, i will try | 13:42 |
| → jguddas-tr joined | 13:43 |
|
clime
| idk, i need to reclone the repo, which will take a while, i'll confirm later | 13:43 |
|
rafasc
| clime: make use of --reference: git clone --reference /path/to/old/repo url newclone | 13:45 |
|
| so you don't need to transfer objects that already live in your machine. | 13:45 |
|
clime
| huh, cool | 13:45 |
| → barteks2x joined | 13:46 |
|
rafasc
| just be aware that it will actually use the objects from the referenced repo if it needs. So don't move it or erase it. | 13:47 |
|
| or add --dissociate, which will undo the dependency after cloning. | 13:48 |
| ← sgnls left | 13:49 |
| ← chymera left | 13:49 |
|
clime
| ye, with --reference that's much faster | 13:50 |
| → chymera joined | 13:51 |
| ← jguddas-tr left | 13:51 |
|
clime
| so i did only git pull <upstream_url>, ommitting the 'master' but it still did not pull the tag | 13:52 |
| ← watabou_ left | 13:52 |
|
clime
| git pull <upstream_url> --tags did fetch the tag | 13:53 |
|
| maybe i need to have the remote for upstream url added | 13:54 |
| ← subopt left | 13:54 |
|
rafasc
| clime: have you checked if you configured git to not pull tags? | 13:56 |
|
clime
| i tried git config -l, if i see any remote.<name>.tagOpt but didn't see anything like that, will check again | 13:57 |
|
| rafasc: it works as expected if i first do git remote add upstream <repo url> and then git pull upstream | 13:58 |
| ← Jackneilll left | 13:58 |
|
rafasc
| interesting. | 13:58 |
|
| hit the mailing list. This is either worthy documenting, or a bug. | 13:59 |
| → Jackneilll joined | 14:01 |
|
clime
| okay, i will try to make a patch for the --tags thing in git pull man pages, i will mention this as well | 14:02 |
| → bluezone joined | 14:03 |
| → watabou_ joined | 14:11 |
| → boombatower joined | 14:11 |
| ← barteks2x left | 14:14 |
| → jguddas-tr joined | 14:17 |
| → greggerz joined | 14:18 |
| → liaolijun joined | 14:19 |
| ← jguddas-tr left | 14:24 |
| → dege joined | 14:24 |
| → Elon_Satoshi joined | 14:26 |
| → oatmealraisin joined | 14:26 |
| ← Copenhagen_Bram left | 14:28 |
| → AtumT joined | 14:28 |
| ← kapilp left | 14:28 |
| → spacesuitdiver joined | 14:30 |
| → aweb joined | 14:31 |
| ← delboy1978uk left | 14:33 |
| → barteks2x joined | 14:34 |
| → jguddas-tr joined | 14:35 |
| ← haasn left | 14:39 |
| → haasn joined | 14:41 |
| → savolla joined | 14:41 |
| → thiago joined | 14:43 |
| ← watabou_ left | 14:44 |
| ← spacesuitdiver left | 14:46 |
| ← cliluw left | 14:47 |
| → cliluw joined | 14:48 |
| → spacesuitdiver joined | 14:48 |
| ← spacesuitdiver left | 14:52 |
| ← aweb left | 14:52 |
| → cdown joined | 14:52 |
| ← floppydh left | 14:56 |
| ← Noti left | 15:01 |
| ← courrier left | 15:02 |
| → courrier joined | 15:07 |
| ← cdown left | 15:10 |
| ← thiago left | 15:11 |
| ← enoq left | 15:14 |
| ← savolla left | 15:14 |
| → sbeyer joined | 15:15 |
| ← oatmealraisin left | 15:16 |
| ← Murr left | 15:17 |
| → Murr joined | 15:18 |
| Rh0nda → Rhonda | 15:20 |
| ← silverballz left | 15:20 |
| → silverballz joined | 15:21 |
| ← liaolijun left | 15:21 |
| ← raffo left | 15:22 |
| → oatmealraisin joined | 15:23 |
| ← libertyprime left | 15:24 |
| → fahadash joined | 15:25 |
| → Phylock joined | 15:28 |
| ← dskull left | 15:28 |
| ← chele left | 15:28 |
| → dskull joined | 15:29 |
| → aweb joined | 15:30 |
| → gtbuchanan_ joined | 15:32 |
| → nowhereman joined | 15:32 |
| ← nowhere_man left | 15:32 |
| → tang^ joined | 15:35 |
| ← gtbuchanan left | 15:35 |
| → blackmesa1 joined | 15:38 |
| → watabou_ joined | 15:40 |
| → r1ch joined | 15:42 |
| ← hellauer left | 15:45 |
| → jcbitter joined | 15:45 |
| ← jguddas-tr left | 15:46 |
| ← hiroprotagonist left | 15:48 |
| ← interrobangd_ left | 15:49 |
| ← nowhereman left | 15:51 |
| → cdown joined | 15:51 |
| ← courrier left | 15:55 |
| ← bashfulshell left | 15:55 |
| ← Lucas_Gray left | 15:55 |
| ← BrianBlaze left | 15:58 |
| → BrianBlaze joined | 15:59 |
| → nowhereman joined | 15:59 |
| BlessJah1 → Blessjah | 16:01 |
| ← blackmesa1 left | 16:03 |
| → thiago joined | 16:04 |
| ← thefatma left | 16:06 |
| ← Murr left | 16:06 |
| → savolla joined | 16:06 |
| → Murr joined | 16:07 |
| → nowhere_man joined | 16:09 |
| ← nowhereman left | 16:09 |
| APK → AKPWD | 16:11 |
| → impermanence joined | 16:12 |
| → torontoyes joined | 16:12 |
|
chymera
| vishal: so `gpg --sign somefile` works fine | 16:13 |
|
torontoyes
| I was attempting to git revert to a previous commit | 16:13 |
|
| I attempted that 3 times. | 16:13 |
|
rafasc
| torontoyes: "revert to a previous commit". git revert reverts particular commits, it is not a "go back to this state". | 16:14 |
|
torontoyes
| When I try to revert, it says Branch is up todate with origin/master | 16:14 |
| → seaef-tnw joined | 16:14 |
| → thefatma joined | 16:15 |
|
vishal
| chymera: run with GIT_TRACE to try and better track what might be happening | 16:15 |
|
torontoyes
| rafasc: ohh..ic | 16:15 |
|
| how do I revert to a paticular commit? | 16:15 |
|
_ikke_
| how far back is that commit? | 16:15 |
|
torontoyes
| 8 commits | 16:15 |
|
| back in time? | 16:16 |
|
rafasc
| depends if you are willing to rewrite history or not. | 16:16 |
| ← edwardly left | 16:16 |
|
_ikke_
| So you want those 7 following commits to be gone? | 16:16 |
|
rafasc
| you can revert all those 8 commits, or reset back. | 16:16 |
| → Repox joined | 16:16 |
| → Lordveda joined | 16:16 |
|
torontoyes
| I want to reset to a paticular commit and let it build of the state of the files of that commit | 16:16 |
| → achen_ joined | 16:16 |
|
_ikke_
| So you want those 7 following commits to be gone? | 16:16 |
|
torontoyes
| yes | 16:17 |
|
_ikke_
| git reset --hard <commit> | 16:17 |
|
| where <commit> is the hash of the commit you want to go back to | 16:17 |
|
rafasc
| ^ will nuke all uncommited changes. | 16:17 |
| ← nowhere_man left | 16:17 |
| → hellauer joined | 16:18 |
|
Lordveda
| If someone wants to step back from one commit to its parent removing the commit but keeping the changed files which git reset options to use? | 16:18 |
| ← watabou_ left | 16:18 |
| ← thefatma left | 16:19 |
|
rafasc
| Lordveda: --soft or --mixed, depending if you want the staging area modified or not. | 16:20 |
|
Lordveda
| explain the staging area plz | 16:20 |
|
rafasc
| --soft will leave everything untouched, --mixed (the default) will change the staging area. | 16:20 |
|
| !book | 16:20 |
|
gitinfo
| There are several good books available about git; 'Pro Git' is probably the best: http://git-scm.com/book but also look at !bottomup !cs !gcs !designers !gitt !vcbe and !parable | 16:20 |
| → _noblegas joined | 16:21 |
|
Lordveda
| reading an entire book won't do a fast solution for a problem :) | 16:21 |
| → sgen joined | 16:21 |
|
rafasc
| Lordveda: staging area, index, cache, are all names to a structure that represents the snapshot of your project. | 16:21 |
|
| when you use git add; you are adding changes to the staging area. | 16:21 |
|
Lordveda
| I want the commit to be reset so that I can re-add the changed files one by one | 16:22 |
| → igemnace joined | 16:22 |
|
Lordveda
| to the staging area of course | 16:23 |
|
rafasc
| Lordveda: the staging area is one of the fundamental blocks for day-to-day git. If you are using git, you need to be aware of the existance of this. | 16:23 |
|
chymera
| vishal: super weird, it seems to have been a temporary fluke, now everything works :-/ | 16:23 |
|
| at any rate, thank you :) | 16:23 |
|
vishal
| cheers | 16:23 |
|
rafasc
| Lordveda: then you want --mixed; or just $git reset; | 16:23 |
| → Newami joined | 16:24 |
|
torontoyes
| rafasc: Thanks | 16:24 |
| ← Repox left | 16:24 |
|
Lordveda
| rafasc: after I do a git reset without option and do a git status I don't see that my files are changed but I a clean tree | 16:24 |
| ← achen_ left | 16:25 |
| → mat001 joined | 16:25 |
|
rafasc
| Lordveda: then it means your files match that commit. | 16:26 |
|
Lordveda
| explaining my problem: I have made a commit that includes 2 files, I want to revert back to the previous commit and then add the changes for each file as an entity | 16:27 |
|
| So I want the files to be as if they were removed from the staging area as well but keeping the changes to those files, which git reset option would achieve that? | 16:28 |
|
rafasc
| Lordveda: did you 'add' this files for the first time in these commits? | 16:29 |
| → thefatma joined | 16:29 |
|
Lordveda
| rafasc: yes | 16:29 |
|
rafasc
| you may want to use: $git reset -N commit, then. | 16:29 |
| → watabou_ joined | 16:29 |
|
rafasc
| or do the reset, and use $git rm --cached <file>; | 16:30 |
|
Lordveda
| what will this git reset -N do? | 16:30 |
|
rafasc
| I think the latter is better. | 16:30 |
|
Lordveda
| I know that git reset -N commit will do a mixed reset | 16:31 |
|
| I don't get what the -N option do | 16:31 |
|
rafasc
| the -N, is "intent-to-add", basically it would reset it an empty file. | 16:31 |
|
| thus, my suggestion of removing it from the staging area, so you can add it again. | 16:32 |
|
| be sure to use --cached, otherwise it will also remove from your directory. | 16:33 |
|
Lordveda
| so if I want to reset the latest commit, I would issue $git reset -N <-- without any other options? | 16:33 |
|
rafasc
| if it's the last commit, you can just $git rm --cached <file>; git commit --ammend; | 16:34 |
|
| amend* | 16:34 |
| ← watabou_ left | 16:34 |
|
Lordveda
| actually I want the commit which includes the two files to be reset | 16:34 |
|
| and then add each file in its own commit | 16:35 |
|
rafasc
| with reset, you would need to specify "the last commit", git reset HEAD; | 16:35 |
|
| Lordveda: git rm --cached file1 file2; git commit --amend; git add file1; git commit; git add file2; git commit; | 16:35 |
| → strk joined | 16:36 |
|
strk
| what's a quick command to get lits of files changed in a commit ? | 16:36 |
|
rafasc
| strk: for scripting or for inspecting? | 16:37 |
|
strk
| scripting | 16:37 |
|
Lordveda
| rafasc: should I do git co to the parent commit first? | 16:37 |
| ← surfist left | 16:37 |
|
tang^
| git show --name-only will work | 16:37 |
|
| for scripting maybe add --porcelain | 16:38 |
| → UrsoBranco joined | 16:38 |
|
rafasc
| git diff-tree HEAD~10 --name-status | 16:38 |
| → surfist joined | 16:39 |
|
rafasc
| tang^: show doesn't have a --porcelain, that's status. | 16:39 |
|
tang^
| oh, sorry | 16:39 |
| ← Murr left | 16:40 |
| → Murr joined | 16:41 |
| ← Kronuz left | 16:41 |
|
rafasc
| Lordveda: git co; is an alias. I don't know if that's just an alias for commit or checkout, try to avoid referencing aliases when asking for support. | 16:42 |
| ← gxt left | 16:44 |
| ← thefatma left | 16:46 |
| → theoceaniscool joined | 16:47 |
| → sboyd joined | 16:48 |
| → Lucas_Gray joined | 16:48 |
| ← mikecmpbll left | 16:50 |
| ← fphilipe left | 16:51 |
| → duderonomy joined | 16:52 |
| → nowhere_man joined | 16:53 |
| → courrier joined | 16:55 |
| → leb joined | 16:55 |
| ← aweb left | 16:56 |
| ← netj left | 16:59 |
| → igemnace_ joined | 16:59 |
| ← igemnace left | 16:59 |
| ← TomyWork left | 16:59 |
| → netj joined | 16:59 |
| ← sgen left | 16:59 |
| ← Fusl left | 17:00 |
| ← boombatower left | 17:00 |
| → boombatower joined | 17:01 |
| → nelsnelson joined | 17:01 |
| → Fusl joined | 17:01 |
| ← thiago left | 17:02 |
| → wildermind joined | 17:03 |
| → blackmesa joined | 17:06 |
| ← seaef-tnw left | 17:06 |
| → seaef-tnw joined | 17:08 |
| → thiago joined | 17:09 |
| ← yyy- left | 17:09 |
|
tang^
| sounds like an alias for somebody coming from svn | 17:11 |
| ← savolla left | 17:12 |
| ← Lucas_Gray left | 17:12 |
|
strk
| the --name-only didn't give me full path, some of them started with .../ | 17:13 |
|
| git show --name-only, that is | 17:13 |
|
| the diff-tree only showed me changed directories | 17:14 |
| ← blackmesa left | 17:14 |
|
tang^
| heh... I was just trying that myself | 17:14 |
| ← kjartan left | 17:15 |
|
osse
| strk: git diff --name-only commit~ commit | 17:15 |
| ← sboyd left | 17:15 |
|
strk
| thanks, whorks | 17:16 |
| ← fendor left | 17:16 |
|
tang^
| I need that for building a list of files to copy from my repo to another directory | 17:17 |
| → czart joined | 17:17 |
|
tang^
| except for certain exceptions | 17:17 |
|
rafasc
| for scripting I would avoid using diff. | 17:18 |
|
| git diff-tree -r c9cef0a85402768c3b6fc0282dcc7d45a095fcd3 --name-only --no-commit-id | 17:18 |
|
tang^
| diff-tree only shows the root directory's changes? | 17:19 |
|
rafasc
| just look into diff-tree and its options. | 17:19 |
| → Mr__Anderson joined | 17:19 |
|
rafasc
| tang^: yes, but you can ask it to recurse with -r. | 17:19 |
| ← Mr__Anderson left | 17:19 |
| → kjartan joined | 17:19 |
|
rafasc
| tang^: it's similar how $ls works. | 17:19 |
|
tang^
| oh, there it is | 17:20 |
|
| I didn't go far enough down the documentation | 17:20 |
|
| thanks | 17:21 |
|
rafasc
| also, -z worth to look at for robust scripts. | 17:22 |
|
| for filenames with spaces/newlines | 17:23 |
| → fphilipe joined | 17:24 |
| ← seaef-tnw left | 17:25 |
|
tang^
| oh geez. I hope no filename has a newline in it | 17:25 |
| ← courrier left | 17:26 |
| → seaef-tnw joined | 17:29 |
| ← quackgyver left | 17:29 |
| ← R2robot left | 17:33 |
|
Lordveda
| rafasc: actually I am not on an actual project, I am doing a git training from a website https://gitexercices.fracz.com/ | 17:37 |
|
| https://gitexercises.fracz.com/ | 17:38 |
|
| I am doing the 14th exercise | 17:39 |
| → yyy joined | 17:40 |
|
rafasc
| what is the name of the 14th? | 17:41 |
| → leeN joined | 17:41 |
| ← energizer left | 17:42 |
|
Lordveda
| split-commit | 17:42 |
| → energizer_ joined | 17:42 |
| → gxt joined | 17:42 |
| → blackmesa joined | 17:43 |
|
Lordveda
| My progression is at https://gitexercises.fracz.com/committer/49185e38fa67a83a36e0e5d65944605e2d32e771 | 17:43 |
| ← Ivo left | 17:43 |
|
Lordveda
| when I undergo the exercise I start by doing git status | 17:44 |
|
| then do git log --oneline --color --decorate | 17:44 |
|
rafasc
| I already typed the solution here. | 17:45 |
|
Lordveda
| when I did git reset -N I have got a clean working tree | 17:45 |
|
rafasc
| although I used a different approach than the one they are hinting. | 17:45 |
|
| Lordveda: you need to specify the commit you want to reset. | 17:46 |
|
| like: git reset HEAD~1; | 17:46 |
|
Lordveda
| the branches in this tree are master and split-commit | 17:46 |
|
| I did git reset -N split-commit | 17:46 |
| → g00s joined | 17:47 |
| ← nelsnelson left | 17:47 |
|
Lordveda
| or should I do git reset -N HEAD@{0}? | 17:47 |
|
rafasc
| (No need for N) | 17:47 |
| ← blackmesa left | 17:48 |
|
Lordveda
| fine no need for the N | 17:48 |
|
rafasc
| since this is the most recent commit, you can do HEAD~1 | 17:48 |
| ChanServ set mode: +o | 17:48 |
| → nelsnelson joined | 17:48 |
| Eugene changed the topic to: #git Welcome to #git, the place for git* related discussion | First visit? Read: https://gitirc.eu | Current stable version: 2.21.0 | Getting "cannot send to channel"? /msg gitinfo .voice | This channel is logged: https://gitirc.eu/log | git-hg: Don't you know that's poison? | 17:48 |
| Eugene set mode: -o | 17:48 |
|
Lordveda
| so I should reset to make the tree revert back to HEAD@{1}? | 17:49 |
|
| and that is issued while I am on the latest commit? right? | 17:49 |
|
| rafasc: you mentioned git rm --cached file, would this still apply to this case and this exercise? | 17:50 |
|
rafasc
| Lordveda: HEAD@{1} and HEAD~1 mean different things. | 17:50 |
|
Lordveda
| when I do reflog I find HEAD@{1} | 17:51 |
|
| and HEAD@{0} | 17:51 |
|
| etc | 17:51 |
| → savolla joined | 17:51 |
|
Lordveda
| so what is the difference between HEAD@{1} and HEAD~1 | 17:51 |
|
rafasc
| man gitrevisions | 17:52 |
|
gitinfo
| the gitrevisions manpage is available at https://gitirc.eu/gitrevisions.html | 17:52 |
|
rafasc
| HEAD~1 means: the first ancestor following first-parent. | 17:53 |
|
Lordveda
| i.e from 0 to 1 | 17:53 |
|
rafasc
| where HEAD@{1} is the first entry in the reflog. | 17:53 |
|
Lordveda
| ?? | 17:53 |
|
rafasc
| HEAD~1 is a way to say parent, HEAD~2 grand-parent, etc. | 17:54 |
|
Lordveda
| so I need to do git reset HEAD~1 and not HEAD@{1} | 17:54 |
|
rafasc
| correct. | 17:54 |
|
Lordveda
| so when I am on the HEAD@{0} and I need to reset to the parent I need to type git reset HEAD~1 | 17:55 |
|
osse
| HEAD@{0} and HEAD~0 are both just equal to HEAD | 17:56 |
|
rafasc
| I suggest you stop using reflog notation until you understand what the reflog is. The something@{n} | 17:57 |
|
Lordveda
| so the entries in the reflog aren't Zero-based? | 17:57 |
|
osse
| yes they are | 17:58 |
|
rafasc
| the reflog is important for recovering things. But it's more important you understand the other concepts first. | 17:58 |
| → lungaro joined | 17:58 |
| → mikecmpbll joined | 17:58 |
|
lungaro
| I have a really annoying issue with github and key management, hoping someone can help me organize it. I thought i'd be smart enough to manage ssh keys in my ssh-agent, but the problem is I use ssh mux connections | 17:58 |
|
rafasc
| Lordveda: for example, the reflog has no "order" you don't know if commit HEAD@{1} comes before or after commit HEAD@{2}. | 17:59 |
|
Lordveda
| so I should use HEAD@{1} or HEAD~1 to reset to the parent? | 17:59 |
|
lungaro
| so mux connections dont die after you change the keys so they are never updated. Is there a smarter way to update the mux'd connections? | 17:59 |
|
rafasc
| the latter. | 17:59 |
|
Lordveda
| got you rafasc | 17:59 |
| → Sasazuka joined | 17:59 |
|
Lordveda
| the order in reflog doesn't need to be the same order of commits | 17:59 |
|
| it refers more to everything that occured to the working tree as a whole | 18:00 |
|
| and thus it can't be used in reset except with caution, am I right? | 18:00 |
|
rafasc
| Lordveda: not even that. If tracks how refs (branches) change over time. | 18:00 |
|
Lordveda
| bottom line reflog is more general | 18:01 |
|
| ?? | 18:01 |
|
osse
| no, the reflog is something else completely | 18:01 |
|
rafasc
| Lordveda: for example, if you checkout A; checkout B; checkout C; (just switching branches). HEAD@{0}=C, HEAD@{1}=B, HEAD@{2}=C | 18:01 |
| ← thiago left | 18:02 |
|
rafasc
| Lordveda: it tracks how your references change over time. | 18:02 |
|
| and HEAD is just a reference that defines what you have currently checked out. | 18:02 |
|
Lordveda
| i.e the commands I issue through git are logged within the reflog | 18:02 |
|
| in the order I am entering them | 18:02 |
|
rafasc
| Lordveda: the ones that change references, yes. | 18:02 |
| ← Murr left | 18:03 |
|
Lordveda
| thus HEAD@{x} doesn't necessarily == HEAD~x | 18:03 |
|
osse
| correct | 18:03 |
|
rafasc
| that's rarely true. | 18:03 |
|
osse
| and your HEAD@{x} is probably not equal to my HEAD@{x} | 18:04 |
|
Lordveda
| rafasc: thanks for clarifying things | 18:04 |
| → Murr joined | 18:04 |
|
rafasc
| also, HEAD@{x} == HEAD@{x+n} may be true for some n. | 18:05 |
| → freeman42x joined | 18:05 |
| ← nowhere_man left | 18:06 |
|
rafasc
| for example: try doing a bunch of $git checkout <the branch you are at>; | 18:06 |
| ← kgrandly left | 18:07 |
|
rafasc
| if you look at the reflog, you'll see a bunch of entries referring to the same commit. | 18:07 |
| → pks_ joined | 18:15 |
| ← pks left | 18:16 |
| pks_ → pks | 18:16 |
| → jubal joined | 18:17 |
| ← barteks2x left | 18:20 |
| → barteks2x_ joined | 18:20 |
| → sgnls joined | 18:24 |
| → fattredd joined | 18:24 |
| ← jcbitter left | 18:25 |
| → jcbitter joined | 18:26 |
| → plexigras joined | 18:28 |
| ← sauvin left | 18:32 |
| ← sz0 left | 18:33 |
| ← plexigras left | 18:40 |
| → linux_dr joined | 18:41 |
| ← hexa- left | 18:41 |
| → dartmouthed joined | 18:41 |
| → plexigras joined | 18:42 |
| → hexa- joined | 18:47 |
| → kneeki joined | 18:50 |
| → elricsfate joined | 18:53 |
|
elricsfate
| Hey folks. When using the env branching model and rebasing, should the rebasing be creating NEW commits to the branch? | 18:54 |
| ← hellauer left | 18:54 |
|
elricsfate
| https://www.wearefine.com/mingle/env-branching-with-git/ | 18:54 |
| → Repox joined | 18:55 |
|
tang^
| rebasing creates new hashes for existing commits, yes | 18:55 |
|
elricsfate
| Hmmm. OK | 18:55 |
|
| I'm a bit confused by how this model works or perhaps I'm just holding it wrong | 18:56 |
|
| lets say I rebase off staging before merging or creating a pull request for that branch, I'd expect the only additional commits I see to be the two commits I originally added to the feature branch | 18:56 |
| → R2robot joined | 18:56 |
|
elricsfate
| Instead I see like 8-9 commits | 18:56 |
| → Ignacy joined | 18:59 |
| ← Newami left | 18:59 |
|
elricsfate
| So I have the feature/addcats branch based off master. I then need to merge that feature into develop so I rebase off develop and open a pull request to merge. I'd expect to only see the new changes on the top of that pull request. Instead I see a few. Is that normal with this way tang^? | 19:00 |
|
| *a few extra based on the rebase | 19:00 |
|
tang^
| if those commits on master aren't in dev, then they'll show up as additional on dev | 19:01 |
|
| though, given the model you shared, that shouldn't happen | 19:01 |
| → bn_work joined | 19:01 |
| ← _noblegas left | 19:03 |
| ← T_UNIX left | 19:04 |
| ← leprechau left | 19:05 |
| ComradeCrocodill → Crocodillian | 19:06 |
| → hellauer joined | 19:06 |
| ← satifant left | 19:07 |
| → Vonor joined | 19:08 |
|
Vonor
| hi. I'm fiddling around for a bit now with git show, git log and git rev-parse. I want only the pretty format i specify from a certain file and only from the latest commit that file had. any idea? | 19:10 |
|
osse
| Vonor: git log --pretty=blabla -1 -- file | 19:10 |
|
elricsfate
| I see the issue now tang^ | 19:10 |
|
| I'm pushing the remote branch | 19:11 |
|
| That's expecting that I won't do that | 19:11 |
|
| Not sure how you'd handle that if you're also pushing the branch up to remote | 19:11 |
|
| It only pushes up to remote when it's time to push into master branch | 19:11 |
| → Narrat joined | 19:12 |
| ← wildermind left | 19:13 |
| ← rnsanchez left | 19:14 |
| ← Inline left | 19:14 |
| → raffo joined | 19:15 |
| → synx joined | 19:17 |
|
synx
| Is there a way to get the commit at HEAD for a given remote repo without actually cloning the whole repo? | 19:18 |
|
pandem
| do you use github or something similar | 19:19 |
| → Inline joined | 19:19 |
| ← clime left | 19:19 |
|
pandem
| what do you mean by getting the commit? | 19:19 |
|
synx
| I want the hash. | 19:19 |
|
| No, just some arbitrary remote, not necessarily github | 19:19 |
|
elricsfate
| Is it ever really suggested that multiple developers are working on the same branch or is that generally bad juju? | 19:19 |
|
| (For example a feature or bug branch) | 19:20 |
|
Vonor
| osse, thanks. that is exactly what i was looking for | 19:20 |
|
pandem
| well, if you cant get it from the remote, then maybe shallow clone? | 19:20 |
| → satifant joined | 19:21 |
| → watabou_ joined | 19:21 |
|
synx
| oh, yea, shallow clone might work -- ill give that shot, thanks | 19:22 |
| ← rsrx left | 19:22 |
| → leprechau joined | 19:26 |
| ← g00s left | 19:28 |
| ← planetcall|work left | 19:28 |
| ← watabou_ left | 19:32 |
| → clime joined | 19:33 |
| ← czart left | 19:35 |
| ← emsjessec left | 19:35 |
|
nedbat
| elricsfate: we sometimes have devs working together on a branch. | 19:40 |
|
| elricsfate: you have to be careful about things like force-pushing though. | 19:40 |
| ← leb left | 19:41 |
| ← sgnls left | 19:41 |
| ← fphilipe left | 19:41 |
| → frikinz joined | 19:43 |
| → vnr joined | 19:43 |
| ← savolla left | 19:43 |
| → sgnls joined | 19:43 |
| → savolla joined | 19:43 |
| → kgrandly joined | 19:46 |
| torontoyes → correct | 19:46 |
| ← savolla left | 19:47 |
| ← wyre_ left | 19:47 |
| → courrier joined | 19:53 |
| → g00s joined | 19:53 |
| ← gloomy left | 19:54 |
| → rnsanchez joined | 19:55 |
| ← OtakuSenpai left | 19:55 |
| ← kgrandly left | 19:55 |
| ← gxt left | 19:56 |
| → kgrandly joined | 19:58 |
| → jamiejackson joined | 19:59 |
| ← strk left | 19:59 |
| → freeman42y joined | 20:00 |
| ← freeman42x left | 20:00 |
| varesa_ → varesa | 20:01 |
| → n3wborn joined | 20:01 |
| → nikivi joined | 20:01 |
|
elricsfate
| nedbat: Yep, the only way I could think of handling that would just be a force push | 20:01 |
|
| Which would definitely require some care | 20:01 |
|
nedbat
| elricsfate: sorry, handling what? | 20:02 |
| → gloomy joined | 20:04 |
| ← Repox left | 20:07 |
| → fphilipe joined | 20:08 |
| ← boombatower left | 20:11 |
| → Mr__Anderson joined | 20:11 |
| ← fphilipe left | 20:14 |
| → guest3456 joined | 20:14 |
|
guest3456
| is it possible to delete multiple branches with a wildcard char | 20:15 |
|
| like | 20:15 |
|
| git branch -D release-v2* | 20:15 |
|
| * or . neither worked | 20:15 |
| ← theoceaniscool left | 20:16 |
|
elricsfate
| nedbat: Using that particular model and collaborating on a branch | 20:17 |
| ← fattredd left | 20:18 |
|
j416
| guest3456: doubt | 20:19 |
| → theoceaniscool joined | 20:19 |
| ← leprechau left | 20:20 |
|
canton7
| guest3456, you can use git for-each-ref, and pipe that into git branch -d | 20:20 |
| → Enphuego joined | 20:23 |
|
guest3456
| too advanced for me | 20:24 |
|
j416
| guest3456: then copypaste the branchnames | 20:25 |
| → leprechau joined | 20:25 |
| → gxt joined | 20:26 |
|
j416
| or.. just delete the one by one | 20:26 |
|
| them* | 20:26 |
|
| guest3456: learning how pipes work isn't rocket science though; you should be able to learn it through a quick google. | 20:27 |
|
| guest3456: you'll probably need xargs as well so look that up too. | 20:27 |
| ← yyy left | 20:27 |
| ← oatmealraisin left | 20:29 |
| → strk joined | 20:32 |
|
strk
| are notes not meant to be pushed to a shared repo ? | 20:32 |
|
| or why does `git push` not push them ? | 20:32 |
|
_ikke_
| strk: You need to be explicit that you want to push them by adding a refspec that pushes the notes ref | 20:33 |
| ← fahadash left | 20:34 |
|
strk
| fetch = +refs/notes/commits/*:refs/remotes/origin/notes/commits/* | 20:35 |
|
| like the above ? | 20:35 |
|
| but there's already: | 20:36 |
|
| fetch = +refs/heads/*:refs/remotes/origin/* | 20:36 |
|
| so would that conflict if an head ends up being called "notes" ? | 20:36 |
| → fphilipe joined | 20:36 |
|
strk
| sorry if I'm being lame | 20:36 |
| ← theoceaniscool left | 20:36 |
| ← Ignacy left | 20:37 |
|
_ikke_
| strk: all 'normal' branches are always prefixed with refs/heads | 20:38 |
|
| so refs/notes will never conflict with normal branches | 20:38 |
|
| ah | 20:39 |
|
| Yes, I would not create them as local tracking branches, that is bound to create issues | 20:39 |
|
strk
| sorry, I don't really undestand all these terms :( | 20:41 |
|
| do the fetch line create local tracking branches ? | 20:42 |
| ← shabius left | 20:42 |
|
_ikke_
| refs/remotes/* is the namespace for remote tracking branches | 20:42 |
| → leb joined | 20:44 |
|
strk
| alright, I refrained from adding the fetch line | 20:44 |
| → blackandblue joined | 20:44 |
|
strk
| and just did a manual push of refs/notes/* | 20:44 |
|
| doing so, resulted in pushing unexpected refs I found under there | 20:45 |
|
| refs/notes/osgeo/devtools/discuss | 20:45 |
|
| refs/notes/osgeo/devtools/reviews | 20:45 |
|
| do those names ring any bell ? | 20:45 |
|
| could it be some git-appraise thing ? | 20:45 |
|
_ikke_
| no | 20:45 |
|
| might be | 20:45 |
| → greatgatsby joined | 20:45 |
|
strk
| git log shows me devtools/discuss contains 2 commits, both reported to be added via 'git notes append' | 20:46 |
|
| (reported by commit log) | 20:46 |
| → jstein_ joined | 20:47 |
|
strk
| seems to be git-appraise though, as if I show those commits, they look like comments on changed lines | 20:47 |
| jstein_ → jstein | 20:47 |
| → wootehfoot joined | 20:48 |
| ← mattcen left | 20:48 |
| → Newami joined | 20:49 |
| ← wootehfoot left | 20:49 |
| → mattcen joined | 20:50 |
| ← sgnls left | 20:53 |
| → gadget joined | 20:55 |
| → smitop joined | 20:57 |
| ← sozuba left | 20:59 |
| ← dege left | 21:00 |
| → dege joined | 21:01 |
| ← nikivi left | 21:02 |
| → shabius joined | 21:03 |
|
strk
| why do people not like git notes ? | 21:04 |
| ← satifant left | 21:04 |
| ← correct left | 21:06 |
|
_ikke_
| Not sure if that's the case, it's probably more that not many people have a usecase for them | 21:06 |
| → oatmealraisin joined | 21:07 |
| ← seaef-tnw left | 21:08 |
| ← azwieg103 left | 21:09 |
| → nikivi joined | 21:09 |
| ← scientes left | 21:12 |
| → scientes joined | 21:12 |
| ← scientes left | 21:13 |
| ← r1ch left | 21:13 |
| ← gadget left | 21:13 |
|
nedbat
| strk: do you like them? | 21:14 |
| ← fphilipe left | 21:15 |
| ← mattcen left | 21:16 |
| ← bolovanos left | 21:17 |
| → mattcen joined | 21:19 |
| → fphilipe joined | 21:19 |
| → satifant joined | 21:19 |
|
strk
| I like them, so far, but didn't use them much yet | 21:21 |
|
| I did like the idea of adding a note to an object | 21:21 |
|
| but didn't try adding _more_ notes to it | 21:21 |
|
| I've read somewhere you can only have one per object ? | 21:22 |
| ← sbeyer left | 21:22 |
| → m0viefreak joined | 21:24 |
| ← howell left | 21:25 |
| ← jubal left | 21:26 |
| ← R2robot left | 21:32 |
|
circuitbone
| 1 per hash? | 21:34 |
| → bashfulshell joined | 21:35 |
| ← Mr__Anderson left | 21:36 |
| ← Cabanossi left | 21:36 |
| ← kgrandly left | 21:37 |
| → kgrandly joined | 21:37 |
| ← jamiejackson left | 21:38 |
|
Timvde
| What's the use case for git notes? | 21:38 |
|
| Additions to a commit message for a published commit? | 21:38 |
|
_ikke_
| Yes, any kind of note | 21:39 |
|
strk
| yes, that's my understanding | 21:39 |
|
| like: "hey, my commit log was partial, here's an addendum" | 21:39 |
|
| but "addendum" implies you can add them, a single note is indeed weird | 21:39 |
| ← gloomy left | 21:44 |
| ← pllong left | 21:46 |
| → CarlFK joined | 21:47 |
| ← greggerz left | 21:48 |
| → Cabanossi joined | 21:48 |
| ← leeN left | 21:53 |
|
CarlFK
| "error: you need to resolve your current index first" The changes in that branch have been accepted upstream, so I have 0 interest in it | 21:55 |
|
| how do I resolve/stash/throw out whatever | 21:55 |
| ← blackandblue left | 21:56 |
| → CryptoDavid joined | 21:57 |
| → blackandblue joined | 21:57 |
| → Fernando-Basso joined | 21:58 |
| ← vnr left | 22:01 |
| → moldybits joined | 22:02 |
| ← fphilipe left | 22:03 |
| → boombatower joined | 22:05 |
| → fphilipe joined | 22:09 |
| ← dodobrain left | 22:10 |
| → fphilipe_ joined | 22:14 |
| ← fphilipe left | 22:15 |
| → justan0theruser joined | 22:18 |
| ← moldybits left | 22:19 |
| ← justanotheruser left | 22:20 |
| ← dege left | 22:20 |
|
vishal
| CarlFK: what command is producing that error? | 22:21 |
| ← linux_dr left | 22:21 |
| → jguddas-tr joined | 22:21 |
| ← jstein left | 22:22 |
|
CarlFK
| vishal: git checkout master | 22:22 |
| ← Narrat left | 22:22 |
|
vishal
| and do you have uncommitted changes either in index or the working tree? | 22:23 |
|
CarlFK
| but I just now gave up and added/commited | 22:23 |
|
vishal
| if you just want to throw away uncommitted changes you can go git reset --hard HEAD | 22:23 |
| ← arecaceae left | 22:23 |
| ← fphilipe_ left | 22:23 |
|
vishal
| and they will be irrecoverably gone | 22:24 |
|
CarlFK
| that s what I want - thanks | 22:24 |
| → arecaceae joined | 22:24 |
| ← jguddas-tr left | 22:26 |
| ← g00s left | 22:26 |
| → Atlenohen joined | 22:26 |
| ← oatmealraisin left | 22:27 |
| → ygivenx joined | 22:32 |
| ← Case_Of left | 22:34 |
| justan0theruser → justanotheruser | 22:35 |
|
CarlFK
| grumble. git pull origin master -> error: Pull is not possible because you have unmerged files. | 22:35 |
|
rafasc
| CarlFK: after a reset --hard? | 22:36 |
| → Case_Of joined | 22:36 |
| → moldybits joined | 22:37 |
|
CarlFK
| rafasc: yes http://paste.ubuntu.com/p/qPPX5zn8tc/ | 22:37 |
| ← shawn_dones left | 22:37 |
|
rafasc
| !eek | 22:37 |
|
gitinfo
| [!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 | 22:37 |
|
CarlFK
| "picking one side verbatim is not always the right choice! " but in this case it is :p | 22:39 |
| ← plexigras left | 22:39 |
|
vishal
| CarlFK: do you have local commits that you want to keep? or do you just want to sync it up to be exactly the same as origin/master ? | 22:39 |
|
CarlFK
| just sync | 22:39 |
|
rafasc
| you can try passing -Xours or -Xtheirs | 22:41 |
|
CarlFK
| wut? | 22:41 |
|
rafasc
| to tell git to resolve conflicts using our side, or their side. | 22:42 |
|
vishal
| I don't think any resolution is needed if he just wants to throw away his changes | 22:42 |
|
| just do git fetch origin; git reset --hard origin/master | 22:43 |
|
| also beware of !pull4 | 22:43 |
|
gitinfo
| [!fetchfour] Before 1.8.4, 'git fetch/pull' with a remote AND branch argument tended to be confusing because they didn't update the remote-tracking branch (the thing shown by 'git branch -r'). If you're stuck with an old version, it's usually better to pass no arguments, or at least only a remote. Workaround example to fetch only the 'foo' branch: git fetch origin refs/heads/foo:refs/remotes/origin/foo | 22:43 |
|
rafasc
| true, but if there are changes committed, usually there's a reason for it, and discarding them with reset --hard may not be intended. | 22:43 |
|
vishal
| true - that's why I asked that to make sure. always good to make a backup in any case :) | 22:44 |
|
rafasc
| it's unclear what "just sync" means. | 22:44 |
| ← n3wborn left | 22:45 |
|
CarlFK
| rm -rf; delete the repo; forkl clone would be acceptable | 22:45 |
|
| but looks like that fetch reset did the trick | 22:45 |
| → libertyprime joined | 22:45 |
|
rafasc
| then reset --hard as vishal recommended. | 22:45 |
|
vishal
| !xkcd | 22:46 |
|
| aww | 22:46 |
|
| https://xkcd.com/1597/ should totally be a trigger :) | 22:46 |
| ← SkarmoutsosV left | 22:47 |
|
rafasc
| vishal: I'll put you in my git.txt ;) | 22:48 |
|
Lordveda
| Please what does this command mean: git rebase -i HEAD^^ | 22:48 |
|
| ? | 22:49 |
|
rafasc
| basically means recommit the last two commits. | 22:49 |
|
vishal
| Lordveda: what are you trying to do? it is an interactive rebase | 22:49 |
|
Lordveda
| I am asking about the HEAD^^ part in particular | 22:49 |
|
rafasc
| man gitrevisions | 22:49 |
|
gitinfo
| the gitrevisions manpage is available at https://gitirc.eu/gitrevisions.html | 22:49 |
|
vishal
| ah parent of parent of HEAD, also equivalent to HEAD~2 | 22:49 |
|
Lordveda
| ok rafasc | 22:49 |
|
vishal
| rafasc: hah, we can be git.txt buddies | 22:50 |
|
rafasc
| ^ is a parent selector. HEAD^1 means first parent of HEAD. | 22:50 |
|
| if the number is missing, it defaults to 1. | 22:50 |
|
| so HEAD^^ is equivalent of (HEAD^1)^1 | 22:51 |
| ← leb left | 22:51 |
|
rafasc
| (parenthesis just to demonstrate the idea better.) | 22:51 |
|
Lordveda
| does HEAD^^ == HEAD^2? | 22:52 |
|
| CarlFK crys. I just want to add a few chars and send off a MR.. http://paste.debian.net/1082725/ | 22:52 |
|
vishal
| nope | 22:52 |
|
Lordveda
| vishal: why not? | 22:52 |
|
vishal
| Lordveda: HEAD^2 is second parent of head. HEAD^^ or HEAD~2 means _grand_parent of HEAD | 22:53 |
|
rafasc
| because ^ is a parent selector. ^2 would be the second parent. (only relevant on merge commits) | 22:53 |
|
vishal
| HEAD^2 only applies when talking about a merge commit | 22:53 |
| ← Xiti left | 22:54 |
|
Lordveda
| I solved the problem 15 on the website I provided the url earlier today by a different way | 22:54 |
|
rafasc
| the 14 can be solved without reset as well. ;) | 22:55 |
|
Lordveda
| The problem told about having 2 consecutive commits for a single file | 22:55 |
|
vishal
| CarlFK: you must have changes to the carlfk-sals remote that you resetted | 22:55 |
|
CarlFK
| ah right. | 22:56 |
|
rafasc
| like I mentioned: git rm --cached file 2; git commit --amend; git add file 2; git commit; | 22:56 |
| ← mikecmpbll left | 22:56 |
|
vishal
| if you don't care about rewriting the history on that remote/branch, you can use push --force | 22:56 |
| → fphilipe_ joined | 22:56 |
|
Lordveda
| rafasc: I am not very affluent with git, I am practicing | 22:56 |
|
rafasc
| Lordveda: you're already on the right path. | 22:57 |
|
| Lordveda: most of the time here are multiple ways to accomplish the same thing. | 22:57 |
|
Lordveda
| problem 15 on the web site which requested reverting two consecutive to one commit | 22:58 |
|
| I solved it by reverting the most recent commit and amended the change to its parent | 22:59 |
|
rafasc
| Lordveda: wasn't this you: https://gitexercises.fracz.com/committer/49185e38fa67a83a36e0e5d65944605e2d32e771 | 22:59 |
| → Xiti joined | 22:59 |
|
Lordveda
| on the site they used rebase --interactive | 22:59 |
|
| rafasc: Yes this is me | 23:00 |
|
| check problem 15 solution | 23:00 |
|
| they used rebase -i HEAD^^ | 23:01 |
| → thiago_ joined | 23:01 |
|
Lordveda
| I did reset HEAD~1 then did git add file.txt and then git commit --amend | 23:01 |
|
| I am just wondering why my solution yielded the same result as the author of the exercise, can anyone explain plz? | 23:02 |
|
vishal
| Lordveda: rebase -i means "go back in time X commits, and redo them, while also potentially making some changes". You also did the same thing, except going back in time manually, using reset, and then making changes using your commit --amend | 23:04 |
|
| rebase -i is the generalized way to solve that sort of a problem | 23:05 |
| ← dartmouthed left | 23:05 |
|
vishal
| rebase -i will also remember and replay the commits that come afterwards - in your reset case, you'd have to add and commit those files again by hand | 23:06 |
|
Lordveda
| So my solution was a beginner's solution :) | 23:06 |
|
vishal
| if you were going back in time by only 1-2 commits, reset is acceptable. But try doing more than that and reset quickly becomes unmanageable | 23:06 |
|
| sort of, yeah | 23:07 |
|
| accomplished the same goal, but may not scale in more real-world scenarios | 23:07 |
|
Lordveda
| Is the -i option equivalent to the --interactive option? | 23:08 |
| ← cdown left | 23:08 |
|
vishal
| yes -i is just the short version | 23:08 |
|
| (of the option that is - they are exactly the same) | 23:09 |
| → fstd_ joined | 23:10 |
| → weird_error joined | 23:11 |
|
rafasc
| Lordveda: git <cmd> --help; should open manual pages where all options are described. | 23:11 |
|
| with a bit of regex, you can find options very quickly. | 23:13 |
|
| example: /^\s+-i | 23:13 |
| ← fstd left | 23:14 |
| fstd_ → fstd | 23:14 |
| → RoriconKnight joined | 23:14 |
| ← weird_error left | 23:17 |
| → weird_error joined | 23:21 |
| ← weird_error left | 23:21 |
| → hofmann3900 joined | 23:22 |
| ← mat001 left | 23:24 |
| ← Phylock left | 23:25 |
| → mat001 joined | 23:26 |
| ← mat001 left | 23:26 |
| ← courrier left | 23:28 |
| ← tang^ left | 23:29 |
| → ferdna joined | 23:29 |
| ← fphilipe_ left | 23:31 |
| ← justanotheruser left | 23:32 |
| ← freeman42y left | 23:34 |
|
Lordveda
| regexes are like immense puzzles to me rafasc | 23:35 |
|
rafasc
| in less: / starts a search; ^ means start of line; \s+ means one or more spaces. | 23:36 |
| ← khisanth_ left | 23:36 |
| ← duderonomy left | 23:36 |
|
rafasc
| if you did /-i or /--interactive you would get there as well. | 23:37 |
|
| but you would need to press p or n (previous/next) a bunch of times to get to the relevant part. | 23:37 |
| → mat001 joined | 23:37 |
| → fphilipe_ joined | 23:37 |
| ← mat001 left | 23:37 |
| → jubal joined | 23:38 |
|
rafasc
| learning how to browse the documentation effectively is a good portion of becoming good at git. | 23:38 |
|
Lordveda
| actually I do searches into man pages very frequently | 23:38 |
| → courrier joined | 23:38 |
| → oatmealraisin joined | 23:39 |
|
rafasc
| ctrl+f on a browser also works. https://git-scm.com/docs/git-rebase | 23:39 |
|
Lordveda
| in man pages? | 23:40 |
|
rafasc
| Lordveda: git help rebase -w; | 23:40 |
|
| (depends if your distro bundles html documentation) | 23:40 |
|
Lordveda
| I view the help in terminal rafasc | 23:41 |
|
| plus I didn't find the docs available | 23:42 |
|
rafasc
| then the regex methods I mentioned should work if your pager is less. | 23:42 |
| → mat001 joined | 23:42 |
| ← fphilipe_ left | 23:42 |
| → watabou_ joined | 23:44 |
|
rafasc
| also: man -Hgoogle-chrome git rebase; | 23:44 |
|
| the result of git help --web is prettied though. | 23:44 |
|
| But I never use that, I just browse the man pages themselves. | 23:45 |
|
Lordveda
| rafasc: D'accord | 23:45 |
| → edwardly joined | 23:46 |
| → khisanth_ joined | 23:50 |
| ← greatgatsby left | 23:52 |
| ← bluezone left | 23:52 |
| ← alyptik left | 23:53 |
| ← magic_ninja left | 23:56 |
| ← CodeSlingerPaul left | 23:59 |
| → Bobdude joined | 23:59 |
| ← eckon left | 23:59 |
| ← Newami left | 23:59 |