| 2019-01-26 |
| ← dege left | 00:00 |
| ← akushner left | 00:00 |
| → Mattiaslndstrm joined | 00:02 |
| ← finalbeta left | 00:03 |
| ← Revan- left | 00:07 |
| → dpyro joined | 00:07 |
| → Revan- joined | 00:09 |
| → elkalamar joined | 00:09 |
| ← elkalamar left | 00:09 |
| → blood joined | 00:13 |
|
blood
| I'm trying to apply a git patch and I keep having issues with `git apply` messing with line endings. I have set core.autocrlf to false yet its still changing LF -> CRLF when i use whitespace=fix | 00:14 |
|
| The patch files only contains LF endings but I'm applying the patch on a windows workstation | 00:14 |
|
| if i pass --ignore-space-change and --whitespace=fix it applies but with warnings | 00:15 |
|
| Any idea on how I can fix the patch or have it apply cleanly without any issues? | 00:15 |
| → iam730 joined | 00:15 |
| → akushner joined | 00:15 |
| ← iam730 left | 00:16 |
| ← folkrav left | 00:16 |
| → kyan joined | 00:17 |
| → andyhuzhill joined | 00:19 |
| ← PettanShoutaKun left | 00:20 |
| ← basteh left | 00:21 |
|
j416
| blood: what do you have and what do you want? | 00:22 |
| ← kyan left | 00:22 |
|
blood
| I don't want the line endings to be messed with | 00:23 |
| → iam730 joined | 00:23 |
|
blood
| and I want to fix all whitespace warnings | 00:23 |
|
| I just want to apply the patch cleanly with 0 warnings/errors | 00:24 |
|
j416
| what did you set core.whitespace to? | 00:24 |
| ← meLon left | 00:25 |
|
blood
| I didn't touch it | 00:25 |
|
| so whatever default is | 00:25 |
|
| if I pass --whitespace=fix, it ends up changing some line endings to CRLF | 00:26 |
|
j416
| blood: what does "git config --get core.whitespace" say? | 00:29 |
| ← iam730 left | 00:29 |
|
blood
| nothing. I checked my .gitconfig and its not in the file | 00:30 |
|
j416
| did you run that command in your repo? | 00:31 |
|
blood
| oh where i generated the patch? | 00:31 |
|
j416
| the repo where you're trying to apply it | 00:31 |
|
blood
| oh im not applying it to a repo, im just applying it to a folder | 00:32 |
|
j416
| outside of git? | 00:32 |
|
| I mean, that's not in a git repo? | 00:32 |
|
blood
| the folder isnt a git repo but im applying it with git bash | 00:32 |
| → sauercrowd joined | 00:32 |
| → Seiya415 joined | 00:33 |
|
j416
| I see. | 00:33 |
| ← \void left | 00:34 |
| → nurdie joined | 00:35 |
|
j416
| with core.whitespace unset on *nix, --whitespace=fix to git apply should convert crlf to lf. I wonder if it's the other way round on windows. | 00:35 |
| → iam730 joined | 00:36 |
| ← iam730 left | 00:36 |
|
j416
| at least that's what it does here (macos) | 00:37 |
| ← dpyro left | 00:38 |
| → dpyro joined | 00:39 |
|
blood
| yea it converts LF to CRLF | 00:39 |
|
| however I'm not even sure why it complains about these line endings during git apply | 00:39 |
| ← nurdie left | 00:40 |
|
blood
| ah i think i see the pattern... | 00:40 |
|
| whenever the patch applies to a file that has LF endings, it will complain about the inserts since they are in LF not CRLF | 00:41 |
|
| however if the file being patched is in CRLF format, it applies fine | 00:41 |
|
j416
| are you saying it tries to match the target file? | 00:41 |
| ← orbyt_ left | 00:42 |
|
blood
| if the target file has LF endings, it complains because it wants to apply the new lines with CRLF endings | 00:42 |
|
| however if the target file has CRLF, it doesn't complain | 00:42 |
|
| basically the vanilla folder contains a mixture of files that either contain all LF or all CRLF endings | 00:43 |
| → thiago joined | 00:43 |
|
blood
| let me try ignoring whitespace too | 00:43 |
|
| so if i pass --ignore-whitespace, it still causes line endings to be CRLF in files that are all LF | 00:45 |
|
j416
| experimented a bit, didn't get much wiser. | 00:45 |
|
| why do you use mixed line endings anyway? | 00:45 |
| ← Seiya415 left | 00:46 |
|
blood
| I don't, oracle delivers the files like this. They have developers on both win/nix | 00:46 |
|
j416
| ... | 00:46 |
|
| can't you convert them all to something sane? | 00:46 |
|
blood
| sure but the same issue would happen | 00:47 |
|
| if i convert everything to CRLF, wont *nix users have the same issue? | 00:47 |
| ← Makaveli7 left | 00:48 |
|
blood
| I'll just ignore everything and call it a day | 00:49 |
|
| thanks for the help! | 00:50 |
| → nurdie joined | 00:56 |
| ← manuelschneid3r left | 00:56 |
| ← Regon left | 01:00 |
| ← nurdie left | 01:00 |
| ← z8z left | 01:00 |
| → iam730 joined | 01:01 |
| ← iam730 left | 01:01 |
| ← jubal_ left | 01:04 |
| → xrexeon joined | 01:06 |
| ← xrexeon left | 01:06 |
| → xrexeon joined | 01:07 |
| → hofmann3900 joined | 01:07 |
| ← sauercrowd left | 01:07 |
| ← xrexeon left | 01:09 |
| → xrexeon joined | 01:10 |
| → iam730 joined | 01:10 |
| ← iam730 left | 01:10 |
| → sauercrowd joined | 01:12 |
| → jubal joined | 01:14 |
| → iam730 joined | 01:15 |
| → horribleprogram joined | 01:15 |
| ← akushner left | 01:16 |
| → qgTG joined | 01:18 |
| ← iam730 left | 01:18 |
| ← Cabanossi left | 01:20 |
| → Cabanossi joined | 01:20 |
| ← Sasazuka left | 01:21 |
| → fran__ joined | 01:23 |
| ← blood left | 01:24 |
| ← jubal left | 01:26 |
| ← fran__ left | 01:27 |
| → jubal joined | 01:28 |
| ← mat001 left | 01:29 |
| ← g2anj left | 01:31 |
| → orbyt_ joined | 01:34 |
| ← sauercrowd left | 01:35 |
| → g2anj joined | 01:36 |
| ← durham left | 01:38 |
| ← jubal left | 01:38 |
| → fran__ joined | 01:39 |
| ← cdown left | 01:40 |
| ← fran__ left | 01:43 |
| → Goplat joined | 01:45 |
| ← xrexeon left | 01:47 |
| ← Essadon left | 01:49 |
| → jubal joined | 01:59 |
| → rick8024 joined | 02:00 |
| ← KnoP left | 02:01 |
| rick8024 → KnoP | 02:01 |
| ← AfroThundr|main left | 02:03 |
| ← Spacew00t left | 02:08 |
| → cdown joined | 02:11 |
| ← revoltingPeasant left | 02:12 |
| ← downer06 left | 02:14 |
| → downer06 joined | 02:15 |
| ← horribleprogram left | 02:21 |
| → finalbeta joined | 02:23 |
| ← causasui left | 02:25 |
| ← zulutango left | 02:26 |
| ← jubal left | 02:27 |
| → jubal_ joined | 02:27 |
| → n3wborn joined | 02:32 |
| ← Lunatrius left | 02:33 |
| → Lunatrius joined | 02:33 |
| → zulutango joined | 02:41 |
| ← mikecmpbll left | 02:42 |
| ← freeman42x left | 02:47 |
| ← zulutango left | 02:47 |
| → pi- joined | 02:50 |
|
pi-
| I merged in a PR to master from the GitHub web page. Then straight away on my local machine I `git checkout master; git pull` and it makes a "merge commit" taking me to a vim(?) page. | 02:52 |
|
| I don't think I've seen that vim page before. | 02:52 |
|
| Shouldn't it just update master silently? | 02:53 |
| → z8z joined | 02:53 |
| → zulutango joined | 02:53 |
| → fran__ joined | 02:54 |
| ← z8z left | 02:54 |
| ← duderonomy left | 02:54 |
| → z8z joined | 02:54 |
|
kadoban
| pi-: Depends. Try aborting what I assume is a merge and doing 'git fetch' and then 'gitk --all' , see what it looks like? | 02:54 |
|
pi-
| https://paste.pound-python.org/show/1yv1MJa9RRbPROMXZlgu/ | 02:55 |
|
kadoban
| If you expect a fast-forward, 'git pull --ff-only' is useful | 02:55 |
|
pi-
| ^ that's my git log | 02:55 |
|
| Maybe I should re-clone the repo? | 02:55 |
| → rkazak joined | 02:55 |
| ← z8z left | 02:55 |
|
kadoban
| Recloning is possible I guess. But usually that would only happen if you actually have some local commits (possibly containing work you care about but forgot?) that that would discard. | 02:56 |
|
| (It's also kind of a bad way to learn, though if you're in a hurry, screw it, do what ya gotta do) | 02:56 |
| → z8z joined | 02:56 |
|
pi-
| Actually I would like to figure out what's going on here. Usually I am in a hurry. But if I add up the hours of lost productivity over the last year from not using tools right .. meh not pretty. | 02:57 |
|
| But if I `git diff prev_hash curr_hash` I get nothing! | 02:57 |
|
kadoban
| Looking at the actual shape of history is probably more useful than anything in these kinds of cases | 02:57 |
|
| gitk --all or !lol | 02:57 |
|
gitinfo
| A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all | 02:57 |
|
Hello71
| >vim page | 02:57 |
|
| damn kids | 02:58 |
|
kadoban
| pi-: By the way, if you don't use vim, you should switch to a different editor. Either set the $EDITOR environment variable, or configure git to use whatever else you like. | 02:58 |
| ← veegee left | 02:58 |
| ← fran__ left | 02:59 |
| ← MACscr left | 02:59 |
| ← zulutango left | 02:59 |
|
pi-
| https://paste.pound-python.org/show/tTyyx88nL974aLHg7TTp/ | 03:00 |
| ← F0rTex left | 03:00 |
|
pi-
| I would like to set it to Sublime Text | 03:00 |
|
| I'll try that now. | 03:01 |
| → F0rTex joined | 03:01 |
|
kadoban
| pi-: That's odd. You didn't do 'git pull --no-ff' or have some weird config set, right? You were on 4dc6253 on local master when you merged? | 03:02 |
|
| Oh wait, maybe I can't read. Let me look again | 03:02 |
|
| pi-: So it looks like on your local master you had ~3 commits that origin/master didn't have. 97ded34 bd75e37 and 85e4b6d. Is that possible? | 03:03 |
|
| So if you have extra commits, and origin/master has extra commits, then yeah a merge is required if you just tell it to pull. | 03:03 |
|
| What did you want to happen instead? (let me know if I misinterpreted, I don't look at the output of that command much to be honest, I usually use gitk) | 03:04 |
| ← thomasross left | 03:05 |
| → thomasross joined | 03:05 |
| ← thomasross left | 03:07 |
| → thomasross_ joined | 03:07 |
| thomasross_ → thomasross | 03:07 |
|
pi-
| So yesterday when I was working I started on clean master (hopefully I started the day with `git pull`). I made a bunch of code changes. I then separated them out into those 3 commits. I then did `git checkout -b foobranch` & went to the website & created + squash-merged-in the PR. | 03:08 |
|
| Then I `git checkout master; git pull` on my local machine. | 03:08 |
|
kadoban
| pi-: So when you did 'git checkout -b foobranch' I think what happened is, okay you made a branch with those 3 commits on it, but master still has them too | 03:09 |
|
| So master and foobranch were probably equal at that point | 03:09 |
|
pi-
| Maybe I'm only getting this extra empty commit because I did things in the wrong order? Maybe I should have started ... | 03:09 |
|
| yeah | 03:09 |
|
kadoban
| So usually you'd git checkout -b foobranch *then* make the commits, then etc. If you do it in the wrong order, you can do that but you should probably make 'master' go backwards to not include them | 03:10 |
| ← ketas left | 03:10 |
|
pi-
| yup, usually I do that. Yesterday I forgot. | 03:10 |
|
| How can I tidy it up? | 03:10 |
|
| git reset (2 commits); git pull ? | 03:10 |
| → akushner joined | 03:11 |
| ← mowcat left | 03:13 |
| ← thomasross left | 03:14 |
| → thomasross joined | 03:15 |
| → iam730 joined | 03:17 |
| ← jelmer left | 03:19 |
| → jelmer joined | 03:19 |
| → Avizini joined | 03:21 |
| ← rkazak left | 03:21 |
| → dreiss joined | 03:21 |
|
kadoban
| pi-: Yeah, that should work. Or just 'git checkout master && git reset --hard origin/master' I think does what you want IIRC (be careful, reset --hard is quite powerful, and if I misunderstood it could be annoying to fix) | 03:21 |
|
pi-
| `git reset --hard 4dc6253; git pull` fixed it. And I learned something. Thanks kadoban | 03:21 |
| ← BenderRodriguez left | 03:21 |
|
pi-
| yupperrr I always make a hard copy of my project folder before I use things like `-f` and `--hard`. | 03:22 |
|
kadoban
| Cool, glad to help. | 03:23 |
| ← andyhuzhill left | 03:23 |
|
kadoban
| By the way, my recommendation for the future would be: always 'git fetch' and check !lol or gitk --all . 'git pull' is not a good default command, IMO. | 03:23 |
|
gitinfo
| A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all | 03:23 |
| → andyhuzhill joined | 03:24 |
|
pi-
| !lol | 03:26 |
|
gitinfo
| A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all | 03:26 |
|
pi-
| nice | 03:26 |
| → BenderRodriguez joined | 03:28 |
| ← blackmesa left | 03:31 |
| ← Avizini left | 03:32 |
| ← BenderRodriguez left | 03:33 |
| → Avizini joined | 03:34 |
| → veegee joined | 03:34 |
| → jubal joined | 03:34 |
| ← TikityTik left | 03:35 |
| ← n3wborn left | 03:36 |
| ← jubal_ left | 03:37 |
| → TikityTik joined | 03:37 |
| ← snowgoggles left | 03:37 |
| ← andyhuzhill left | 03:38 |
| → andyhuzhill joined | 03:39 |
| → snowgoggles joined | 03:40 |
| ← pi- left | 03:42 |
| lagothrix → Guest17640 | 03:43 |
| ← Guest17640 left | 03:43 |
| → lagothrix joined | 03:43 |
| → BenderRodriguez joined | 03:44 |
| ← Spr0cket left | 03:45 |
| ← atrigent left | 03:48 |
| ← dreiss left | 03:52 |
| → zulutango joined | 03:59 |
| ← yyy left | 03:59 |
| → mobile_c joined | 04:07 |
| → elsheepo joined | 04:13 |
| ← mobile_c left | 04:13 |
| → mobile_c joined | 04:13 |
| ← andyhuzhill left | 04:13 |
| → andyhuzhill joined | 04:14 |
| ← mobile_c left | 04:15 |
| → mobile_c_ joined | 04:15 |
| → metrixx joined | 04:16 |
| ← andyhuzhill left | 04:18 |
| → andyhuzhill joined | 04:19 |
| → Spr0cket joined | 04:19 |
| → dreiss joined | 04:22 |
| → troulouliou_div2 joined | 04:25 |
| ← mobile_c_ left | 04:27 |
| ← dreiss left | 04:27 |
| → mobile_c joined | 04:29 |
| ← z8z left | 04:31 |
| ← Spr0cket left | 04:31 |
| ← TikityTik left | 04:35 |
| → TikityTik joined | 04:37 |
| ← Mattiaslndstrm left | 04:41 |
| ← orbyt_ left | 04:44 |
| ← mobile_c left | 04:45 |
| → Cabanoss- joined | 04:45 |
| ← Cabanossi left | 04:46 |
| → jab416171 joined | 04:48 |
| → mat001 joined | 04:49 |
| ← m0viefreak left | 04:51 |
| ← dpyro left | 04:55 |
| ← austin987 left | 04:57 |
| ← millerti left | 05:00 |
| → dpyro joined | 05:01 |
| → pks_ joined | 05:02 |
| → Spr0cket joined | 05:03 |
| ← pks left | 05:04 |
| pks_ → pks | 05:04 |
| → ketas joined | 05:05 |
| → orbyt_ joined | 05:09 |
| → ozcanesen joined | 05:09 |
| → z8z joined | 05:16 |
| ← snowgoggles left | 05:17 |
| ← SpeakerToMeat left | 05:18 |
| ← elsheepo left | 05:19 |
| ← iam730 left | 05:24 |
| ← cdown left | 05:25 |
| → AfroThundr|main joined | 05:28 |
| metrixx → Guest41391 | 05:30 |
| → metrixx_ joined | 05:30 |
| ← Guest41391 left | 05:33 |
| ← ezio left | 05:35 |
| ← paraxial left | 05:36 |
| → paraxial joined | 05:36 |
| ← thinkpad left | 05:37 |
| → iam730 joined | 05:38 |
| ← iam730 left | 05:38 |
| → cdown joined | 05:39 |
| → thinkpad joined | 05:44 |
| ← topdownjimmy left | 05:53 |
| → topdownjimmy joined | 05:54 |
| → duderonomy joined | 05:55 |
| → cd joined | 05:59 |
| → iam730 joined | 06:00 |
| ← iam730 left | 06:02 |
| → iam730 joined | 06:02 |
| ← oojacoboo left | 06:02 |
| ← iam730 left | 06:04 |
| → oojacoboo joined | 06:04 |
| ← wEs left | 06:05 |
| → iam730 joined | 06:05 |
| → wesbrown84 joined | 06:09 |
| ← iam730 left | 06:10 |
| ← kadoban left | 06:11 |
| ← GreenJello left | 06:12 |
| wesbrown84 → wEs | 06:12 |
| → iam730 joined | 06:12 |
| ← andyhuzhill left | 06:13 |
| → andyhuzhill joined | 06:14 |
| ← thiago left | 06:17 |
| ← oojacoboo left | 06:20 |
| ← Cabanoss- left | 06:20 |
| → Cabanossi joined | 06:20 |
| ← irqq left | 06:24 |
| ← publio left | 06:26 |
| ← andyhuzhill left | 06:28 |
| → andyhuzhill joined | 06:29 |
| ← troulouliou_div2 left | 06:31 |
| ← wildlander left | 06:31 |
| → ezio joined | 06:35 |
| ← shentino left | 06:36 |
| → jonsmith1982 joined | 06:37 |
| → wildlander joined | 06:38 |
|
jonsmith1982
| Once ive sent a commit to repo the push changes to master, why when i try to pull to local branch does it say ... error: You have not concluded your merge (MERGE_HEAD exists). | 06:39 |
| ← duckonomy left | 06:42 |
| → sauvin joined | 06:43 |
|
jonsmith1982
| nm | 06:44 |
| → czart joined | 06:45 |
| → thiago joined | 06:50 |
| ← yqfvwal left | 06:50 |
| ← z8z left | 06:52 |
| ← KnoP left | 06:55 |
| → GreenJello joined | 06:56 |
| ← random_yanek left | 06:56 |
| → KnoP joined | 06:58 |
| → thunderbolt joined | 06:58 |
| ← ozcanesen left | 06:59 |
| ← raulp left | 07:00 |
| → raulp joined | 07:01 |
| → random_yanek joined | 07:03 |
| → duckonomy joined | 07:04 |
| ← thiago left | 07:05 |
| → ozcanesen joined | 07:07 |
| ← ozcanesen left | 07:09 |
| → libertyprime joined | 07:11 |
| ← plasticle left | 07:12 |
| ← duckonomy left | 07:13 |
| → duckonomy joined | 07:15 |
| ← errr left | 07:18 |
| → mobile_c joined | 07:21 |
| ← finalbeta left | 07:21 |
| → finalbeta joined | 07:22 |
| ← akushner left | 07:28 |
| → rsrx joined | 07:38 |
| → plasticle joined | 07:40 |
| ← jnewt left | 07:41 |
| → z8z joined | 07:45 |
| ← z8z left | 07:46 |
| → atrigent joined | 07:46 |
| → z8z joined | 07:46 |
| ← z8z left | 07:47 |
| → z8z joined | 07:47 |
| → errr joined | 07:55 |
| ← Goplat left | 07:59 |
| → oojacoboo joined | 08:03 |
| → apoos_maximus joined | 08:03 |
| ← apoos_maximus left | 08:04 |
| → apoos_maximus joined | 08:04 |
| → libin_v joined | 08:05 |
| ← libin_v left | 08:05 |
| ← oojacoboo left | 08:07 |
| ← z8z left | 08:10 |
| ← kezimo left | 08:11 |
| → kezimo joined | 08:11 |
| ← wgrant left | 08:13 |
| ← apoos_maximus left | 08:15 |
| → apoos_maximus joined | 08:16 |
| → irqq joined | 08:17 |
| ← cdown left | 08:19 |
| → wgrant joined | 08:20 |
| ← orbyt_ left | 08:22 |
| → sieve joined | 08:25 |
| → Cmaj6 joined | 08:26 |
| → hellux joined | 08:26 |
| ← hellux left | 08:28 |
| ← renich left | 08:28 |
| ← boshhead left | 08:29 |
| ← jonsmith1982 left | 08:30 |
| → boshhead joined | 08:30 |
| → renich joined | 08:30 |
| ← xcm left | 08:31 |
| → xcm joined | 08:32 |
| → cswl joined | 08:34 |
| → Silenced joined | 08:36 |
| ← mat001 left | 08:38 |
| → leeN joined | 08:46 |
| → manuelschneid3r joined | 08:48 |
| ← Avizini left | 08:49 |
| ← errr left | 08:49 |
| ← andyhuzhill left | 09:03 |
| → andyhuzhill joined | 09:04 |
| ← sieve left | 09:04 |
| ← apoos_maximus left | 09:07 |
| ← andyhuzhill left | 09:08 |
| → andyhuzhill joined | 09:09 |
| ← atrigent left | 09:17 |
| → shentino joined | 09:22 |
| → Fernando-Basso joined | 09:25 |
| ← shentino left | 09:25 |
| ← mobile_c left | 09:26 |
| → plexigras joined | 09:27 |
| → shentino joined | 09:29 |
| → nioncode joined | 09:29 |
| → i7c joined | 09:29 |
| ← andyhuzhill left | 09:33 |
| ← albel727 left | 09:39 |
| ← renich left | 09:39 |
| → estodiMania joined | 09:43 |
| ← estodiMania left | 09:45 |
| → blackntan joined | 09:50 |
| → mikecmpbll joined | 09:56 |
| → basiclaser joined | 09:57 |
| ← nowhere_man left | 10:11 |
| ← Cabanossi left | 10:12 |
| ← troyt left | 10:13 |
| → Cabanossi joined | 10:13 |
| → troyt joined | 10:13 |
| → sieve joined | 10:16 |
| ← catsup left | 10:17 |
| → catsup joined | 10:18 |
| → chaosruler joined | 10:18 |
| → yyy joined | 10:18 |
| ← catsup left | 10:18 |
| → catsup joined | 10:19 |
| ← TikityTik left | 10:21 |
| ← tango_ left | 10:42 |
| → elsheepo joined | 10:44 |
| → blackmesa joined | 10:46 |
| → tango_ joined | 10:46 |
| ← shentino left | 10:52 |
| → fiftysix joined | 11:03 |
|
fiftysix
| hi | 11:03 |
|
| i know enough about git to use it with one branch | 11:04 |
|
| but now i modified this guy's project on github and want to open a pull request | 11:04 |
|
| is it possible to say "make 0-3 commits back a new branch and then make 3-10 commits back another branch" so that i can open pull requests for these new branches? | 11:04 |
| → revoltingPeasant joined | 11:05 |
| → fstd_ joined | 11:07 |
| ← fstd left | 11:07 |
| fstd_ → fstd | 11:07 |
| ← netj left | 11:10 |
| ← revoltingPeasant left | 11:10 |
| ← blackmesa left | 11:10 |
| → netj joined | 11:10 |
| ← cswl left | 11:12 |
| ← flippo left | 11:14 |
| ← swalladge left | 11:20 |
| ← Cmaj6 left | 11:20 |
| ← dpyro left | 11:23 |
| → Makaveli7 joined | 11:24 |
| → finalbeta1 joined | 11:27 |
| ← finalbeta left | 11:30 |
| ← ali1234 left | 11:40 |
| → inkbottle joined | 11:43 |
| → Darcidride_ joined | 11:43 |
| → AtumT joined | 11:44 |
| → shentino joined | 11:46 |
| → sauercrowd joined | 11:48 |
| ← jngk left | 11:48 |
| → cswl joined | 11:48 |
| → jimmm joined | 11:49 |
| ← libertyprime left | 11:49 |
| → ali1234 joined | 11:51 |
| → randominternetus joined | 11:54 |
| → blackmesa joined | 11:54 |
| ← irqq left | 11:55 |
|
randominternetus
| Hi there, I need to do some modification on a project. Adding some features and editing some. It's all ok till here, I do a fork, do the changes and done. but how can I do that and benefit from the updates the original developers make to the project? | 11:55 |
|
| how should be the workflow here? | 11:55 |
|
fiftysix
| hmm forget it ... all my commits are shit. i'll delete and re-fork the github project and make all new commits that are sensibly cherry-picked. | 11:58 |
| ← chaosruler left | 12:02 |
| ← elsheepo left | 12:02 |
| → shentino_ joined | 12:10 |
| ← shentino left | 12:11 |
| → Avizini joined | 12:12 |
| → apoos_maximus joined | 12:13 |
| → lucasb joined | 12:15 |
| ← Darcidride_ left | 12:16 |
| ← dermoth left | 12:17 |
| ← apoos_maximus left | 12:19 |
| → apoos_maximus joined | 12:19 |
| → Essadon joined | 12:19 |
| → dermoth joined | 12:20 |
| ← shentino_ left | 12:22 |
| → Darcidride_ joined | 12:27 |
|
j416
| fiftysix: you don't need to re-clone for that | 12:27 |
| → wootehfoot joined | 12:27 |
|
j416
| fiftysix: it's about three commands to do what you say above. | 12:29 |
|
| randominternetus: work on a separate branch, rebase that atop upstream regularly | 12:31 |
| ← kent\n left | 12:31 |
|
j416
| randominternetus: keep the number of commits small; since rebase applies each commit onto a new base there's no guarantee that they'll still do what you expect -- always examine each commit after a rebase to see that they are still good | 12:32 |
| → xrexeon joined | 12:33 |
| ← xrexeon left | 12:33 |
| ← bn_work left | 12:34 |
| ← igemnace left | 12:34 |
|
fiftysix
| j416, i don't think what i say above suffices. the more i look at my commits, the more i find them really random. would there also be commands to undo all of my commits but keep my workspace the way it is? and then push that to github so that it also "forgets" about these commits? | 12:37 |
| → kent\n joined | 12:41 |
| ← troyt left | 12:41 |
|
j416
| ...yes. | 12:41 |
| ← blackmesa left | 12:42 |
| → nowhere_man joined | 12:43 |
| → troyt joined | 12:44 |
|
fiftysix
| j416, can you tell me what i should read up on? :) | 12:44 |
| ← basiclaser left | 12:47 |
| ← tomaw left | 12:49 |
| → SuperKaramba joined | 12:49 |
|
j416
| fiftysix: read up on the git object model if you aren't familiar with that (what are commits, how do they refer to each other to create a branch), then read up on 'git reset' and 'git push' | 12:49 |
|
| that should be enough to figure out what you need, I think | 12:49 |
|
nedbat
| fiftysix: are you saying you don't like the state of your code, or the state of your commits? | 12:49 |
| ← BenderRodriguez left | 12:50 |
|
j416
| !book | 12:50 |
|
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 | 12:50 |
|
fiftysix
| nedbat, the state of my code i'm happy with. but my commits are a mess. i want to delete all of them since point where i forked the project and re-do them so that each one of them contains makes sense. | 12:51 |
|
| the* | 12:51 |
|
j416
| but I would recommend that if you use git frequently, you read all of that book and sae yourself a lot of headache down the road. Give it a day or two. | 12:51 |
|
fiftysix
| an actual dead tree book on git would be a nice thing for the bedside table | 12:52 |
|
| but while i'm in the middle of something specific i'd be too antsy to read it | 12:52 |
|
| so reading up on reset and push now | 12:52 |
|
j416
| fiftysix: that book iis available on amazon, I think | 12:52 |
|
nedbat
| fiftysix: do you know the name of the commit that you forked from? | 12:52 |
|
j416
| fiftysix: start with the object model; it'll make things easier. | 12:53 |
|
fiftysix
| nedbat, that's easy to find out, right? since they all have hashes... | 12:53 |
|
| wow ... 35€ in germany o_O | 12:53 |
|
j416
| nedbat: I get the feeling that he actually wants to understand what happens and not get pre-baked commands..? | 12:53 |
| ← jimmm left | 12:53 |
|
fiftysix
| gonna put it in the shopping basket till birthday i guess | 12:53 |
|
nedbat
| j416: i'm not sure: "while i'm in the middle of something specific i'd be too antsy to read it" | 12:53 |
|
| j416: also, I can explain some concepts while providing commands :) | 12:54 |
|
fiftysix
| hmm ... it's for free if you have a kindle. my gf has a kindle. | 12:54 |
| → avizini_ joined | 12:55 |
| ← Avizini left | 12:57 |
|
j416
| nedbat: maybe. | 13:00 |
| → blackmesa joined | 13:01 |
|
fiftysix
| j416, pre-baked would be fine for now. but then once i did the task i also want to understand what i did because this kind of thing will come in handy again and again. | 13:01 |
|
j416
| nod | 13:01 |
|
| so you have one single branch with a few commits, and you want to remove all of the commits while keeping the work tree in the state it is now, so that you can make new commits, on a new branch? | 13:03 |
|
fiftysix
| correct, j416! well, a couple of branches would be better, so that they can become different pull requests. i implemented 2 new features and did 1 sweep of code cleanup, so i'm thinking 3 branches. | 13:04 |
|
j416
| but you still want to undo all commits because they make no sense? | 13:05 |
|
fiftysix
| yes. each and every one of them is a messy collection of unrelated changes. i think up until now i've been using git as kind of a fancy backup tool only... | 13:05 |
|
j416
| alright. | 13:05 |
|
| find the hash of the commit right before your first commit, i.e. the one that you based your commits on. | 13:05 |
|
fiftysix
| j416, 4df6570 | 13:06 |
|
j416
| oh and just in case; does 'git status' report clean, nothing to commit? | 13:06 |
|
| make sure everything is committed. | 13:06 |
|
fiftysix
| i can just commit my current changes into another nonsensical commit, then it'll be clean. | 13:06 |
|
j416
| yes, do that | 13:07 |
|
fiftysix
| done. | 13:07 |
|
j416
| having things committed makes it easier to get them back in case things go wrong | 13:07 |
|
fiftysix
| "nothing to commit, working tree clean" | 13:07 |
|
j416
| great. | 13:07 |
|
fiftysix
| just in case i also duplicated the whole thing before. | 13:07 |
|
j416
| ah, good | 13:08 |
|
| was just going to suggest you make a backup branch but then you've got that covered | 13:08 |
|
| you can also simply keep note of the hash of the current commit and you can go back to that state if you need to | 13:08 |
|
| (the one you just made) | 13:08 |
| ← blackntan left | 13:08 |
|
j416
| git reset 4df6570 # this will move your branch pointer so that it points to 4df6570, effectively "removing" any commits that come after that, while keeping your work tree untouched. If you run 'git status' after this, it should show all of the changes you made in all those commits together. | 13:09 |
| ← rsrx left | 13:10 |
|
fiftysix
| it told me a bunch of changes that it says are unstaged now | 13:11 |
|
j416
| (I say "removing" in quotes because they actually still exist, but they are not referenced by anything, you can still run 'git log <commit hash>' on any one of them for instance) | 13:11 |
|
| fiftysix: good | 13:11 |
|
fiftysix
| looks like too little files | 13:11 |
|
| hmm | 13:11 |
|
j416
| fiftysix: what does 'git log' say? | 13:11 |
|
| any of your commits still there? | 13:12 |
|
fiftysix
| nope | 13:12 |
|
j416
| then you're all set | 13:12 |
|
fiftysix
| i guess i was mistaken | 13:12 |
|
| yes | 13:12 |
|
| the latest entry in the log is the last commit not made by me but the original author | 13:12 |
|
j416
| good | 13:12 |
|
| git checkout -b newbranch # this will create and check out a new branch called "newbranch" (call it whatever you prefer) | 13:12 |
| → blackmesa1 joined | 13:13 |
|
fiftysix
| got one | 13:13 |
|
j416
| I assume you are familiar with 'git add' and 'git commit'? Use those to craft your first few commits. | 13:13 |
|
fiftysix
| yes | 13:13 |
|
j416
| you can add parts of a file using 'git add -p' if you like. | 13:13 |
|
fiftysix
| well, i want to use gitg for that, as it allows such nice cherry-picking | 13:13 |
|
| fiftysix is a bit of a visual animal | 13:14 |
|
j416
| sure, that'll work | 13:14 |
|
fiftysix
| can i just make three new branches now? | 13:14 |
|
| or do i have to finish this one first? | 13:14 |
| ← blackmesa left | 13:14 |
|
j416
| you could but then you would risk adding the same changes to each branch, maybe? | 13:14 |
|
fiftysix
| hmmm i see, naw, that's not good | 13:15 |
|
j416
| perhaps it's easier to finish one branch and then whatever changes are left go into another branch? | 13:15 |
|
| so, add whatever changes you need to go into this branch, then leave the rest | 13:15 |
|
fiftysix
| k | 13:15 |
|
| that'll take a while | 13:15 |
|
j416
| as many commits are you like of course | 13:15 |
|
| np; I'll be around. highlight me later. | 13:16 |
|
| unless you want all up-front, that's fine too | 13:16 |
|
| just didn't want to overload with info | 13:17 |
|
fiftysix
| you're going at a really nice pace, j416! | 13:17 |
|
| i'll finish this one and then highlight you later :) | 13:17 |
|
j416
| o/ | 13:18 |
| → gareppa joined | 13:19 |
| ← gareppa left | 13:19 |
| ← inkbottle left | 13:22 |
| → inkbottle joined | 13:22 |
|
fiftysix
| j416, the first branch ended up only being one commit. so do i go back to master now and branch off again from there or do i branch off of the new branch? | 13:23 |
|
j416
| that's up to you. would you like the other branch to be based off of this one, or off of master? | 13:24 |
| ← nowhere_man left | 13:25 |
|
j416
| if these are completely unrelated changes that don't conflict with one another, I'd probably base both off of master. If they have some sort of relation where one needs to be before the other, I would consider basing one off of the other. | 13:26 |
|
fiftysix
| the goal is to allow the original author to decide which of my branches/PRs he'd like to accept and which not | 13:27 |
|
| so, the first thing | 13:27 |
|
j416
| alright, so they're not related. I'd base both off of master, then. | 13:27 |
|
fiftysix
| okay | 13:27 |
|
| fiftysix walks off to do the second branch | 13:27 |
|
j416
| you can either checkout master and do the same dance as before, | 13:27 |
|
| or you can do that in one go with 'git checkout -b yetanotherbranch master' | 13:28 |
|
| git checkout -b <newbranch> <start point> | 13:28 |
|
fiftysix
| oh that's nice! i might even be able to remember that command. | 13:28 |
|
j416
| '-b' is for branch. | 13:28 |
| → shadowswalker joined | 13:29 |
|
j416
| there's a risk that this won't work since it's not obvious that your changes can be 'floated' to the new branch that will be in the same state as master. If this is the case, git will not checkout the new branch. | 13:29 |
|
| if the changes are completely unrelated as you say, there should be no issue. | 13:30 |
|
shadowswalker
| Hello guys, I was working on my project, I have my production version in master branch, and we all work on another branch development, last week we changed a the structure of project(renamed folders, moved folders, files). Now we have tested everything works in test, but when I am trying to merge this to our master, it gives conflict showing file migration/0001_initial.py deleted in HEAD but renamed in master | 13:31 |
|
| branch | 13:31 |
|
j416
| shadowswalker: someone added changes to master without adding them to the dev branch, or your dev branch is out-of-date. | 13:32 |
| → avizini__ joined | 13:33 |
|
shadowswalker
| j416: Last commit in master is merge from dev branch, so how can It cause conflict ? | 13:33 |
|
j416
| shadowswalker: git log -1 master^2 # is this commit in your dev branch? | 13:34 |
| ← avizini_ left | 13:35 |
|
shadowswalker
| j416: yes, Its in the dev branch, after that I have merge, and now I want to merge again from dev | 13:37 |
| → Ninpo joined | 13:37 |
|
Ninpo
| Can someone help me please? I've accidentally made a PR with a branch that should have been based off master but I accidentally based it off another PR. How do I rebase so PR2 is based off master (and only has PR2's fixes) rather than it having both PR1 and PR2 in? | 13:38 |
|
j416
| shadowswalker: do you have commits in master that aren't merges from dev? | 13:39 |
|
Ninpo
| No. PR1 was branched from master and submitted. I forgot to branch from master again for PR2, so PR2 has both sets of fixes in | 13:40 |
|
| Oh, not me | 13:40 |
|
| sorry | 13:40 |
|
Soni
| error: object a7fc765d7baa51f07cc83f0efd5643a61595bf30: zeroPaddedFilemode: contains zero-padded file modes | 13:40 |
|
| how to fix? | 13:40 |
|
j416
| Ninpo: probem solved? | 13:40 |
|
shadowswalker
| j416: I may have, but I have meged dev after that change fix problem at that time, | 13:40 |
|
Ninpo
| j416: no | 13:41 |
|
| I thought you were talking to me I missed the shadowswalker mention | 13:41 |
| ← avizini__ left | 13:41 |
| → Avizini joined | 13:41 |
|
j416
| Ninpo: so, pr2-branch is based off of pr1-branch, but you want pr2-branch to be based off of master instead? | 13:41 |
|
Ninpo
| Yes | 13:42 |
|
j416
| Ninpo: git checkout pr2-branch && git rebase --onto master pr1-branch | 13:42 |
|
Soni
| nvm, fixed it with --single-branch and --branch 2.0.x | 13:42 |
|
Ninpo
| I just managed to find this, would this be correct? https://gist.github.com/iolloyd/4018744c054b223c035ed8233f1ea6ce | 13:42 |
|
Soni
| (is this a proper way to fix it?) | 13:42 |
|
j416
| Soni: what command is that? | 13:42 |
|
Ninpo
| j416: thank you | 13:42 |
|
Soni
| git clone | 13:42 |
|
| j416: ^ | 13:42 |
| → fstd_ joined | 13:42 |
| ← fstd left | 13:43 |
| fstd_ → fstd | 13:43 |
| → tomaw joined | 13:44 |
|
Ninpo
| j416: that just tells me pr2-branch is up to date | 13:44 |
|
j416
| Ninpo: what does 'git log' say? | 13:44 |
|
| (is it correct or still off?) | 13:45 |
|
Ninpo
| j416: it's still got the stuff from pr1 in | 13:45 |
|
j416
| Ninpo: what command did you run? | 13:45 |
|
| exactly | 13:46 |
|
Ninpo
| git checkout exception_fixes && git rebase --onto master setup_fix | 13:46 |
|
j416
| and exception_fixes is PR2, setup_fix is PR1? | 13:46 |
|
Ninpo
| yes | 13:47 |
|
j416
| what's in master? | 13:47 |
|
Ninpo
| setup_fix was branched from master | 13:47 |
|
| I've not touched master, still in line with upstream (neither are merged) | 13:47 |
|
j416
| then the above should work. | 13:47 |
|
Ninpo
| oh hang on... | 13:47 |
|
Soni
| is it okay to use git clone --single-branch --branch 2.0.x after getting an error like that? | 13:48 |
|
Ninpo
| my repo is a fork, looks like I went and merged setup_fix into my repo's master | 13:48 |
|
| argh | 13:48 |
|
j416
| there you go | 13:48 |
|
Ninpo
| I shouldn't git when tired :( | 13:48 |
|
| Better to trash mine and refork or is this fixable? | 13:48 |
|
j416
| Ninpo: you can just replace 'master' in that command with whatever commit you want it based off of. | 13:48 |
|
Ninpo
| Ah ok thank you | 13:49 |
|
j416
| Ninpo: or, if you prefer, reset master to that commit and just run the same command. same same. | 13:49 |
|
| Soni: sure, that'll just not clone some things. | 13:49 |
|
Soni
| well, I don't need or want the other things | 13:50 |
|
j416
| that should be fine then | 13:50 |
|
| shadowswalker: the only reason for there to be a conflict is if branch A has a change to something and branch B has a different change to the same thing. | 13:51 |
|
| shadowswalker: so, master definitely has changes that dev doesn't. | 13:52 |
| ← Avizini left | 13:52 |
|
shadowswalker
| j416: I have checkout to previous commit, (in detached head), now i have merged successfully, How do I use that detached head as master now ? | 13:52 |
|
j416
| shadowswalker: are you saying you want to overwrite master (and then force-push it)? | 13:53 |
|
shadowswalker
| j416: yes it has, I actually removed somefiles in masters and committed, It seems wrong now.. | 13:53 |
|
| j416: yes, | 13:53 |
|
j416
| I hope you know the implications of that | 13:53 |
|
shadowswalker
| j416: I don't have any major change in master, It will work successfully in my recent merge in detached HEAD | 13:53 |
|
j416
| git checkout master && git reset --hard <commit> | 13:53 |
|
| then you can force-push that if you need. | 13:53 |
| → Regon joined | 13:53 |
|
j416
| shadowswalker: sure, just think of your peers. | 13:53 |
|
| they will have to rebase any branches they based off of the current master | 13:54 |
|
| and they will have to reset their master. | 13:54 |
|
| re-clone would of course work, too. | 13:54 |
|
shadowswalker
| j416: just one commit made the problem, No one except me is working on master(no merge), no branch is based on master.. | 13:54 |
|
j416
| good good | 13:55 |
| ← fstd left | 13:55 |
|
shadowswalker
| j416: I found that no major changes should be done in masters, first in dev then merege to masters.. thanks.. | 13:55 |
|
j416
| that makes a lot of sense, yes. | 13:55 |
|
| fiftysix: all good? | 13:57 |
| → greatgatsby joined | 13:57 |
| → shentino joined | 13:58 |
| → fstd joined | 14:01 |
|
Ninpo
| j416: That's sorted it, thank you very much. Tidy git again :) | 14:02 |
|
j416
| Ninpo: o/ | 14:03 |
| → freeman42x joined | 14:03 |
| → Nixew joined | 14:06 |
| ← blackmesa1 left | 14:06 |
| ← Silenced left | 14:06 |
| ← netj left | 14:07 |
| → netj joined | 14:07 |
| → irqq joined | 14:12 |
| ← Copenhagen_Bram left | 14:15 |
| → nowhere_man joined | 14:18 |
| ← Revan- left | 14:18 |
| → Revan- joined | 14:18 |
|
fiftysix
| j416, actually, no. i messed up because i had to temporarily remove some lines from three files before creating the next branch. then i finished that branch and wanted to go back onto master. now it demands "Please commit your changes or stash them before you switch branches" | 14:21 |
|
| i undid and redid it two times already, but it seems i should have first commited them onto master *before* we did the reset. | 14:21 |
|
j416
| I'm not sure I follow | 14:25 |
| ← profmac left | 14:27 |
| ← apoos_maximus left | 14:28 |
| ← iam730 left | 14:28 |
| ← randominternetus left | 14:29 |
| → czart_ joined | 14:30 |
| → randominternetus joined | 14:30 |
| ← randominternetus left | 14:30 |
| → apoos_maximus joined | 14:31 |
| ← Ninpo left | 14:33 |
| ← czart left | 14:34 |
| ← hofmann3900 left | 14:36 |
| → mat001 joined | 14:36 |
|
j416
| fiftysix: if you could reword that explanation of the situation and what you want to do, that might help me understand. | 14:37 |
|
| 1) what do you have now; 2) what do you want | 14:37 |
| → nativetexan joined | 14:38 |
|
nativetexan
| good morning, anyone around? | 14:39 |
|
j416
| nativetexan: 950 people. | 14:39 |
| → profmac joined | 14:39 |
|
nativetexan
| thank you j416 | 14:39 |
|
j416
| some away, probably. | 14:39 |
|
nativetexan
| i have a question about github stuff plz | 14:40 |
|
j416
| #github | 14:40 |
|
nativetexan
| oh ok | 14:40 |
|
| i thank you | 14:40 |
|
| have a great day | 14:40 |
| ← nativetexan left | 14:40 |
|
j416
| if you have a git question, this channel is the place; if it's just about github, .. he left. | 14:40 |
| → mobile_c joined | 14:41 |
|
fiftysix
| j416, not sure if i understand well enough to phrase properly. let me keep fiddling for a bit. | 14:42 |
| → mowcat joined | 14:44 |
| ← sauercrowd left | 14:45 |
|
j416
| o/ | 14:46 |
| ← kjartan left | 14:47 |
| → czart joined | 14:50 |
|
fiftysix
| j416, okay, i'm back to a clean slate. we did the "git reset", then we created a new branch and i put a commit on it and checked out master again, which has a bunch of unstaged/uncommitted changes (including two new files) on it. | 14:51 |
| → kjartan joined | 14:51 |
|
fiftysix
| my question is: can i make changes to these files now before creating another branch? | 14:52 |
| ← czart_ left | 14:54 |
| → jottr joined | 14:55 |
| ← pks left | 14:56 |
| → revoltingPeasant joined | 14:57 |
| → shentino_ joined | 14:57 |
| ← shentino left | 14:57 |
|
j416
| fiftysix: yes; the order doesn't matter. | 14:58 |
|
| fiftysix: the only issue might be if your new branch is _not_ based off of master, because then the more changes you add, the greater the risk that there'll be conflicts | 14:59 |
|
| fiftysix: but if you're basing your new branch on the same state, there can be no conflict. | 14:59 |
|
| if you should decide to make _commit(s)_ in master though, then of course you'd have to go back and clean those up if they don't belong there. still no issue though. | 15:00 |
| ← shadowswalker left | 15:02 |
|
j416
| I prefer to keep master as the latest stable state (i.e. prod), and to avoid I-missed-the-morning-coffee accidents, I try to always work on a separate branch. Moving things around is no issue if it turns out I didn't need the branch for whatever reason. | 15:03 |
|
fiftysix
| i'll for sure adopt that approach in the future ... this is too much brain acrobatics in the long run | 15:04 |
| ← Fernando-Basso left | 15:05 |
|
j416
| it'll all become clearer once you've read through some docs and gotten some more practice | 15:05 |
|
| everything's just about poking at the commit graph in various ways to get it to look right | 15:05 |
|
fiftysix
| j416, okay, this time around it worked. continuing with the next branch / set of changes. | 15:08 |
|
| oh wait. damnit. i was on master. | 15:09 |
|
| *sigh* ... that's got to be the "i-missed-the-morning-coffee" accident you spoke of. | 15:09 |
|
j416
| haha. | 15:12 |
|
fiftysix
| damn, there it is again. but this time i have a screenshot! | 15:13 |
|
| j416, what's happening here?https://imgur.com/a/2atNaSO | 15:14 |
|
j416
| fiftysix: git refuses to checkout master because doing so would mean it would have to merge those files to get the right state | 15:20 |
|
| it can't simply irreversibly "float" the changes over | 15:20 |
|
fiftysix
| j416, but it worked for the first branch. why is it not working for the second branch anymore? | 15:21 |
|
j416
| you can still get the result you want though, given that the changes aren't related | 15:21 |
|
| maybe on the first branch you committed no partial files | 15:21 |
|
fiftysix
| on the first branch i only committed files that are in an entirely different subdir. | 15:22 |
| → troulouliou_div2 joined | 15:22 |
| → diegoaguilar joined | 15:23 |
|
fiftysix
| as in, nothing that i want to do now, for the second branch, has anything to do with that first branch/its files/its commits whatsoever. | 15:23 |
|
| if i'm understanding you correctly, there should be no issue. | 15:23 |
| ← apoos_maximus left | 15:24 |
|
fiftysix
| i *did* change some files on master though. i.e. *after* we did "git reset 4df6570". that must be the problem, right? | 15:24 |
| ← lucasb left | 15:25 |
| ← _xor left | 15:27 |
| ← Cabanossi left | 15:28 |
|
j416
| yes, don't do that | 15:29 |
|
| so you have commits on master that you don't have in your new branches? | 15:29 |
|
| of course you can do it, it'll just make your branches not based off of master anymore and .. as I understood it you wanted master clean? | 15:30 |
| ← VladGh left | 15:30 |
|
fiftysix
| no | 15:30 |
|
| no commits | 15:30 |
|
| just unstaged/uncommited changes | 15:31 |
| → VladGh joined | 15:31 |
|
fiftysix
| but still getting the message from the screenshot i linked | 15:31 |
| → Copenhagen_Bram joined | 15:33 |
| ← Darcidride_ left | 15:33 |
| → rkazak joined | 15:37 |
| → pks joined | 15:37 |
| → Darcidride_ joined | 15:37 |
| → sauercrowd joined | 15:37 |
|
fiftysix
| j416, | 15:37 |
|
j416
| only commits are "on branches" | 15:38 |
| ← Copenhagen_Bram left | 15:38 |
|
j416
| uncommitted changes are not tied to any branch | 15:38 |
|
fiftysix
| i see, sorry for the wrong use of terminology in that case | 15:38 |
|
| but then i understand that screenshot even less | 15:39 |
|
j416
| so, you want to create a new branch based off of master, with those changes over one or more commits? | 15:39 |
|
| i.e. the ones not yet committed in your screenshot | 15:39 |
|
fiftysix
| some of them | 15:39 |
| → Copenhagen_Bram joined | 15:39 |
|
j416
| one way would be to stash them, checkout the new branch, apply the stash: git stash && git checkout -b yetanotherbranch master && git stash pop | 15:40 |
|
| another way would be to commit them and then cherry-pick that commit | 15:40 |
|
| git add . | 15:41 |
|
| er, enter too fast | 15:41 |
|
fiftysix
| oh wait | 15:41 |
|
| so there's no way to avoid the situation in my screenshot? | 15:41 |
|
j416
| git add . && git commit && git checkout -b yetanotherbranch master && git cherry-pick theotherbranch | 15:41 |
| ← yyy left | 15:41 |
|
j416
| fiftysix: what situation, that you can't checkout master? | 15:41 |
|
fiftysix
| yes. where i'm on a "clean" master (i.e., nothing staged, nothing committed), then create a new branch, commit some stuff there, and want to get back to master without getting that error message. | 15:42 |
| → _xor joined | 15:42 |
|
j416
| correct; you can't in this case because you'd risk losing data. | 15:44 |
|
| you have to create a commit with it somehow or other first so that you have the data safe | 15:44 |
|
fiftysix
| j416, sooo i could also make that commit on master and then "cherry-pick" it onto a newly created branch? | 15:45 |
|
j416
| (or, you can decide that you don't care if you lose data and run "git checkout -f master" -- that'll overwrite your changes in this case so don't do it, but it can be good to know) | 15:45 |
|
| fiftysix: no because you can't checkout master | 15:46 |
|
fiftysix
| nono | 15:46 |
|
| after that screenshot, i "git reset" again and deleted that branch | 15:46 |
|
j416
| there has to be a merge somewhere (not a merge commit, but a merge of data) | 15:46 |
|
| ok well.. that didn't help much did it :D | 15:46 |
|
fiftysix
| well, at least it didn't create more problems, except for a misunderstanding between us :( | 15:47 |
|
j416
| just go back to what you had and try stashing, it'll probably work | 15:47 |
| ← Copenhagen_Bram left | 15:47 |
|
fiftysix
| the whole word of "to stash" sends shivers down my spine, i think that's why i never used "git stash" before | 15:48 |
|
| but well, i got a copy | 15:48 |
|
j416
| does "commit" send less shivers? | 15:48 |
|
fiftysix
| yes :) | 15:48 |
|
j416
| we can skip stash completely. | 15:48 |
|
fiftysix
| it sounds friendly | 15:48 |
|
| non-native-speaker problems perhaps | 15:48 |
|
j416
| (stash actually make a commit but you can't see it as easily) | 15:48 |
|
fiftysix
| oh | 15:49 |
| → Copenhagen_Bram joined | 15:49 |
|
fiftysix
| j416, let me ask a different way: from that clean master (i.e. no new branch created yet), what would be your preferred way? | 15:49 |
| ← troulouliou_div2 left | 15:49 |
| → mizu_no_oto joined | 15:50 |
| ← nowhere_man left | 15:52 |
|
j416
| I'd probably do it in the exact way as we did above; it's of course possible to do all branches "at once" instead of having to float changes back and forth but that still introduces the risk of adding the same change twice | 15:53 |
|
| so I'd avoid it for that reason. | 15:53 |
| ← Copenhagen_Bram left | 15:54 |
|
fiftysix
| hmm | 15:54 |
|
| that's what i'm trying to do | 15:54 |
|
| branch by branch | 15:55 |
|
| it worked for the first one | 15:55 |
|
| then i tried again | 15:55 |
|
| and the result was that screenshot (which i undid) | 15:55 |
| ← mobile_c left | 15:55 |
| → wEssBRowN84 joined | 15:55 |
| → nowhere_man joined | 15:56 |
|
fiftysix
| j416, in other words, i don't get why there's any changes floating back and forth. how to avoid it? | 15:56 |
| → Copenhagen_Bram joined | 15:56 |
| → novum joined | 15:57 |
| novum → novumsensum | 15:57 |
| novumsensum → novum | 15:57 |
| wEs → Guest27482 | 15:58 |
| wEssBRowN84 → wEs | 15:58 |
|
j416
| fiftysix: stash or commit like I wrote above | 15:58 |
| ← Guest27482 left | 15:58 |
|
j416
| fiftysix: you can't avoid it without either stashing or committing (well, you could make a patch or something, dunno, at least you need to get rid of the uncommitted changes) | 15:59 |
|
fiftysix
| i see | 15:59 |
|
| but i'm only stashing the uncommitted changes away *on the new branch* - once i go back to master, they'll be there again, minus the ones i committed on the branch. correct? | 16:00 |
|
j416
| no | 16:00 |
|
| fiftysix scratches his head | 16:00 |
|
j416
| forget stash for now maybe | 16:00 |
|
| think of stash as something very similar to commit | 16:01 |
|
| and then read up on it later; we can manage without stash | 16:01 |
|
fiftysix
| okay | 16:01 |
| → beefjoe joined | 16:02 |
|
j416
| what state are you in now? | 16:03 |
| → fstd_ joined | 16:04 |
|
fiftysix
| j416, right now i'm on master. there are only unstaged/uncommited changes. there is the one branch that i created earlier and that has one commit. there are no other branches. | 16:04 |
|
| j416, more precisely, there are 9 modified and 2 as-yet untracked files. | 16:05 |
|
j416
| what did you do to get from the branch you had before, to the current state? | 16:05 |
|
fiftysix
| git checkout master | 16:06 |
|
j416
| the one in the screenshot | 16:06 |
|
fiftysix
| oh | 16:06 |
|
| wait | 16:06 |
|
j416
| you must have run 'git reset' at some point | 16:06 |
|
fiftysix
| yes | 16:06 |
|
| so after the screenshot i did: | 16:06 |
|
| git log (to get the hash of the last commit on master); git reset to that hash; git checkout master; git branch -d userdefs | 16:07 |
| ← fstd left | 16:07 |
| fstd_ → fstd | 16:07 |
|
j416
| ok | 16:10 |
|
| fiftysix: I think the easiest would be to just go back to where you were at in the screenshot and continue from there | 16:10 |
| → kapil____ joined | 16:10 |
|
j416
| sorry for the slow response times; I'm juggling conversations in multiple channels at the moment | 16:11 |
|
| fiftysix: git checkout -b userdefs ecd0786 | 16:11 |
|
fiftysix
| j416, that's really fine - i'm grateful you're helping me at all! | 16:12 |
|
| j416, that's a hash i haven't seen before. why base the new branch on that? | 16:13 |
| ← alyptik left | 16:14 |
| ← fstd left | 16:15 |
|
j416
| fiftysix: it's where your branch was before you killed it | 16:15 |
|
| at least according to your screenshot. | 16:15 |
|
fiftysix
| j416, oh right! "git reset" didn't kill the commit, only reset the pointer... | 16:16 |
|
j416
| ah, that'll fail | 16:17 |
|
| can't do it in one command | 16:17 |
|
fiftysix
| good thing i didn't do anything yet :P | 16:17 |
|
j416
| it would have just erred out | 16:17 |
|
fiftysix
| based on what you said before | 16:17 |
|
| i would now: "git checkout -b userdefs", then stage my 2 new files and half-dozen chunks, make my commit, then what? | 16:18 |
|
j416
| fiftysix: git checkout -b userdefs && git reset ecd0786 | 16:18 |
|
| two steps. | 16:18 |
|
fiftysix
| okay, let me try | 16:18 |
|
| done. | 16:19 |
| → dpyro joined | 16:19 |
|
fiftysix
| j416, https://i.imgur.com/sLDeHzw.png | 16:20 |
|
j416
| fiftysix: exactly | 16:20 |
|
| now you're at where you were a moment ago | 16:21 |
|
| makes sense? | 16:21 |
|
fiftysix
| yes, 5 by 5 | 16:21 |
|
j416
| not sure what that means but I assume it means something good. :D | 16:21 |
|
| ok, next step | 16:21 |
|
fiftysix
| in US TV shows it means "i read you loud and clear". according to the urban dictionary it originated from the CB radio community | 16:22 |
|
j416
| ah | 16:22 |
|
| there are various ways; I'd do it slightly differently but but let's keep it simple for now | 16:22 |
|
fiftysix
| okay | 16:22 |
|
j416
| commit all of those changes to just a single commit (we'll remove it later, just call it wip or whatever) | 16:23 |
|
fiftysix
| okay | 16:23 |
|
| so git add .; git commit -a -m wip | 16:23 |
|
| done | 16:23 |
|
| now "git checkout master"? | 16:24 |
|
j416
| yeah sure, or 'git checkout -b yetanotherbranch master' | 16:24 |
|
| (git checkout master && git checkout -b yetanotherbranch # will be equivalent) | 16:24 |
|
fiftysix
| i did "git checkout -b tempcomp master" | 16:24 |
|
j416
| okay¨ | 16:25 |
|
fiftysix
| curiously, there is now an untracked file. very much so curiously as that file should be covered by .gitignore | 16:25 |
|
| oh waaaaaaaaait that branch doesn't have a .gitignore file | 16:25 |
|
j416
| do you care about that file? | 16:25 |
|
fiftysix
| yeah, i care about it not being in git | 16:25 |
|
j416
| right | 16:25 |
| → thiago joined | 16:26 |
|
j416
| fiftysix: but it was created by something that was added in the userdefs branch? | 16:26 |
|
| fiftysix: (does it belong there, or should it really be in an earlier commit?) | 16:26 |
|
fiftysix
| no. it came under the eyes of git by way of the .gitignore file vanishing when we created that new branch. | 16:27 |
| → fstd joined | 16:27 |
|
j416
| that I know | 16:27 |
|
fiftysix
| right now, if we don't add it, it doesn't hurt. | 16:27 |
|
j416
| so it was there from before and you just chose to add it to .gitignore in the userdefs branch | 16:27 |
|
fiftysix
| yes exactly | 16:27 |
|
| creating a .gitignore file is part of the things i do in the userdefs branch | 16:27 |
|
j416
| alright; then either just leave it or remove it manually; whichever you prefer | 16:28 |
|
fiftysix
| okay | 16:28 |
|
j416
| (there's a command for this called 'git clean', useful to know for the future but overkill for now) | 16:28 |
|
fiftysix
| okay | 16:28 |
|
j416
| clean slate? | 16:29 |
|
fiftysix
| i've moved that file to /tmp, so yeah, clean slate | 16:29 |
|
j416
| git cherry-pick userdefs | 16:29 |
|
fiftysix
| j416, https://i.imgur.com/fIjWWm7.png | 16:30 |
|
j416
| alright, no problem | 16:30 |
|
fiftysix
| better screenshot: https://i.imgur.com/2Owh72v.png | 16:30 |
|
j416
| 'git status' will show you which files are in conflict | 16:30 |
|
| nice, just one | 16:30 |
|
| edit that one to fix the conflict | 16:31 |
| ← fstd left | 16:31 |
|
j416
| you want it to have the changes that should go into _this_ branch as based off of master. | 16:31 |
|
| the userdefs changes should not be there | 16:31 |
|
fiftysix
| okay | 16:31 |
|
j416
| i.e. the ones in commit userdefs^ | 16:31 |
|
fiftysix
| it's just one chunk | 16:31 |
|
j416
| good good | 16:31 |
| → yyy joined | 16:32 |
|
fiftysix
| chunk is removed | 16:32 |
| → atrigent joined | 16:32 |
|
fiftysix
| so now "git add ReflowController/config.h"? | 16:32 |
|
j416
| fiftysix: I take it you're familiar with conflict resolution? | 16:32 |
|
| a least a bit | 16:32 |
|
| ? | 16:32 |
|
fiftysix
| nnnnnnnnnnnnot too much tho | 16:32 |
|
j416
| alright | 16:32 |
|
| make sure all the conflict markers are gone and that the file resembles what you want | 16:32 |
|
fiftysix
| i mean, i sort-of understand what just happened and why i had to remove that chunk | 16:32 |
|
| it does now | 16:33 |
|
j416
| if it does then it's fine | 16:33 |
|
| it should be a normal file that would compile | 16:33 |
|
| (or whatever it does in your context) | 16:33 |
|
| yes, add and then 'git cherry-pick --continue' | 16:33 |
|
| or 'git commit', which is equivalent | 16:33 |
|
fiftysix
| okay, it wants me to commit. | 16:34 |
|
j416
| do it | 16:34 |
|
fiftysix
| i'll just keep the message "wip" | 16:34 |
|
j416
| yes | 16:34 |
|
fiftysix
| done | 16:34 |
|
| git seems happy | 16:34 |
|
| clean slate | 16:34 |
|
j416
| (you can avoid this commit step by giving cherry-pick "--no-commit" but I'm trying to keep it simple) | 16:34 |
|
fiftysix
| k | 16:34 |
|
j416
| right, so now we have a wip commit in the new branch which you will want to at least reword, or split into multiple proper commits | 16:35 |
|
fiftysix
| (i now have open browser tabs for reset, push, cherry-pick and clean, which i intend to read after we're done) | 16:35 |
| ← troyt left | 16:35 |
|
j416
| and userdefs has a commit that you don't need | 16:35 |
|
fiftysix
| aye to the first sentence | 16:35 |
|
| aaand aye to the second | 16:36 |
|
j416
| so maybe go cleanup the userdefs branch to get that out of the way | 16:36 |
| → troyt joined | 16:36 |
|
j416
| git checkout userdefs && git reset --hard HEAD^ | 16:36 |
|
| should do it | 16:36 |
|
fiftysix
| yes, it did | 16:36 |
|
j416
| git checkout tempcomp | 16:36 |
|
| git reset HEAD^ | 16:37 |
|
| add and commit as usual. | 16:37 |
|
fiftysix
| nice, all the changed files are there on the workspace again :) | 16:37 |
|
| okay, this'll take a few minutes once more | 16:37 |
|
j416
| yes, except now based off of master | 16:37 |
|
fiftysix
| :) | 16:37 |
|
j416
| I think these are all the tools you need! | 16:37 |
|
| for this scenario. | 16:38 |
|
fiftysix
| it's a bunch of new concepts | 16:38 |
|
j416
| yes; probably too much at once. | 16:38 |
|
fiftysix
| let me try to do the next round myself, i'll highlight you if there are problems | 16:38 |
|
j416
| alright | 16:38 |
|
| o/ | 16:38 |
| ← nowhere_man left | 16:39 |
| → Cabanossi joined | 16:44 |
| → alyptik joined | 16:44 |
| → TikityTik joined | 16:44 |
| → agowa338 joined | 16:46 |
| → nowhere_man joined | 16:47 |
| ← revoltingPeasant left | 16:49 |
| ← beefjoe left | 16:50 |
| ← kerframil left | 16:53 |
| → n3wborn joined | 16:59 |
| ← mizu_no_oto left | 16:59 |
| → fission6 joined | 17:00 |
| → revoltingPeasant joined | 17:01 |
| → martin-_-_ joined | 17:06 |
|
martin-_-_
| hi | 17:06 |
|
Soni
| how can I compact a repo? | 17:07 |
|
martin-_-_
| I got a git repository which I used for private. Due licensing I need to open/ publish two specific directory to a public git repository | 17:08 |
|
| is that even doable with git? | 17:08 |
|
thiago
| Soni: git gc | 17:09 |
|
| martin-_-_: yes, but it'll be a different repository, with completely separate history (if you want any history) | 17:09 |
|
Soni
| already ran it, still have 24213(?) objects | 17:10 |
|
martin-_-_
| thiago history would be ok for me | 17:10 |
|
Soni
| even with --aggressive | 17:10 |
|
| I'm supposed to only have 1 branch | 17:10 |
| → gareppa joined | 17:11 |
|
martin-_-_
| thiago so I can use my local git and push only a specific directory to a remote repository ? | 17:12 |
|
Soni
| why's this so big and what can I do to make it better? | 17:12 |
|
j416
| Soni: well how many files do you have and how many commits? | 17:12 |
|
Soni
| j416: idk, how do I check that? | 17:12 |
|
thiago
| martin-_-_: no. Completely separate repository. | 17:12 |
|
j416
| Soni: git log --oneline | wc -l | 17:12 |
| → Mattiaslndstrm joined | 17:12 |
|
martin-_-_
| you mean I need to split my current repository? | 17:12 |
|
j416
| Soni: then whatever to count files | 17:13 |
|
thiago
| martin-_-_: you'd delete those two dirs from your regular repository and then reimport them as a git submodule | 17:13 |
|
Soni
| 3230 commits | 17:13 |
|
| idk how to count files | 17:13 |
|
martin-_-_
| ah okay thiago | 17:13 |
|
Soni
| I guess find can do it | 17:13 |
|
j416
| yes | 17:13 |
|
Soni
| but idk how to use find | 17:13 |
|
j416
| doesn't really matter, just estimate | 17:13 |
|
| is it 5 files? | 17:13 |
|
| 500? | 17:13 |
|
| 5 million? | 17:13 |
|
thiago
| Soni: expire ethe reflog, then git repack -a -d -f | 17:13 |
|
| Soni: this is the best you can do. It will remove any unreferenced object. | 17:14 |
|
j416
| thiago: I believe he just cloned it | 17:14 |
|
thiago
| oh | 17:14 |
|
Soni
| 350? | 17:14 |
|
| I'm a they | 17:14 |
|
thiago
| then you already have the smallest number of files | 17:14 |
|
Soni
| and yeah I just cloned it | 17:14 |
|
thiago
| if your server didn't pack properly, then you can compress further, but it won't delete anything. | 17:14 |
| ← gareppa left | 17:14 |
|
martin-_-_
| Can I keep the existing history of the files which I gonna move to the new repository? | 17:14 |
|
thiago
| martin-_-_: yes, but in a new history | 17:14 |
|
j416
| Soni: so if say each commit changes maybe 8 files on average and you have 3000 commits, then that's 3000*8 -> 24000 objects | 17:15 |
|
Soni
| well it's github so it probably didn't pack properly, it never does anything properly | 17:15 |
| → apoos_maximus joined | 17:15 |
|
thiago
| martin-_-_: your old (private) history is still there, of course | 17:15 |
| → m0viefreak joined | 17:15 |
|
Soni
| (and I cloned a single branch) | 17:15 |
|
j416
| how large is it anyway? | 17:15 |
|
Soni
| thiago: how do I compress further? | 17:15 |
|
thiago
| Soni: git repack -a -d -f | 17:15 |
|
j416
| like thiago suggests you can try to use repack | 17:15 |
|
martin-_-_
| thiago do you have a online guide for my plan? | 17:15 |
|
Soni
| that seems to have done nothing | 17:15 |
|
| guess it's just this big | 17:16 |
|
thiago
| martin-_-_: no, this isn't a common activity | 17:16 |
| → Bobdude joined | 17:16 |
|
thiago
| martin-_-_: what you're looking for: git filter-branch with --directory-filter to extract the directory into a completely new history, then you publish that repo | 17:16 |
|
j416
| Soni: you can try to weak the params to repack to have it compress potentially better, but in most cases it won't be a significant improvement. | 17:16 |
|
thiago
| martin-_-_: then git rm -r dirname/ in the old repository and reimport as git submodule | 17:16 |
|
martin-_-_
| thanks thiago | 17:17 |
|
thiago
| martin-_-_: hint: usually, when publishing old proprietary content, you don't publish history | 17:17 |
| ← SJr left | 17:17 |
| ← ezio left | 17:17 |
|
Soni
| 10 MB :( | 17:18 |
|
| (as seen by git push) | 17:18 |
| ← sauercrowd left | 17:18 |
| → SJr joined | 17:19 |
| → iNCoNFuN joined | 17:20 |
|
| thiago wonders if anyone has considered using zstd for compression in git, instead of (or in addition to) zlib | 17:22 |
| → cdown joined | 17:24 |
| → mizu_no_oto joined | 17:25 |
| ← Cabanossi left | 17:25 |
| ← revoltingPeasant left | 17:26 |
| → troulouliou_dev joined | 17:28 |
| → metrixx joined | 17:30 |
| ← metrixx_ left | 17:33 |
|
j416
| Soni: doesn't seem particularly large? | 17:34 |
| ← iNCoNFuN left | 17:34 |
|
Soni
| okay | 17:34 |
| ← ali1234 left | 17:35 |
|
Soni
| it does have plenty of images | 17:35 |
| → ali1234 joined | 17:35 |
|
Soni
| they're .gif | 17:35 |
|
| all of them | 17:35 |
| ← n3wborn left | 17:37 |
| ← R2robot left | 17:37 |
| ← kusmario_ left | 17:37 |
| → kusmario joined | 17:38 |
|
Soni
| eh w/e | 17:39 |
| → R2robot joined | 17:42 |
| ← raffo left | 17:42 |
| → horribleprogram joined | 17:48 |
|
horribleprogram
| I'm stopping all development work until every project is a git project | 17:48 |
|
_ikke_
| horribleprogram: nice for you | 17:50 |
| ← mizu_no_oto left | 17:53 |
|
horribleprogram
| _ikke_: well it comes from necessity | 17:53 |
| → akushner joined | 17:58 |
| → Goplat joined | 18:01 |
| → revoltingPeasant joined | 18:01 |
|
| thiago hates when he finds out that a project he's packaging is hosted in mercurial | 18:02 |
| ← Inline left | 18:04 |
| → Inline joined | 18:04 |
| → raffo joined | 18:05 |
| ← inkbottle left | 18:07 |
|
horribleprogram
| thiago: what is "packaging", who is "hosting in mercurial" | 18:10 |
|
_ikke_
| horribleprogram: most likely distro packages | 18:10 |
|
| like deb / rpm / apk | 18:10 |
|
horribleprogram
| _ikke_: Interesting, I never thought about how deb repos are stored | 18:11 |
|
_ikke_
| That's something seperate | 18:12 |
|
horribleprogram
| that's deep and requires some pretty advanced concepts to understand. | 18:12 |
|
_ikke_
| This is mostly a matter of getting the source | 18:12 |
|
horribleprogram
| _ikke_: ahhh | 18:12 |
| → aw1 joined | 18:14 |
| ← Khisanth left | 18:14 |
| ← Darcidride_ left | 18:16 |
| ← alyptik left | 18:18 |
| → Darcidride_ joined | 18:19 |
| → iNCoNFuN joined | 18:22 |
| ← kapil____ left | 18:23 |
| ← rkazak left | 18:27 |
| → sauercrowd joined | 18:28 |
| → Khisanth joined | 18:28 |
| ← horribleprogram left | 18:39 |
| ← czart left | 18:42 |
| → iam730 joined | 18:45 |
| ← SuperKaramba left | 18:45 |
| ← sauercrowd left | 18:46 |
| → BenderRodriguez joined | 18:47 |
| ← iNCoNFuN left | 18:52 |
| → orbyt_ joined | 18:56 |
|
fiftysix
| j416, https://github.com/dasaki/nanoReflowController/pulls ... all mine :-D ... I have another one, but that is based on the code cleanup very heavily, so i'd prefer if the maintainer merges these first before i continue. | 18:57 |
| ← troulouliou_dev left | 18:58 |
|
j416
| fiftysix: hah! that's awesome. good job! | 18:59 |
|
| fiftysix: next step: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html | 18:59 |
| ← kjartan left | 18:59 |
| ← cd left | 19:00 |
|
fiftysix
| j416, oh, yeah, my brain is a little bit too mushy for that now, but thank you for the link :) | 19:00 |
| ← Darcidride_ left | 19:01 |
| → ngui_ joined | 19:01 |
| → cfoch joined | 19:02 |
| → Darcidride_ joined | 19:03 |
| → kjartan joined | 19:03 |
| ← ngui left | 19:04 |
| ngui_ → ngui | 19:04 |
| → sauercrowd joined | 19:04 |
|
fiftysix
| oooooooooh my god | 19:10 |
| ← orbyt_ left | 19:10 |
| → blackmesa1 joined | 19:10 |
|
fiftysix
| j416, i'm just seeing that when you start merging these branches, they don't stack without conflicts :( | 19:10 |
|
| j416, if i merge them now and then offer the branch that has them all merged as another PR to the maintainer, would he be able to merge that onto his master? | 19:11 |
| → orbyt_ joined | 19:11 |
| ← Darcidride_ left | 19:12 |
| ← filcab left | 19:13 |
| ← sauercrowd left | 19:14 |
| → filcab joined | 19:14 |
| → Darcidride_ joined | 19:14 |
| → sauercrowd joined | 19:14 |
|
j416
| fiftysix: if they depend on each other, that's tricky yes | 19:16 |
|
| make on PR at a time or just make one PR, maybe | 19:16 |
|
| dunno | 19:16 |
|
| ask the maintainer what that person prefers | 19:16 |
|
| I always try to avoid merging things that are not based on the tip of the branch, when possible | 19:17 |
|
| also, just because Git says everything merges fine, that doesn't mean it will actually work | 19:17 |
|
| syntactically it might have merged fine, but that is not to say that semantially it's off | 19:18 |
|
fiftysix
| omg you're right | 19:18 |
|
| it's not compiling | 19:18 |
|
| what have i done | 19:18 |
| → treehug88 joined | 19:18 |
|
j416
| interactive rebase to the rescue. | 19:19 |
|
| but I've no more time today, sorry. | 19:19 |
|
fiftysix
| tbh all this stuff feels a lot like lying | 19:19 |
|
j416
| read up on it. | 19:19 |
|
fiftysix
| don't worry j416 | 19:19 |
|
| i might just fix this the old-fashioned way | 19:19 |
|
| (like lying as in, the amount of mental effort required to juggle it all and keep the construct intact) | 19:19 |
| ← ali1234 left | 19:22 |
| → ali1234 joined | 19:22 |
| → Rboreal_Frippery joined | 19:25 |
| ← Darcidride_ left | 19:26 |
| ← revoltingPeasant left | 19:27 |
|
Rboreal_Frippery
| How do you do the equiviliant of "git reset --hard", but keeping all revisions until then? For example, I committed 'a' , then 'b' , but 'b' had many mistakes. I want to make the whole repository look like 'a' again, but still be able to bring up how files looked in 'b' if I need to later on for reference. So the new revision 'c' should look data wise exactly like 'a'. | 19:28 |
| → alyptik joined | 19:28 |
| ← YuGiOhJCJ left | 19:29 |
| → revoltingPeasant joined | 19:30 |
| ← apoos_maximus left | 19:31 |
| ← cswl left | 19:32 |
| → jottr_ joined | 19:34 |
|
_ikke_
| man git revert | 19:34 |
|
gitinfo
| the git-revert manpage is available at https://gitirc.eu/git-revert.html | 19:34 |
| ← jottr left | 19:34 |
| → fstd joined | 19:37 |
|
moritz
| if you have many commits that you want to undo, you can also do git reset --soft a | 19:37 |
|
| and then commit | 19:37 |
| → navidr joined | 19:38 |
| ← sauercrowd left | 19:39 |
| → kadoban joined | 19:39 |
| ← jottr_ left | 19:40 |
| ← sjoshi left | 19:40 |
| → sauercrowd joined | 19:40 |
| → ferdna joined | 19:42 |
| ← revoltingPeasant left | 19:42 |
| → jottr_ joined | 19:42 |
| ← mona_x left | 19:42 |
| ← Regon left | 19:42 |
| → Regon joined | 19:43 |
| → boombatower joined | 19:50 |
| ← fission6 left | 19:51 |
| → Phylock joined | 19:58 |
| ← boombatower left | 20:01 |
| → boombatower joined | 20:03 |
| ← yyy left | 20:06 |
| ← sieve left | 20:07 |
| ← boombatower left | 20:11 |
| → boombatower joined | 20:11 |
| jottr_ → jottr | 20:19 |
| ← blackmesa1 left | 20:21 |
| ← mattcen left | 20:21 |
| → mattcen joined | 20:25 |
| ← dex1983 left | 20:25 |
| → energizer joined | 20:28 |
|
grawity
| Rboreal_Frippery: `git checkout a . && git commit` | 20:30 |
| → dege joined | 20:31 |
| ← flying_sausages left | 20:32 |
|
energizer
| how do i checkout the branch that has these pull request commits? https://github.com/PyCQA/pylint/pull/1655 | 20:35 |
| → h1d joined | 20:37 |
| ← h1d left | 20:37 |
| → libertyprime joined | 20:37 |
|
j416
| energizer: did you make the PR? | 20:37 |
|
| (do you have the branch?) | 20:38 |
|
moritz
| grawity: doesn't work for additions/deletions | 20:38 |
|
energizer
| j416: no it's not me | 20:40 |
|
j416
| energizer: find the latest commit of it, check out that to a new branch | 20:40 |
| ← martin-_-_ left | 20:40 |
|
moritz
| https://stackoverflow.com/questions/14947789/github-clone-from-pull-request | 20:40 |
|
energizer
| ah answer seems to be `git fetch origin pull/1655/head:desired_local_branch_name` | 20:41 |
|
| thanks | 20:42 |
| ← mattcen left | 20:42 |
|
_ikke_
| sounds about right | 20:45 |
| → mattcen joined | 20:47 |
|
energizer
| hm i'm not sure i got the right thing | 20:54 |
|
| "Lucas-C force-pushed the voyages-sncf-technologies:master branch 2 times, most recently from b56d973 to d4f9e06 on Oct 25, 2017" | 20:54 |
|
| i'd like to diff those commits, but i don't see how to check them out | 20:55 |
|
| fatal: bad revision 'b56d973' | 20:55 |
|
rewt
| b56d973 is in the voyages-sncf-technologies repo | 20:55 |
|
| which is a fork of the repo you're looking at | 20:56 |
|
energizer
| rewt: so the commits on that fork never come into the main repo, even though the PR was merged? | 20:56 |
|
rewt
| the way github (and gitlab and others) handle cross-repo merges is not standard git; they're doing magic behind the scenese to be able to do that | 20:57 |
|
| right, there's a new commit created, which is a different hash | 20:57 |
|
energizer
| can i add the github fork as a branch in git? | 20:58 |
|
_ikke_
| a fork is an entire repository | 20:58 |
|
| it has multiple branches | 20:58 |
| ← manuelschneid3r left | 20:58 |
|
energizer
| can i add the fork's master as a branch then? | 20:59 |
|
_ikke_
| You can add the entire repository as a remote, and then you can fetch branches from it | 20:59 |
|
energizer
| ok i'll try that | 20:59 |
| ← mattcen left | 21:00 |
| → cybrNaut joined | 21:01 |
| → figurehe4d joined | 21:02 |
| → mattcen joined | 21:02 |
| → \void joined | 21:05 |
| → manuelschneid3r joined | 21:08 |
| ← figurehe4d left | 21:09 |
| ← dpyro left | 21:10 |
|
energizer
| i think i downloaded the branch, now i want to check out the commit on the left https://github.com/PyCQA/pylint/compare/60a830731b4494bb6aee0473a9e12d3800368ca5..11101f130353bcb2a43f04e3b5bc366ac50b2616 | 21:10 |
| → dpyro joined | 21:10 |
|
energizer
| git checkout 60a830731b4494bb6aee0473a9e12d3800368ca5 says 'reference is not a tree' | 21:11 |
| ← wootehfoot left | 21:11 |
|
ali1234
| so a quirk of how github works is that commits don't actually have to exist in the repository | 21:14 |
|
| so 60a... must be from some other fork | 21:14 |
| → dustinm joined | 21:14 |
| ← dpyro left | 21:15 |
|
ali1234
| neither of them in the voyages-sncf-technologies repo either | 21:18 |
|
| energizer: where did you find those references? | 21:19 |
| ← btree_ left | 21:19 |
| → dpyro joined | 21:20 |
| → wootehfoot joined | 21:20 |
|
energizer
| ali1234: https://github.com/PyCQA/pylint/pull/1655#issuecomment-336118198 | 21:21 |
| → elsheepo joined | 21:24 |
|
ali1234
| energizer: you can fetch the pull request directly | 21:24 |
| ← ferdna left | 21:24 |
|
ali1234
| git fetch origin pull/1655/head:foo; git checkout foo | 21:25 |
|
| those references don't even exist in the pull request, but maybe that does not matter | 21:25 |
|
energizer
| ali1234: how do i check out the 60a8 commit? | 21:26 |
|
ali1234
| i don't know... it doesn't seem to exist | 21:26 |
|
energizer
| but github is showing it in the web ui ^ | 21:27 |
|
ali1234
| that doesn't mean much | 21:27 |
| ← sauercrowd left | 21:27 |
|
energizer
| i think it's showing the actual content of the files on the left hand side of that compare/ page | 21:28 |
|
ali1234
| it's comparing two trees | 21:28 |
|
energizer
| so the github message "Lucas-C force-pushed the voyages-sncf-technologies:master branch 2 times, most recently from b56d973 to d4f9e06 on Oct 25, 2017" means maybe he amended it? | 21:31 |
|
ali1234
| yes, and that changes the ids | 21:31 |
|
| when you force push the old commits aren't exactly deleted... but they are unconnected and get garbage collected later | 21:32 |
| ← mattcen left | 21:33 |
|
energizer
| i see. thanks | 21:33 |
|
ali1234
| with a "normal" git server you can ask for arbitrary object ids but github doesnt support this | 21:34 |
| ← libertyprime left | 21:34 |
|
ali1234
| you can also see https://github.com/PyCQA/pylint/commit/60a830731b4494bb6aee0473a9e12d3800368ca5 | 21:35 |
|
| even though that commit doesn't exist when you clone | 21:35 |
| → flying_sausages joined | 21:36 |
| ← JanC left | 21:37 |
|
ali1234
| in the final pull request that seem to be equivalent to https://github.com/PyCQA/pylint/commit/6bdbe5640b151efee453cd501f0f274f5327a5a1 which you can get by the method i gave above | 21:38 |
|
| at least it has the same commit message | 21:38 |
| → JanC joined | 21:40 |
| → mattcen joined | 21:41 |
| ← boombatower left | 21:41 |
| ← Mattiaslndstrm left | 21:43 |
| → iloop joined | 21:43 |
| → sieve joined | 21:54 |
| ← sieve left | 21:54 |
|
j416
| ali1234: which server is that? | 22:05 |
|
ali1234
| i'm not sure, but github is pretty much the only one i've ever seen where it doesn't work | 22:05 |
|
j416
| I don't think you can arbitrary ask for an object directly with a given ID unless there's a ref tied to it | 22:05 |
|
| ali1234: where's one you've seen ot work? | 22:06 |
| → nilshi joined | 22:06 |
|
j416
| it* | 22:06 |
|
| I may be wrong but that's my understanding. | 22:06 |
|
| man git-fetch says the protocol wasn't designed for theft prevention but I think at least it tries to make it difficult. | 22:07 |
|
gitinfo
| the git-fetch manpage is available at https://gitirc.eu/git-fetch.html | 22:07 |
|
ali1234
| hmm hang on let me check | 22:07 |
|
| what you mean by "ref tied to it" exactly? | 22:08 |
|
nilshi
| Hello. I have my git repositories on a shared host. smart http is not available. I don't like dumb http (no --depth etc. ) so I set up the git daemon. That works fine except I only have a custom part. That is very fragile for long term availability, one server move and my git is not available anymore. Any recommendations how I can keep my git URLs stable? (except switching to http, which I will do as a last | 22:08 |
|
| resort) | 22:08 |
|
j416
| ali1234: any ref, such as a branch | 22:08 |
|
nilshi
| s/part/port | 22:08 |
|
ali1234
| j416: but it doesn't have to be the tip right? | 22:08 |
|
j416
| I haven't tried to exploit the protocol; I don't know. | 22:08 |
|
ali1234
| consider shallow submodules | 22:09 |
|
| you can still fetch them if they are not the tip of a branch or tagged | 22:09 |
|
| except not on github | 22:09 |
| → yyy joined | 22:10 |
|
j416
| can you fetch it even if it's not referenced at all? | 22:11 |
|
| i.e. you push a branch and then delete that branch ref | 22:11 |
|
ali1234
| i'm not sure and i can't remember the syntax to do it | 22:11 |
|
j416
| alright, just checking. so does that mean that... | 22:11 |
|
| > ali1234 with a "normal" git server you can ask for arbitrary object ids but github doesnt support this | 22:11 |
|
| ...is a guess? | 22:11 |
|
ali1234
| yes | 22:11 |
|
j416
| not trying to put you against the wall, just trying to learn. | 22:12 |
|
| ok, thanks. | 22:12 |
|
ali1234
| i mean, you can always ask for arbitrary objects, but the server might tell you to get lost... | 22:12 |
|
j416
| yes | 22:12 |
| ← mattcen left | 22:13 |
|
ali1234
| it's a bit annoying with shallow submodules cos even though it records the sha1 and it might work today, if more commits are pushed to the branch your project can no longer be cloned successfully | 22:15 |
|
| if the submodule is on github that is | 22:15 |
| → rick8024 joined | 22:16 |
| → mattcen joined | 22:17 |
| ← KnoP left | 22:17 |
| rick8024 → KnoP | 22:17 |
|
ali1234
| j416: so apparently this is all configurable | 22:22 |
|
j416
| where is it configurable? | 22:22 |
|
| on github? | 22:22 |
|
ali1234
| no in git | 22:22 |
|
j416
| ah. | 22:22 |
|
ali1234
| there are options uploadpack.allowTipSHA1InWant, uploadpack.allowReachableSHA1InWant, or uploadpack.allowAnySHA1InWant | 22:23 |
|
| they do exactly what they say :) | 22:23 |
|
_ikke_
| Depends on your interpretation of what they say :P | 22:24 |
| ← mattcen left | 22:25 |
| → m1m0 joined | 22:26 |
| → math-alpha joined | 22:28 |
| → mattcen joined | 22:30 |
|
ali1234
| github uses (the equivalent of) uploadpack.allowTipSHA1InWant, i'd like them to use uploadpack.allowReachableSHA1InWant but it's expensive and probably incompatible with their infra, and uploadpack.allowAnySHA1InWant is cheap but it exposes all your "deleted" stuff as well | 22:30 |
| ← navidr left | 22:31 |
| → blackmesa1 joined | 22:31 |
|
j416
| ali1234: I didn't know this was configurable. til; thanks! | 22:32 |
| ← fstd left | 22:32 |
| → fstd joined | 22:33 |
| ← math-alpha left | 22:35 |
| ← ghost43 left | 22:37 |
| → ghost43 joined | 22:37 |
| ← Nixew left | 22:39 |
| ← m0viefreak left | 22:40 |
| → math-alpha joined | 22:40 |
| ← plexigras left | 22:44 |
| → m0viefreak joined | 22:47 |
| ← ekleog left | 22:48 |
|
nilshi
| does git clone honor DNS SVR ports? | 22:52 |
| → ekleog joined | 22:52 |
| → Zexaron joined | 22:52 |
|
nilshi
| it doesn't seem like it. which is sad | 22:57 |
| ← blackmesa1 left | 23:03 |
| ← mattcen left | 23:04 |
| → swalladge joined | 23:09 |
| → mattcen joined | 23:11 |
| ← kjartan left | 23:11 |
| ← iloop left | 23:12 |
| → iloop joined | 23:13 |
| → snowgoggles joined | 23:14 |
| → kjartan joined | 23:14 |
| ← elsheepo left | 23:16 |
| → libertyprime joined | 23:21 |
| → blackmesa1 joined | 23:22 |
| ← atrigent left | 23:23 |
| → blackmesa joined | 23:25 |
| ← libertyprime left | 23:26 |
| ← blackmesa1 left | 23:27 |
| ← fiftysix left | 23:31 |
| ← m0viefreak left | 23:31 |
| → m0viefreak joined | 23:33 |
| ← paraxial left | 23:36 |
| ← wootehfoot left | 23:37 |
| ← irqq left | 23:38 |
| ← dpyro left | 23:39 |
| → dpyro_ joined | 23:39 |
| ← Phylock left | 23:40 |
| ← dpyro_ left | 23:40 |
| → revoltingPeasant joined | 23:40 |
| → dpyro joined | 23:42 |
| ← m0viefreak left | 23:49 |
| → libertyprime joined | 23:52 |
| ← yyy left | 23:55 |
| ← jottr left | 23:57 |