IRCloggy #git 2019-01-26

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2019-01-26

dege left00:00
akushner left00:00
Mattiaslndstrm joined00:02
finalbeta left00:03
Revan- left00:07
dpyro joined00:07
Revan- joined00:09
elkalamar joined00:09
elkalamar left00:09
blood joined00: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=fix00:14
The patch files only contains LF endings but I'm applying the patch on a windows workstation00:14
if i pass --ignore-space-change and --whitespace=fix it applies but with warnings00:15
Any idea on how I can fix the patch or have it apply cleanly without any issues?00:15
iam730 joined00:15
akushner joined00:15
iam730 left00:16
folkrav left00:16
kyan joined00:17
andyhuzhill joined00:19
PettanShoutaKun left00:20
basteh left00:21
j416 blood: what do you have and what do you want?00:22
kyan left00:22
blood I don't want the line endings to be messed with00:23
iam730 joined00:23
blood and I want to fix all whitespace warnings00:23
I just want to apply the patch cleanly with 0 warnings/errors00:24
j416 what did you set core.whitespace to?00:24
meLon left00:25
blood I didn't touch it00:25
so whatever default is00:25
if I pass --whitespace=fix, it ends up changing some line endings to CRLF00:26
j416 blood: what does "git config --get core.whitespace" say?00:29
iam730 left00:29
blood nothing. I checked my .gitconfig and its not in the file00: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 it00:31
blood oh im not applying it to a repo, im just applying it to a folder00: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 bash00:32
sauercrowd joined00:32
Seiya415 joined00:33
j416 I see.00:33
\void left00:34
nurdie joined00: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 joined00:36
iam730 left00:36
j416 at least that's what it does here (macos)00:37
dpyro left00:38
dpyro joined00:39
blood yea it converts LF to CRLF00:39
however I'm not even sure why it complains about these line endings during git apply00:39
nurdie left00: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 CRLF00:41
however if the file being patched is in CRLF format, it applies fine00:41
j416 are you saying it tries to match the target file?00:41
orbyt_ left00:42
blood if the target file has LF endings, it complains because it wants to apply the new lines with CRLF endings00:42
however if the target file has CRLF, it doesn't complain00:42
basically the vanilla folder contains a mixture of files that either contain all LF or all CRLF endings00:43
thiago joined00:43
blood let me try ignoring whitespace too00:43
so if i pass --ignore-whitespace, it still causes line endings to be CRLF in files that are all LF00:45
j416 experimented a bit, didn't get much wiser.00:45
why do you use mixed line endings anyway?00:45
Seiya415 left00:46
blood I don't, oracle delivers the files like this. They have developers on both win/nix00:46
j416 ...00:46
can't you convert them all to something sane?00:46
blood sure but the same issue would happen00:47
if i convert everything to CRLF, wont *nix users have the same issue?00:47
Makaveli7 left00:48
blood I'll just ignore everything and call it a day00:49
thanks for the help!00:50
nurdie joined00:56
manuelschneid3r left00:56
Regon left01:00
nurdie left01:00
z8z left01:00
iam730 joined01:01
iam730 left01:01
jubal_ left01:04
xrexeon joined01:06
xrexeon left01:06
xrexeon joined01:07
hofmann3900 joined01:07
sauercrowd left01:07
xrexeon left01:09
xrexeon joined01:10
iam730 joined01:10
iam730 left01:10
sauercrowd joined01:12
jubal joined01:14
iam730 joined01:15
horribleprogram joined01:15
akushner left01:16
qgTG joined01:18
iam730 left01:18
Cabanossi left01:20
Cabanossi joined01:20
Sasazuka left01:21
fran__ joined01:23
blood left01:24
jubal left01:26
fran__ left01:27
jubal joined01:28
mat001 left01:29
g2anj left01:31
orbyt_ joined01:34
sauercrowd left01:35
g2anj joined01:36
durham left01:38
jubal left01:38
fran__ joined01:39
cdown left01:40
fran__ left01:43
Goplat joined01:45
xrexeon left01:47
Essadon left01:49
jubal joined01:59
rick8024 joined02:00
KnoP left02:01
rick8024KnoP02:01
AfroThundr|main left02:03
Spacew00t left02:08
cdown joined02:11
revoltingPeasant left02:12
downer06 left02:14
downer06 joined02:15
horribleprogram left02:21
finalbeta joined02:23
causasui left02:25
zulutango left02:26
jubal left02:27
jubal_ joined02:27
n3wborn joined02:32
Lunatrius left02:33
Lunatrius joined02:33
zulutango joined02:41
mikecmpbll left02:42
freeman42x left02:47
zulutango left02:47
pi- joined02: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 joined02:53
zulutango joined02:53
fran__ joined02:54
z8z left02:54
duderonomy left02:54
z8z joined02: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 useful02:55
pi- ^ that's my git log02:55
Maybe I should re-clone the repo?02:55
rkazak joined02:55
z8z left02: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 joined02: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 cases02:57
gitk --all or !lol02:57
gitinfo A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all02:57
Hello71 >vim page02:57
damn kids02: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 left02:58
fran__ left02:59
MACscr left02:59
zulutango left02:59
pi- https://paste.pound-python.org/show/tTyyx88nL974aLHg7TTp/03:00
F0rTex left03:00
pi- I would like to set it to Sublime Text03:00
I'll try that now.03:01
F0rTex joined03: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 again03: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 left03:05
thomasross joined03:05
thomasross left03:07
thomasross_ joined03:07
thomasross_thomasross03: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 too03:09
So master and foobranch were probably equal at that point03: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
yeah03: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 them03:10
ketas left03: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 joined03:11
mowcat left03:13
thomasross left03:14
thomasross joined03:15
iam730 joined03:17
jelmer left03:19
jelmer joined03:19
Avizini joined03:21
rkazak left03:21
dreiss joined03: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 kadoban03:21
BenderRodriguez left03: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 left03: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 --all03:23
andyhuzhill joined03:24
pi- !lol03:26
gitinfo A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all03:26
pi- nice03:26
BenderRodriguez joined03:28
blackmesa left03:31
Avizini left03:32
BenderRodriguez left03:33
Avizini joined03:34
veegee joined03:34
jubal joined03:34
TikityTik left03:35
n3wborn left03:36
jubal_ left03:37
TikityTik joined03:37
snowgoggles left03:37
andyhuzhill left03:38
andyhuzhill joined03:39
snowgoggles joined03:40
pi- left03:42
lagothrixGuest1764003:43
Guest17640 left03:43
lagothrix joined03:43
BenderRodriguez joined03:44
Spr0cket left03:45
atrigent left03:48
dreiss left03:52
zulutango joined03:59
yyy left03:59
mobile_c joined04:07
elsheepo joined04:13
mobile_c left04:13
mobile_c joined04:13
andyhuzhill left04:13
andyhuzhill joined04:14
mobile_c left04:15
mobile_c_ joined04:15
metrixx joined04:16
andyhuzhill left04:18
andyhuzhill joined04:19
Spr0cket joined04:19
dreiss joined04:22
troulouliou_div2 joined04:25
mobile_c_ left04:27
dreiss left04:27
mobile_c joined04:29
z8z left04:31
Spr0cket left04:31
TikityTik left04:35
TikityTik joined04:37
Mattiaslndstrm left04:41
orbyt_ left04:44
mobile_c left04:45
Cabanoss- joined04:45
Cabanossi left04:46
jab416171 joined04:48
mat001 joined04:49
m0viefreak left04:51
dpyro left04:55
austin987 left04:57
millerti left05:00
dpyro joined05:01
pks_ joined05:02
Spr0cket joined05:03
pks left05:04
pks_pks05:04
ketas joined05:05
orbyt_ joined05:09
ozcanesen joined05:09
z8z joined05:16
snowgoggles left05:17
SpeakerToMeat left05:18
elsheepo left05:19
iam730 left05:24
cdown left05:25
AfroThundr|main joined05:28
metrixxGuest4139105:30
metrixx_ joined05:30
Guest41391 left05:33
ezio left05:35
paraxial left05:36
paraxial joined05:36
thinkpad left05:37
iam730 joined05:38
iam730 left05:38
cdown joined05:39
thinkpad joined05:44
topdownjimmy left05:53
topdownjimmy joined05:54
duderonomy joined05:55
cd joined05:59
iam730 joined06:00
iam730 left06:02
iam730 joined06:02
oojacoboo left06:02
iam730 left06:04
oojacoboo joined06:04
wEs left06:05
iam730 joined06:05
wesbrown84 joined06:09
iam730 left06:10
kadoban left06:11
GreenJello left06:12
wesbrown84wEs06:12
iam730 joined06:12
andyhuzhill left06:13
andyhuzhill joined06:14
thiago left06:17
oojacoboo left06:20
Cabanoss- left06:20
Cabanossi joined06:20
irqq left06:24
publio left06:26
andyhuzhill left06:28
andyhuzhill joined06:29
troulouliou_div2 left06:31
wildlander left06:31
ezio joined06:35
shentino left06:36
jonsmith1982 joined06:37
wildlander joined06: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 left06:42
sauvin joined06:43
jonsmith1982 nm06:44
czart joined06:45
thiago joined06:50
yqfvwal left06:50
z8z left06:52
KnoP left06:55
GreenJello joined06:56
random_yanek left06:56
KnoP joined06:58
thunderbolt joined06:58
ozcanesen left06:59
raulp left07:00
raulp joined07:01
random_yanek joined07:03
duckonomy joined07:04
thiago left07:05
ozcanesen joined07:07
ozcanesen left07:09
libertyprime joined07:11
plasticle left07:12
duckonomy left07:13
duckonomy joined07:15
errr left07:18
mobile_c joined07:21
finalbeta left07:21
finalbeta joined07:22
akushner left07:28
rsrx joined07:38
plasticle joined07:40
jnewt left07:41
z8z joined07:45
z8z left07:46
atrigent joined07:46
z8z joined07:46
z8z left07:47
z8z joined07:47
errr joined07:55
Goplat left07:59
oojacoboo joined08:03
apoos_maximus joined08:03
apoos_maximus left08:04
apoos_maximus joined08:04
libin_v joined08:05
libin_v left08:05
oojacoboo left08:07
z8z left08:10
kezimo left08:11
kezimo joined08:11
wgrant left08:13
apoos_maximus left08:15
apoos_maximus joined08:16
irqq joined08:17
cdown left08:19
wgrant joined08:20
orbyt_ left08:22
sieve joined08:25
Cmaj6 joined08:26
hellux joined08:26
hellux left08:28
renich left08:28
boshhead left08:29
jonsmith1982 left08:30
boshhead joined08:30
renich joined08:30
xcm left08:31
xcm joined08:32
cswl joined08:34
Silenced joined08:36
mat001 left08:38
leeN joined08:46
manuelschneid3r joined08:48
Avizini left08:49
errr left08:49
andyhuzhill left09:03
andyhuzhill joined09:04
sieve left09:04
apoos_maximus left09:07
andyhuzhill left09:08
andyhuzhill joined09:09
atrigent left09:17
shentino joined09:22
Fernando-Basso joined09:25
shentino left09:25
mobile_c left09:26
plexigras joined09:27
shentino joined09:29
nioncode joined09:29
i7c joined09:29
andyhuzhill left09:33
albel727 left09:39
renich left09:39
estodiMania joined09:43
estodiMania left09:45
blackntan joined09:50
mikecmpbll joined09:56
basiclaser joined09:57
nowhere_man left10:11
Cabanossi left10:12
troyt left10:13
Cabanossi joined10:13
troyt joined10:13
sieve joined10:16
catsup left10:17
catsup joined10:18
chaosruler joined10:18
yyy joined10:18
catsup left10:18
catsup joined10:19
TikityTik left10:21
tango_ left10:42
elsheepo joined10:44
blackmesa joined10:46
tango_ joined10:46
shentino left10:52
fiftysix joined11:03
fiftysix hi11:03
i know enough about git to use it with one branch11:04
but now i modified this guy's project on github and want to open a pull request11: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 joined11:05
fstd_ joined11:07
fstd left11:07
fstd_fstd11:07
netj left11:10
revoltingPeasant left11:10
blackmesa left11:10
netj joined11:10
cswl left11:12
flippo left11:14
swalladge left11:20
Cmaj6 left11:20
dpyro left11:23
Makaveli7 joined11:24
finalbeta1 joined11:27
finalbeta left11:30
ali1234 left11:40
inkbottle joined11:43
Darcidride_ joined11:43
AtumT joined11:44
shentino joined11:46
sauercrowd joined11:48
jngk left11:48
cswl joined11:48
jimmm joined11:49
libertyprime left11:49
ali1234 joined11:51
randominternetus joined11:54
blackmesa joined11:54
irqq left11: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 left12:02
elsheepo left12:02
shentino_ joined12:10
shentino left12:11
Avizini joined12:12
apoos_maximus joined12:13
lucasb joined12:15
Darcidride_ left12:16
dermoth left12:17
apoos_maximus left12:19
apoos_maximus joined12:19
Essadon joined12:19
dermoth joined12:20
shentino_ left12:22
Darcidride_ joined12:27
j416 fiftysix: you don't need to re-clone for that12:27
wootehfoot joined12: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 regularly12:31
kent\n left12: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 good12:32
xrexeon joined12:33
xrexeon left12:33
bn_work left12:34
igemnace left12: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 joined12:41
troyt left12:41
j416 ...yes.12:41
blackmesa left12:42
nowhere_man joined12:43
troyt joined12:44
fiftysix j416, can you tell me what i should read up on? :)12:44
basiclaser left12:47
tomaw left12:49
SuperKaramba joined12: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 think12:49
nedbat fiftysix: are you saying you don't like the state of your code, or the state of your commits?12:49
BenderRodriguez left12:50
j416 !book12: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 !parable12: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 table12:52
but while i'm in the middle of something specific i'd be too antsy to read it12:52
so reading up on reset and push now12:52
j416 fiftysix: that book iis available on amazon, I think12: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_O12:53
j416 nedbat: I get the feeling that he actually wants to understand what happens and not get pre-baked commands..?12:53
jimmm left12:53
fiftysix gonna put it in the shopping basket till birthday i guess12: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_ joined12:55
Avizini left12:57
j416 nedbat: maybe.13:00
blackmesa joined13: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 nod13: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, 4df657013: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 that13:07
fiftysix done.13:07
j416 having things committed makes it easier to get them back in case things go wrong13: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, good13:08
was just going to suggest you make a backup branch but then you've got that covered13: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 to13:08
(the one you just made)13:08
blackntan left13: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 left13:10
fiftysix it told me a bunch of changes that it says are unstaged now13: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: good13:11
fiftysix looks like too little files13:11
hmm13:11
j416 fiftysix: what does 'git log' say?13:11
any of your commits still there?13:12
fiftysix nope13:12
j416 then you're all set13:12
fiftysix i guess i was mistaken13:12
yes13:12
the latest entry in the log is the last commit not made by me but the original author13:12
j416 good13:12
git checkout -b newbranch # this will create and check out a new branch called "newbranch" (call it whatever you prefer)13:12
blackmesa1 joined13:13
fiftysix got one13:13
j416 I assume you are familiar with 'git add' and 'git commit'? Use those to craft your first few commits.13:13
fiftysix yes13: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-picking13:13
fiftysix is a bit of a visual animal13:14
j416 sure, that'll work13:14
fiftysix can i just make three new branches now?13:14
or do i have to finish this one first?13:14
blackmesa left13: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 good13: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 rest13:15
fiftysix k13:15
that'll take a while13:15
j416 as many commits are you like of course13:15
np; I'll be around. highlight me later.13:16
unless you want all up-front, that's fine too13:16
just didn't want to overload with info13: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 joined13:19
gareppa left13:19
inkbottle left13:22
inkbottle joined13: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 left13: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 not13:27
so, the first thing13:27
j416 alright, so they're not related. I'd base both off of master, then.13:27
fiftysix okay13:27
fiftysix walks off to do the second branch13: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 joined13: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 master13:31
branch13: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__ joined13: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_ left13:35
shadowswalker j416: yes, Its in the dev branch, after that I have merge, and now I want to merge again from dev13:37
Ninpo joined13: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 in13:40
Oh, not me13:40
sorry13:40
Soni error: object a7fc765d7baa51f07cc83f0efd5643a61595bf30: zeroPaddedFilemode: contains zero-padded file modes13: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: no13:41
I thought you were talking to me I missed the shadowswalker mention13:41
avizini__ left13:41
Avizini joined13: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 Yes13:42
j416 Ninpo: git checkout pr2-branch && git rebase --onto master pr1-branch13:42
Soni nvm, fixed it with --single-branch and --branch 2.0.x13:42
Ninpo I just managed to find this, would this be correct? https://gist.github.com/iolloyd/4018744c054b223c035ed8233f1ea6ce13:42
Soni (is this a proper way to fix it?)13:42
j416 Soni: what command is that?13:42
Ninpo j416: thank you13:42
Soni git clone13:42
j416: ^13:42
fstd_ joined13:42
fstd left13:43
fstd_fstd13:43
tomaw joined13:44
Ninpo j416: that just tells me pr2-branch is up to date13: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 in13:45
j416 Ninpo: what command did you run?13:45
exactly13:46
Ninpo git checkout exception_fixes && git rebase --onto master setup_fix13:46
j416 and exception_fixes is PR2, setup_fix is PR1?13:46
Ninpo yes13:47
j416 what's in master?13:47
Ninpo setup_fix was branched from master13: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 master13:48
argh13:48
j416 there you go13: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 you13: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 things13:50
j416 that should be fine then13: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 left13: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 that13:53
shadowswalker j416: I don't have any major change in master, It will work successfully in my recent merge in detached HEAD13:53
j416 git checkout master && git reset --hard <commit>13:53
then you can force-push that if you need.13:53
Regon joined13:53
j416 shadowswalker: sure, just think of your peers.13:53
they will have to rebase any branches they based off of the current master13: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 good13:55
fstd left13: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 joined13:57
shentino joined13:58
fstd joined14:01
Ninpo j416: That's sorted it, thank you very much. Tidy git again :)14:02
j416 Ninpo: o/14:03
freeman42x joined14:03
Nixew joined14:06
blackmesa1 left14:06
Silenced left14:06
netj left14:07
netj joined14:07
irqq joined14:12
Copenhagen_Bram left14:15
nowhere_man joined14:18
Revan- left14:18
Revan- joined14: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 follow14:25
profmac left14:27
apoos_maximus left14:28
iam730 left14:28
randominternetus left14:29
czart_ joined14:30
randominternetus joined14:30
randominternetus left14:30
apoos_maximus joined14:31
Ninpo left14:33
czart left14:34
hofmann3900 left14:36
mat001 joined14: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 want14:37
nativetexan joined14:38
nativetexan good morning, anyone around?14:39
j416 nativetexan: 950 people.14:39
profmac joined14:39
nativetexan thank you j41614:39
j416 some away, probably.14:39
nativetexan i have a question about github stuff plz14:40
j416 #github14:40
nativetexan oh ok14:40
i thank you14:40
have a great day14:40
nativetexan left14: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 joined14:41
fiftysix j416, not sure if i understand well enough to phrase properly. let me keep fiddling for a bit.14:42
mowcat joined14:44
sauercrowd left14:45
j416 o/14:46
kjartan left14:47
czart joined14: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 joined14:51
fiftysix my question is: can i make changes to these files now before creating another branch?14:52
czart_ left14:54
jottr joined14:55
pks left14:56
revoltingPeasant joined14:57
shentino_ joined14:57
shentino left14: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 conflicts14: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 left15: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 run15:04
Fernando-Basso left15:05
j416 it'll all become clearer once you've read through some docs and gotten some more practice15:05
everything's just about poking at the commit graph in various ways to get it to look right15: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/2atNaSO15:14
j416 fiftysix: git refuses to checkout master because doing so would mean it would have to merge those files to get the right state15:20
it can't simply irreversibly "float" the changes over15: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 related15:21
maybe on the first branch you committed no partial files15:21
fiftysix on the first branch i only committed files that are in an entirely different subdir.15:22
troulouliou_div2 joined15:22
diegoaguilar joined15: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 left15: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 left15:25
_xor left15:27
Cabanossi left15:28
j416 yes, don't do that15: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 left15:30
fiftysix no15:30
no commits15:30
just unstaged/uncommited changes15:31
VladGh joined15:31
fiftysix but still getting the message from the screenshot i linked15:31
Copenhagen_Bram joined15:33
Darcidride_ left15:33
rkazak joined15:37
pks joined15:37
Darcidride_ joined15:37
sauercrowd joined15:37
fiftysix j416,15:37
j416 only commits are "on branches"15:38
Copenhagen_Bram left15:38
j416 uncommitted changes are not tied to any branch15:38
fiftysix i see, sorry for the wrong use of terminology in that case15:38
but then i understand that screenshot even less15: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 screenshot15:39
fiftysix some of them15:39
Copenhagen_Bram joined15: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 pop15:40
another way would be to commit them and then cherry-pick that commit15:40
git add .15:41
er, enter too fast15:41
fiftysix oh wait15: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 theotherbranch15:41
yyy left15: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 joined15: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 safe15: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 master15:46
fiftysix nono15:46
after that screenshot, i "git reset" again and deleted that branch15: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 :D15: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 work15:47
Copenhagen_Bram left15:47
fiftysix the whole word of "to stash" sends shivers down my spine, i think that's why i never used "git stash" before15:48
but well, i got a copy15:48
j416 does "commit" send less shivers?15:48
fiftysix yes :)15:48
j416 we can skip stash completely.15:48
fiftysix it sounds friendly15:48
non-native-speaker problems perhaps15:48
j416 (stash actually make a commit but you can't see it as easily)15:48
fiftysix oh15:49
Copenhagen_Bram joined15: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 left15:49
mizu_no_oto joined15:50
nowhere_man left15: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 twice15:53
so I'd avoid it for that reason.15:53
Copenhagen_Bram left15:54
fiftysix hmm15:54
that's what i'm trying to do15:54
branch by branch15:55
it worked for the first one15:55
then i tried again15:55
and the result was that screenshot (which i undid)15:55
mobile_c left15:55
wEssBRowN84 joined15:55
nowhere_man joined15: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 joined15:56
novum joined15:57
novumnovumsensum15:57
novumsensumnovum15:57
wEsGuest2748215:58
wEssBRowN84wEs15:58
j416 fiftysix: stash or commit like I wrote above15:58
Guest27482 left15: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 see15: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 no16:00
fiftysix scratches his head16:00
j416 forget stash for now maybe16:00
think of stash as something very similar to commit16:01
and then read up on it later; we can manage without stash16:01
fiftysix okay16:01
beefjoe joined16:02
j416 what state are you in now?16:03
fstd_ joined16: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 master16:06
j416 the one in the screenshot16:06
fiftysix oh16:06
wait16:06
j416 you must have run 'git reset' at some point16:06
fiftysix yes16: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 userdefs16:07
fstd left16:07
fstd_fstd16:07
j416 ok16:10
fiftysix: I think the easiest would be to just go back to where you were at in the screenshot and continue from there16:10
kapil____ joined16:10
j416 sorry for the slow response times; I'm juggling conversations in multiple channels at the moment16:11
fiftysix: git checkout -b userdefs ecd078616: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 left16:14
fstd left16:15
j416 fiftysix: it's where your branch was before you killed it16: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 fail16:17
can't do it in one command16:17
fiftysix good thing i didn't do anything yet :P16:17
j416 it would have just erred out16:17
fiftysix based on what you said before16: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 ecd078616:18
two steps.16:18
fiftysix okay, let me try16:18
done.16:19
dpyro joined16:19
fiftysix j416, https://i.imgur.com/sLDeHzw.png16:20
j416 fiftysix: exactly16:20
now you're at where you were a moment ago16:21
makes sense?16:21
fiftysix yes, 5 by 516:21
j416 not sure what that means but I assume it means something good. :D16:21
ok, next step16: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 community16:22
j416 ah16:22
there are various ways; I'd do it slightly differently but but let's keep it simple for now16:22
fiftysix okay16: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 okay16:23
so git add .; git commit -a -m wip16:23
done16: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 .gitignore16:25
oh waaaaaaaaait that branch doesn't have a .gitignore file16:25
j416 do you care about that file?16:25
fiftysix yeah, i care about it not being in git16:25
j416 right16:25
thiago joined16: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 joined16:27
j416 that I know16: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 branch16:27
fiftysix yes exactly16:27
creating a .gitignore file is part of the things i do in the userdefs branch16:27
j416 alright; then either just leave it or remove it manually; whichever you prefer16:28
fiftysix okay16:28
j416 (there's a command for this called 'git clean', useful to know for the future but overkill for now)16:28
fiftysix okay16:28
j416 clean slate?16:29
fiftysix i've moved that file to /tmp, so yeah, clean slate16:29
j416 git cherry-pick userdefs16:29
fiftysix j416, https://i.imgur.com/fIjWWm7.png16:30
j416 alright, no problem16:30
fiftysix better screenshot: https://i.imgur.com/2Owh72v.png16:30
j416 'git status' will show you which files are in conflict16:30
nice, just one16:30
edit that one to fix the conflict16:31
fstd left16: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 there16:31
fiftysix okay16:31
j416 i.e. the ones in commit userdefs^16:31
fiftysix it's just one chunk16:31
j416 good good16:31
yyy joined16:32
fiftysix chunk is removed16:32
atrigent joined16: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 bit16:32
?16:32
fiftysix nnnnnnnnnnnnot too much tho16:32
j416 alright16:32
make sure all the conflict markers are gone and that the file resembles what you want16:32
fiftysix i mean, i sort-of understand what just happened and why i had to remove that chunk16:32
it does now16:33
j416 if it does then it's fine16:33
it should be a normal file that would compile16: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 equivalent16:33
fiftysix okay, it wants me to commit.16:34
j416 do it16:34
fiftysix i'll just keep the message "wip"16:34
j416 yes16:34
fiftysix done16:34
git seems happy16:34
clean slate16: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 k16: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 commits16: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 left16:35
j416 and userdefs has a commit that you don't need16:35
fiftysix aye to the first sentence16:35
aaand aye to the second16:36
j416 so maybe go cleanup the userdefs branch to get that out of the way16:36
troyt joined16:36
j416 git checkout userdefs && git reset --hard HEAD^16:36
should do it16:36
fiftysix yes, it did16:36
j416 git checkout tempcomp16: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 more16:37
j416 yes, except now based off of master16: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 concepts16: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 problems16:38
j416 alright16:38
o/16:38
nowhere_man left16:39
Cabanossi joined16:44
alyptik joined16:44
TikityTik joined16:44
agowa338 joined16:46
nowhere_man joined16:47
revoltingPeasant left16:49
beefjoe left16:50
kerframil left16:53
n3wborn joined16:59
mizu_no_oto left16:59
fission6 joined17:00
revoltingPeasant joined17:01
martin-_-_ joined17:06
martin-_-_ hi17: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 repository17:08
is that even doable with git?17:08
thiago Soni: git gc17: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(?) objects17:10
martin-_-_ thiago history would be ok for me17:10
Soni even with --aggressive17:10
I'm supposed to only have 1 branch17:10
gareppa joined17: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 -l17:12
Mattiaslndstrm joined17:12
martin-_-_ you mean I need to split my current repository?17:12
j416 Soni: then whatever to count files17:13
thiago martin-_-_: you'd delete those two dirs from your regular repository and then reimport them as a git submodule17:13
Soni 3230 commits17:13
idk how to count files17:13
martin-_-_ ah okay thiago17:13
Soni I guess find can do it17:13
j416 yes17:13
Soni but idk how to use find17:13
j416 doesn't really matter, just estimate17:13
is it 5 files?17:13
500?17:13
5 million?17:13
thiago Soni: expire ethe reflog, then git repack -a -d -f17:13
Soni: this is the best you can do. It will remove any unreferenced object.17:14
j416 thiago: I believe he just cloned it17:14
thiago oh17:14
Soni 350?17:14
I'm a they17:14
thiago then you already have the smallest number of files17:14
Soni and yeah I just cloned it17:14
thiago if your server didn't pack properly, then you can compress further, but it won't delete anything.17:14
gareppa left17: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 history17: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 objects17:15
Soni well it's github so it probably didn't pack properly, it never does anything properly17:15
apoos_maximus joined17:15
thiago martin-_-_: your old (private) history is still there, of course17:15
m0viefreak joined17: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 -f17:15
j416 like thiago suggests you can try to use repack17:15
martin-_-_ thiago do you have a online guide for my plan?17:15
Soni that seems to have done nothing17:15
guess it's just this big17:16
thiago martin-_-_: no, this isn't a common activity17:16
Bobdude joined17: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 repo17: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 submodule17:16
martin-_-_ thanks thiago17:17
thiago martin-_-_: hint: usually, when publishing old proprietary content, you don't publish history17:17
SJr left17:17
ezio left17:17
Soni 10 MB :(17:18
(as seen by git push)17:18
sauercrowd left17:18
SJr joined17:19
iNCoNFuN joined17:20
thiago wonders if anyone has considered using zstd for compression in git, instead of (or in addition to) zlib17:22
cdown joined17:24
mizu_no_oto joined17:25
Cabanossi left17:25
revoltingPeasant left17:26
troulouliou_dev joined17:28
metrixx joined17:30
metrixx_ left17:33
j416 Soni: doesn't seem particularly large?17:34
iNCoNFuN left17:34
Soni okay17:34
ali1234 left17:35
Soni it does have plenty of images17:35
ali1234 joined17:35
Soni they're .gif17:35
all of them17:35
n3wborn left17:37
R2robot left17:37
kusmario_ left17:37
kusmario joined17:38
Soni eh w/e17:39
R2robot joined17:42
raffo left17:42
horribleprogram joined17:48
horribleprogram I'm stopping all development work until every project is a git project17:48
_ikke_ horribleprogram: nice for you17:50
mizu_no_oto left17:53
horribleprogram _ikke_: well it comes from necessity17:53
akushner joined17:58
Goplat joined18:01
revoltingPeasant joined18:01
thiago hates when he finds out that a project he's packaging is hosted in mercurial18:02
Inline left18:04
Inline joined18:04
raffo joined18:05
inkbottle left18:07
horribleprogram thiago: what is "packaging", who is "hosting in mercurial"18:10
_ikke_ horribleprogram: most likely distro packages18:10
like deb / rpm / apk18:10
horribleprogram _ikke_: Interesting, I never thought about how deb repos are stored18:11
_ikke_ That's something seperate18:12
horribleprogram that's deep and requires some pretty advanced concepts to understand.18:12
_ikke_ This is mostly a matter of getting the source18:12
horribleprogram _ikke_: ahhh18:12
aw1 joined18:14
Khisanth left18:14
Darcidride_ left18:16
alyptik left18:18
Darcidride_ joined18:19
iNCoNFuN joined18:22
kapil____ left18:23
rkazak left18:27
sauercrowd joined18:28
Khisanth joined18:28
horribleprogram left18:39
czart left18:42
iam730 joined18:45
SuperKaramba left18:45
sauercrowd left18:46
BenderRodriguez joined18:47
iNCoNFuN left18:52
orbyt_ joined18: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 left18: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.html18:59
kjartan left18:59
cd left19: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_ left19:01
ngui_ joined19:01
cfoch joined19:02
Darcidride_ joined19:03
kjartan joined19:03
ngui left19:04
ngui_ngui19:04
sauercrowd joined19:04
fiftysix oooooooooh my god19:10
orbyt_ left19:10
blackmesa1 joined19: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_ joined19:11
Darcidride_ left19:12
filcab left19:13
sauercrowd left19:14
filcab joined19:14
Darcidride_ joined19:14
sauercrowd joined19:14
j416 fiftysix: if they depend on each other, that's tricky yes19:16
make on PR at a time or just make one PR, maybe19:16
dunno19:16
ask the maintainer what that person prefers19:16
I always try to avoid merging things that are not based on the tip of the branch, when possible19:17
also, just because Git says everything merges fine, that doesn't mean it will actually work19:17
syntactically it might have merged fine, but that is not to say that semantially it's off19:18
fiftysix omg you're right19:18
it's not compiling19:18
what have i done19:18
treehug88 joined19: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 lying19:19
j416 read up on it.19:19
fiftysix don't worry j41619:19
i might just fix this the old-fashioned way19:19
(like lying as in, the amount of mental effort required to juggle it all and keep the construct intact)19:19
ali1234 left19:22
ali1234 joined19:22
Rboreal_Frippery joined19:25
Darcidride_ left19:26
revoltingPeasant left19: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 joined19:28
YuGiOhJCJ left19:29
revoltingPeasant joined19:30
apoos_maximus left19:31
cswl left19:32
jottr_ joined19:34
_ikke_ man git revert19:34
gitinfo the git-revert manpage is available at https://gitirc.eu/git-revert.html19:34
jottr left19:34
fstd joined19:37
moritz if you have many commits that you want to undo, you can also do git reset --soft a19:37
and then commit19:37
navidr joined19:38
sauercrowd left19:39
kadoban joined19:39
jottr_ left19:40
sjoshi left19:40
sauercrowd joined19:40
ferdna joined19:42
revoltingPeasant left19:42
jottr_ joined19:42
mona_x left19:42
Regon left19:42
Regon joined19:43
boombatower joined19:50
fission6 left19:51
Phylock joined19:58
boombatower left20:01
boombatower joined20:03
yyy left20:06
sieve left20:07
boombatower left20:11
boombatower joined20:11
jottr_jottr20:19
blackmesa1 left20:21
mattcen left20:21
mattcen joined20:25
dex1983 left20:25
energizer joined20:28
grawity Rboreal_Frippery: `git checkout a . && git commit`20:30
dege joined20:31
flying_sausages left20:32
energizer how do i checkout the branch that has these pull request commits? https://github.com/PyCQA/pylint/pull/165520:35
h1d joined20:37
h1d left20:37
libertyprime joined20:37
j416 energizer: did you make the PR?20:37
(do you have the branch?)20:38
moritz grawity: doesn't work for additions/deletions20:38
energizer j416: no it's not me20:40
j416 energizer: find the latest commit of it, check out that to a new branch20:40
martin-_-_ left20:40
moritz https://stackoverflow.com/questions/14947789/github-clone-from-pull-request20:40
energizer ah answer seems to be `git fetch origin pull/1655/head:desired_local_branch_name`20:41
thanks20:42
mattcen left20:42
_ikke_ sounds about right20:45
mattcen joined20:47
energizer hm i'm not sure i got the right thing20: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 out20:55
fatal: bad revision 'b56d973'20:55
rewt b56d973 is in the voyages-sncf-technologies repo20:55
which is a fork of the repo you're looking at20: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 that20:57
right, there's a new commit created, which is a different hash20:57
energizer can i add the github fork as a branch in git?20:58
_ikke_ a fork is an entire repository20:58
it has multiple branches20:58
manuelschneid3r left20: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 it20:59
energizer ok i'll try that20:59
mattcen left21:00
cybrNaut joined21:01
figurehe4d joined21:02
mattcen joined21:02
\void joined21:05
manuelschneid3r joined21:08
figurehe4d left21:09
dpyro left21: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..11101f130353bcb2a43f04e3b5bc366ac50b261621:10
dpyro joined21:10
energizer git checkout 60a830731b4494bb6aee0473a9e12d3800368ca5 says 'reference is not a tree'21:11
wootehfoot left21:11
ali1234 so a quirk of how github works is that commits don't actually have to exist in the repository21:14
so 60a... must be from some other fork21:14
dustinm joined21:14
dpyro left21:15
ali1234 neither of them in the voyages-sncf-technologies repo either21:18
energizer: where did you find those references?21:19
btree_ left21:19
dpyro joined21:20
wootehfoot joined21:20
energizer ali1234: https://github.com/PyCQA/pylint/pull/1655#issuecomment-33611819821:21
elsheepo joined21:24
ali1234 energizer: you can fetch the pull request directly21:24
ferdna left21:24
ali1234 git fetch origin pull/1655/head:foo; git checkout foo21:25
those references don't even exist in the pull request, but maybe that does not matter21:25
energizer ali1234: how do i check out the 60a8 commit?21:26
ali1234 i don't know... it doesn't seem to exist21:26
energizer but github is showing it in the web ui ^21:27
ali1234 that doesn't mean much21:27
sauercrowd left21:27
energizer i think it's showing the actual content of the files on the left hand side of that compare/ page21:28
ali1234 it's comparing two trees21: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 ids21:31
when you force push the old commits aren't exactly deleted... but they are unconnected and get garbage collected later21:32
mattcen left21:33
energizer i see. thanks21:33
ali1234 with a "normal" git server you can ask for arbitrary object ids but github doesnt support this21:34
libertyprime left21:34
ali1234 you can also see https://github.com/PyCQA/pylint/commit/60a830731b4494bb6aee0473a9e12d3800368ca521:35
even though that commit doesn't exist when you clone21:35
flying_sausages joined21:36
JanC left21: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 above21:38
at least it has the same commit message21:38
JanC joined21:40
mattcen joined21:41
boombatower left21:41
Mattiaslndstrm left21:43
iloop joined21:43
sieve joined21:54
sieve left21: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 work22: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 it22:05
ali1234: where's one you've seen ot work?22:06
nilshi joined22: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.html22:07
ali1234 hmm hang on let me check22: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 last22:08
resort)22:08
j416 ali1234: any ref, such as a branch22:08
nilshi s/part/port22: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 submodules22:09
you can still fetch them if they are not the tip of a branch or tagged22:09
except not on github22:09
yyy joined22: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 ref22:11
ali1234 i'm not sure and i can't remember the syntax to do it22: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 this22:11
...is a guess?22:11
ali1234 yes22: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 yes22:12
mattcen left22: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 successfully22:15
if the submodule is on github that is22:15
rick8024 joined22:16
mattcen joined22:17
KnoP left22:17
rick8024KnoP22:17
ali1234 j416: so apparently this is all configurable22:22
j416 where is it configurable?22:22
on github?22:22
ali1234 no in git22:22
j416 ah.22:22
ali1234 there are options uploadpack.allowTipSHA1InWant, uploadpack.allowReachableSHA1InWant, or uploadpack.allowAnySHA1InWant22:23
they do exactly what they say :)22:23
_ikke_ Depends on your interpretation of what they say :P22:24
mattcen left22:25
m1m0 joined22:26
math-alpha joined22:28
mattcen joined22: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 well22:30
navidr left22:31
blackmesa1 joined22:31
j416 ali1234: I didn't know this was configurable. til; thanks!22:32
fstd left22:32
fstd joined22:33
math-alpha left22:35
ghost43 left22:37
ghost43 joined22:37
Nixew left22:39
m0viefreak left22:40
math-alpha joined22:40
plexigras left22:44
m0viefreak joined22:47
ekleog left22:48
nilshi does git clone honor DNS SVR ports?22:52
ekleog joined22:52
Zexaron joined22:52
nilshi it doesn't seem like it. which is sad22:57
blackmesa1 left23:03
mattcen left23:04
swalladge joined23:09
mattcen joined23:11
kjartan left23:11
iloop left23:12
iloop joined23:13
snowgoggles joined23:14
kjartan joined23:14
elsheepo left23:16
libertyprime joined23:21
blackmesa1 joined23:22
atrigent left23:23
blackmesa joined23:25
libertyprime left23:26
blackmesa1 left23:27
fiftysix left23:31
m0viefreak left23:31
m0viefreak joined23:33
paraxial left23:36
wootehfoot left23:37
irqq left23:38
dpyro left23:39
dpyro_ joined23:39
Phylock left23:40
dpyro_ left23:40
revoltingPeasant joined23:40
dpyro joined23:42
m0viefreak left23:49
libertyprime joined23:52
yyy left23:55
jottr left23:57

Logs Search ←Prev date Next date→ Channels Documentation