IRCloggy #git 2019-11-21

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-11-21

fphilipe joined00:00
uniquerockrz left00:01
khisanth__ joined00:01
fphilipe left00:05
uniquerockrz joined00:10
ExeciN joined00:11
bvdw left00:11
Brainium joined00:11
bvdw joined00:12
jayjo I have a branch that is 10 commits ahead of master and 275 commits behind. I'm looking at merge vs rebase here. When I try to merge master into my feature branch, to get my feature branch caught up to the current master, this requires a commit that will change every file changed in those 275 commits. (Am I right on this so far?) Rebase will place the 10 commits after the 275 by rewriting the feature branch's00:12
git history. Is that right?00:12
Should rebase be used if master changes rapidly? And merge otherwise? Or is there a better rule?00:13
cliluw left00:15
xcm left00:21
xcm joined00:23
monr0e left00:26
uniquerockrz left00:26
justan0theruserjustanotheruser00:28
dilfridge joined00:29
jstimm joined00:30
uniquerockrz joined00:31
leeN left00:32
n3wborn left00:34
cliluw joined00:34
Stoot joined00:34
ExeciN left00:35
caveman if git repo rebased, how should normal devs sync the rebase? should they just re-clone?00:44
DIDAVISION left00:49
uniquerockrz left00:51
akemhp joined00:52
altendky joined00:53
xcm left00:57
xcm joined00:58
uniquerockrz joined01:00
mat001_ left01:04
yawkat left01:04
royal_screwup21 left01:05
yawkat joined01:07
royal_screwup21 joined01:10
royal_screwup21 left01:11
yawkat left01:11
ChanServ set mode: +o01:12
uniquerockrz left01:12
Eugene changed the topic to: Welcome to #git | First visit? https://gitirc.eu | Current stable version: 2.24.0 | Getting "cannot send to channel"? /msg gitinfo .voice | This channel is logged: https://gitirc.eu/log | Now with more indirect cycling giraffes!01:12
Eugene kicked Eugene (de-op)01:12
Eugene joined01:12
orbyt_ joined01:12
xcm left01:15
xcm joined01:16
m0viefreak left01:23
uniquerockrz joined01:23
bambanx joined01:24
eamanu314 joined01:25
yawkat joined01:27
jayjo caveman: https://www.atlassian.com/git/tutorials/merging-vs-rebasing#the-golden-rule-of-rebasing I think it should all work as normal as long as you're not rebasing master branches01:28
boombatower left01:29
thebope joined01:30
jayjo just happen to be studying the same thing you're looking into. Not an expert01:30
zettelding left01:32
m1dnight_ left01:32
mowcat left01:32
m1dnight_ joined01:32
uniquerockrz left01:34
thebope left01:37
bambanx left01:39
uniquerockrz joined01:40
thebope joined01:40
deadlysin joined01:41
Dirak git merge master doesn't matter though when you squash and merge to master01:45
orbyt_ left01:46
Goplat joined01:47
iam730 joined01:51
Xiti joined01:53
xcm left01:54
xcm joined01:55
jstimm left01:56
Sasazuka left01:59
localhorse left02:00
xcm left02:03
mat001 joined02:03
soju joined02:04
zettelding joined02:08
eamanu314 left02:09
xcm joined02:11
akemhp left02:13
niki left02:17
niki joined02:18
KnoP left02:19
mat001 left02:20
uniquerockrz left02:22
omnireq joined02:22
xcm left02:24
xcm joined02:25
thebope left02:26
thebope joined02:27
thebope left02:28
thebope joined02:28
uniquerockrz joined02:31
josvuk left02:32
jayjo Dirak: rebase + squash and merge to master should be the same as just merging to master, right?02:33
rebase just translates all the commits, squash puts them into one. That should be the same thing as merging, right?02:35
except the merge will retain the actual commits on the branch, where the rebase + squash will just have one commit02:36
raymond joined02:38
Dirak left02:41
xcm left02:43
xcm joined02:43
F0rTex left02:44
F0rTex joined02:45
Atlenohen left02:48
uniquerockrz left02:48
vicfred left02:52
nuc joined02:53
vdamewood joined02:56
crose left02:56
uniquerockrz joined02:57
altendky left03:03
Lucas_Gray joined03:03
Brainium left03:05
salamanderrake left03:06
g00s joined03:10
uniquerockrz left03:12
snackoverflow joined03:13
snackoverflow how can i merge a pull request from the project I forked03:13
Dirak joined03:13
Wryhder joined03:17
Lucas_Gray left03:19
WryhderLucas_Gray03:19
uniquerockrz joined03:19
omnireq left03:19
jayjo snackoverflow: you want to put your changes in the project you forked back into the orignal project?03:19
snackoverflow no03:20
jayjo: there are new pull requests in the original project. i want to merge those pull requests into my fork03:20
lagothrix left03:20
lagothrix joined03:20
jayjo I think you have two options. You can change all the files in your current branch (or current fork) with a merge operation. That will change all the files that have been modified in one commit that pulls your projects into line. Or you can rebase, which keeps your commits in tact, and places all of the masters commits behind yours on your current branch. This is a good resource:03:22
https://www.atlassian.com/git/tutorials/merging-vs-rebasing03:22
Cabanossi left03:22
orbyt_ joined03:23
vdamewood snackoverflow: One option is to add the third developer's repo as a remote, fetch from it, then merge the branch on the PR into a local branch.03:23
zettelding left03:24
jayjo vdamewood: that would still end in a new commit on the branch, wouldn't it?03:24
snackoverflow vdamewood: would that be, git remote add newbranch [branch url] , then git fetch, then what?03:24
Cabanossi joined03:24
snackoverflow git merge?03:24
vdamewood jayjo: snackoverflow didn't specify that that was undesirable.03:25
snackoverflow yea new commits are fine03:25
z|bandito left03:26
snackoverflow jayjo: can you please answer my new question03:26
vdamewood jayjo: You don't add remote branches, you add remote repositories, and the remote repositories have branches. So, you would git remote add <remote name> <repo URL>.03:27
oops, sorry. snackoverflow ^03:28
snackoverflow oh i meant [repo url]03:29
vdamewood So, yeah.03:29
snackoverflow i had more questions03:29
git fetch then git merge?03:29
git fetch [branchname]?03:29
vdamewood: hello?03:30
mgedmin joined03:31
vdamewood snackoverflow: Yes, you can do it that. [branchname] is optional. You'll fetch every branch and tag if you leave it off.03:31
s/it that/it that way/03:31
snackoverflow vdamewood: "already up to date"03:32
BonusPlay left03:32
snackoverflow ?03:32
BonusPlay joined03:32
snackoverflow i did git remote add reponame, git fetch, git merge, and got "already up to date"03:32
vdamewood: ^03:32
vdamewood did you do 'git merge' or 'git merge <something here>'?03:33
snackoverflow just git merge03:33
i tried again and did git fetch [name] and i got a different response03:33
vdamewood That merges whatever's in the branch that the local branch is tracking. you need to specify something like git merge remote-repo/branch-name.03:33
snackoverflow remote: Enumerating objects: 31, done.03:33
remote: Counting objects: 100% (31/31), done.03:33
remote: Compressing objects: 100% (7/7), done.03:33
remote: Total 25 (delta 18), reused 25 (delta 18), pack-reused 003:33
Unpacking objects: 100% (25/25), done.03:33
From https://github.com/kevinclark/deepsteg03:33
* [new branch] master -> kc/master03:33
looks like it did absolutely nothing03:34
vdamewood Oh yeah, and when fetching you need to specify either the remote repo, or --all.03:34
In most cases there's a default that git will select when you take data from somewhere. For example, if you do a simple git clone, it sets up an 'origin' remote, and that remote is set as your default remote to fetch from.03:35
... in the case of branches, they can have remote branches they track, so when you get a git merge or git pull, they automatically select that particular remote branch.03:36
s/you get a/you do a/03:36
snackoverflow i got it to perform the desired behavior03:36
shan joined03:37
vdamewood Yay!03:37
Hello71 left03:38
beastDiv_ joined03:39
altendky joined03:41
salamanderrake joined03:43
Hello71 joined03:43
glosoli joined03:47
neoncontrails left03:54
uniquerockrz left04:02
duderonomy joined04:02
rustyshackleford joined04:05
uniquerockrz joined04:09
dartmouthed joined04:18
glosoli left04:19
dmc left04:19
uniquerockrz left04:24
vicfred joined04:26
uniquerockrz joined04:29
greatgatsby left04:29
greatgatsby joined04:30
vicfred left04:32
snackoverflow left04:33
dmc joined04:35
orbyt_ left04:38
uniquerockrz left04:45
deadlysin left04:46
comptroller left04:49
uniquerockrz joined04:51
cthulchu left04:52
fxrs left04:53
macaronus joined04:54
fxrs joined04:56
comptroller joined04:59
pks_ joined05:01
pks left05:03
pks_pks05:03
errr joined05:06
uniquerockrz left05:09
niki left05:12
zlogan left05:13
cbreak left05:14
cbreak joined05:16
Cabanossi left05:21
Lucas_Gray left05:22
uniquerockrz joined05:23
BeerLover joined05:26
MoziM joined05:26
rardiol left05:27
donofrio left05:31
uniquerockrz left05:31
Cabanossi joined05:33
justanotheruser left05:33
fflam joined05:35
uniquerockrz joined05:37
BeerLover left05:42
vdamewood left05:44
beastDiv_ left05:48
mat001 joined05:49
Nazral joined05:51
Nazral Hi05:51
I noticed that when I use rebase and rewrite a commit, the id changes, so I am wondering if the original version of the commit is saved somewhere ?05:54
uniquerockrz left05:57
Forkk joined05:59
justanotheruser joined06:00
altendky left06:01
ferdna left06:04
uniquerockrz joined06:04
podlech joined06:05
glosoli joined06:09
rjstone Anyone familiar with github actions?06:11
I'm trying to use one of the webhook environment variable things and it isn't working06:11
because they don't provide examples06:11
bvdw left06:11
rjstone I'm trying to do something like this artifact\papyrus-lang-test-${{ github.event.push.created_at }}.vsix06:11
but github.event.created_at and github.event.push.created_at don't work06:12
docs are unclear and don't make sense06:12
bvdw joined06:12
fphilipe joined06:13
kleisli left06:13
podlech left06:14
fphilipe left06:18
thomasross left06:19
rjstone I think I finally figured it out. github.event.repository.pushed_at is what I needed06:19
g00s left06:21
zlogan joined06:21
thomasross joined06:22
salamanderrake left06:23
uniquerockrz left06:23
takyashi joined06:26
Raging_Hog left06:28
thomasross left06:29
thomasross joined06:30
uniquerockrz joined06:34
mat001 left06:38
thiago joined06:39
SwiftMatt joined06:42
uniquerockrz left06:44
thiago left06:45
Arguggi joined06:47
thiago joined06:49
fphilipe joined06:50
uniquerockrz joined06:53
thiago left06:54
thiago joined06:59
shan left07:00
osse Nazral: the original commit is still laying around on disk. git will remove it eventually07:00
Inline left07:02
uniquerockrz left07:08
uniquerockrz joined07:13
kleisli joined07:14
thiago left07:14
Goplat left07:14
lundman joined07:17
lundman Hello, quick question: is it possible to get git clone to stop when it encounters an error, and not do the cleanup deltree ?07:18
rfuentess joined07:18
Noti joined07:19
kleisli left07:20
SwiftMatt left07:22
glosoli left07:25
dionysus69 joined07:26
SwiftMatt joined07:26
takyashi left07:27
glosoli joined07:28
SwiftMatt left07:29
uniquerockrz left07:30
sauvin joined07:30
skylite ould someone explain to me a bit more clear why am I seeing the following message after a merge? branch ahead of 'origin/master' by 2 commits -- I am a bit confused about why it says two commits where it only is really just one commit07:33
osse git log origin/master..master07:34
skylite osse: what does this command show?07:35
uniquerockrz joined07:35
osse the two commits07:35
skylite ok and why does it show two instead of one07:35
osse I don't know07:35
Moongoodboy Hmm, I would've thought that showing the log would make it clear why there are two07:36
osse That's impossible for me to tell.07:36
Judging by your discussion with _ikke_ earlier I guess the other commit is a merge07:36
n3wborn joined07:36
skylite my understanding is that if I merge, one new commit will be created.07:38
osse my guess is you made one commit, then pulled because git told you to. that produced a merge commit. now you have two commits07:38
skylite I'll try that out07:39
osse Now I mean I guess that is what has happened07:39
*No07:39
But sure, try it out. But it depends on there being some new commit one the remote so that a merge is necessary07:40
Heirlung left07:40
skylite no it still says ahead.. by 2 commits07:41
osse You misunderstood be07:41
skylite I fetched the other branch from master so the two branches are downloaded compleatly and then did the merge07:41
osse me07:42
skylite *from origin07:42
clemons left07:44
osse Did you create one commit and then do a merge?07:44
Because that explains why there are two commits07:45
skylite yes I did create one commit before doing the merge07:45
let me test again07:45
osse Then that is the reason there are two commits07:46
skylite aha!07:48
but it's still strange because when I create the commit before the merge, I also pushed that commit to origin07:48
osse That sounds very unlikely07:49
it sounds like the push failed07:49
Heirlung joined07:49
osse The reason for a merge like is that the remote has commits you don't. And as it happens that is the same reason why a push might fail.07:50
Paradisee joined07:51
lundman left07:52
skylite this is the scenario: A and B clones the same repo. A starts working on dev branch with one commit, B starts working on test branch with one commit. Both commits are pushed to origin. Then B merges test branch with dev branch. And the status after the merge is: "ahead.. by 2 commits"07:53
thiago joined07:55
skylite osse: what do you think?07:55
osse sounds correct07:56
uniquerockrz left07:56
skylite and in this scenario why does it says 2 commits instead of one?07:56
SwiftMatt joined07:57
osse B made a commit and then made a merge commit07:58
skylite but the commit was pushed to origin before doing the merge commit O_O07:59
causasui left07:59
osse ah missed that part08:00
SteffanW joined08:00
to1ne left08:01
osse it could still say 2 commits because of the merge commit + the commit on the test branch08:01
Noti left08:01
osse Actually, it could say ahead by any number of commits. depends on how many commits A made on the other branch08:01
skylite "because of the merge commit + the commit on the test branch" -> even when the commit on the test branch is already on origin? :O08:02
BeerLover joined08:02
osse yes08:02
skylite that sounds confusing :/08:03
osse what git status is comparing is the commits on B's local dev branch and the dev branch on origin08:03
Doesn't matter whether test is pushed to origin or not08:03
chele joined08:04
feriman joined08:06
skylite but if that's the case then when B fetches the dev branch compleatly, (i.e show-ref dev displays the same hash for local and origin) and THEN does the merge, it should not say "ahead.. by 2 commits" and yet it does08:06
osse Why not?08:07
B is merging in stuff that is not present on origin/dev08:07
thiago left08:08
skylite so if after the merge B does a git push, is there going to be two new commits created or one?08:10
TomyWork joined08:10
osse the commits have already been created08:10
but they will be pushed, yes08:10
uniquerockrz joined08:11
osse http://sprunge.us/uhkoqN08:13
SwiftMatt left08:14
skylite so its practically two commits but they will have the same hash on both branches?08:14
osse I don't understand the question08:15
Branches are intertwined and share commits08:15
it's like a web.08:15
skylite ok so actually on your link I do not se 2 new commits after the merge only one :/08:18
uniquerockrz left08:20
osse In b08:23
In my graph there is an unknown number of new commits08:24
ilmostro left08:24
osse skylite: https://imgur.com/a/zC5NX1708:27
uniquerockrz joined08:27
osse skylite: is if you start from the point that says "dev" and walk backwards all those in the green can be found along the way. Thus they are now part of the dev branch, in Git terms08:28
oxymoron93 joined08:28
osse Those count08:28
skylite aha!!!08:29
fphilipe left08:29
skylite no08:30
I just modified the scenario so now B creates 6 new commits on the test branch. pushes those to origin, and THEN, after doing a merge, it still says "ahead.. by 2 commits" =( I would expect it says ahead by 7 commits right?08:32
makaveli7 joined08:34
skylite oh no its not the commits on the test branch, but the commits on the dev branch that count!08:38
I just did the same thing but the other way around and now it shows ahead of 708:38
so the "extra" is from the branch I am merging into!08:38
wow I dont belive how many repos I had to create to understand this :D08:39
uniquerockrz left08:41
osse Woohoo!08:41
cdunklau skylite: git is magic08:42
i've re-read swaths of the git book probably a dozen times, and every time without fail i learn something new08:43
and most times it's not the "hey neat i didn't know that", rather "my entire concept of how this works was wrong" *mindblown*08:44
BeerLover left08:44
osse I had a git talk at work the other day and I literally showed them what a blob looks like, and what trees, commits and tags look like. And I illustrated the point by showing them show crappy python scripts I made to create blobs, trees and commits by hand.08:45
It worked wonders08:45
That there "from the bottom up" thing is true.08:45
skylite osse: I am sort of in the same situation I have to train developers in a company to use git08:46
fphilipe joined08:46
skylite I'm creating oneliner shellscripts to create different scenarios so I can explain things08:46
cdunklau skylite: just make sure you open with https://xkcd.com/1597/08:46
skylite one small extra for me to be scared: I have to do a pilot training first for all the seniors08:47
cdunklau skylite: what's the situation? "We're switching from SVN to git", or "We should probably start using version control"08:47
leeN joined08:48
skylite no they ARE using git but the juniors always mess things up and slow down the seniors08:48
and they don't have time to explain they just fix it for them08:48
uniquerockrz joined08:48
cdunklau that's sad08:49
skylite or maybe they dont understand it either just know how to fix it :)08:49
cdunklau lol08:49
BeerLover joined08:51
skylite either way im finally getting paid to learn git for a lifetime :D need to make the most of it08:52
ilmostro joined08:57
mikecmpbll joined08:59
gxt left09:02
SwiftMatt joined09:03
DarthRadar left09:05
uniquerockrz left09:06
SwiftMatt left09:08
bladane joined09:12
osse skylite: https://github.com/Osse/git-talk-impls/tree/master/py here are the scripts I used09:12
it's worth understanding them09:12
I suck at python so in that sense they are probably bad.09:12
uniquerockrz joined09:14
duderonomy left09:15
osse I should do an asciinema thing where I show what I did09:15
uniquerockrz left09:15
squirrel left09:17
T_UNIX joined09:18
planetcall|work joined09:19
roxlu joined09:19
roxlu hi09:19
perrier-jouet left09:20
roxlu i've got a patch that I'm applying using `git patch`. when the patch has been applied I get an error that the patch doesn't apply. is there a way to silence this error? I'm using cmake with an External Project and the error from `git apply` prevents the External Project from building.09:21
khisanth_ joined09:21
osse roxlu: what do you want to do if the patch doesn't apply?09:22
uniquerockrz joined09:23
osse Also, what is the reason it doesn't apply when it in fact doesn't?09:23
roxlu osse: nothing I only notice that I get this error when the patch has been applied already09:23
perrier-jouet joined09:23
osse roxlu: aha09:23
roxlu: you can check whether a patch has been applied already by checking whether it is possible to apply it in reverse09:23
roxlu osse: hmm would that be possible in one command?09:24
osse For External Project the commands are run in a shell, right? If so you can simply do COMMAND "git apply ... || true"09:24
roxlu osse: yeah, not sure if that would work on Windows/powershell09:24
khisanth__ left09:25
takyashi joined09:26
uniquerockrz left09:28
squirrel joined09:28
osse I think you should ask #cmake for how to do stuff conditionally09:28
roxlu osse: ok thanks09:28
osse what you can do as a workaround is to make the COMMAND be "cmake -P mypatchwrapper.cmke" and do the logic in there09:29
and that can call execute_process() and all those goodies09:29
warthog9 left09:29
warthog9 joined09:29
mobidrop joined09:30
shady_traveller joined09:32
osse roxlu: oooh I have a wicked idea09:32
roxlu: you can follow all BLAH_COMMAND "foo" with additional COMMAND "bar"09:32
reprazent joined09:32
osse what if you simply add a command that does nothing? COMMAND "true"09:32
heh, that doesn't work in PS09:33
roxlu oh :$ hehe09:33
osse exit 0 does.09:33
uniquerockrz joined09:33
osse that even works in cmd.exe09:33
but my guess is that it won't help anyway. it will stop at the first failing command09:33
roxlu I'm trying with --reject now (but the project takes ages to compile before I can see if it worked)09:34
osse Also, you can add the patch step separately (and conditionally) with ExternalProject_AddStep() I guess09:34
anyway, git apply --check --reverse is an excellent way of checking whether a patch has already been applied.09:35
mixaz joined09:35
roxlu osse: yeah I was thinking about that ... but I also want to figure out why I have to deal with this in the first place; it feels like I'm doing something wrong as applying a patch shouldn't result in these issues09:37
osse That is also a question for #cmake, I think09:38
I can't find any way in the docs to ignore command errors09:38
The best would be to submit your patch upstream :D09:39
skylite osse: thanks I'll check that09:43
roxlu osse: hehe yeah :-) the peepz from this project seem to be a bit unresponsive09:48
uniquerockrz left09:53
cdown left09:55
uniquerockrz joined09:58
|Ace| joined10:02
|Ace| I need an opinion:10:02
selckin water is good for you10:03
sunrunner20 left10:03
takyashi left10:03
|Ace| A PhD student colleague is working on a project that we need. So I suggested we fork it and work on it so as to mitigate and minimise risks posing to his master repo and if everything is okay we can merge it once he is happy10:03
thiago_ joined10:03
|Ace| however this is his reply: This may sound like a detail to you, but in my eyes there is a big difference between a fork and a branch. A branch would be fine, but a fork is a great way to fork off with the source code and never give anything back. Put more politely, forking is divergent evolution, and branching is convergent evolution. I am only10:04
interested in the latter. I hope this comes down to a misunderstanding of fork/branch terminology, but if it is not then it is better we talk sooner rather than later.10:04
what do you think?10:04
makaveli7 left10:05
SteffanW left10:06
Noti joined10:06
selckin can see his point, "fork" is more like go play in your own sandbox, easy deleted with no trace, or when original authors no longer support it, a branch is more we're insterested in the work and want to easily see/follow it and intent to merge it10:06
but practical things like authentication/access to the repos can also play a role etc10:06
|Ace| For me it does not really matter either way, but I thought the correct softeng approach would be to fork it and go from there10:07
selckin all depends on the setup etc10:08
|Ace| setup as in?10:08
selckin politics & silly things like what you're using to host the repos10:08
|Ace| using gitlab10:09
gxt joined10:10
selckin well like you might not want to give him access to make changes on the master branch if its used in production and you don't really trust him since student etc, so then fork is a good reason, or you might have good security controls in place to restrict him to the branch etc, that all counts too10:10
mat001 joined10:10
selckin if they are unfamiliar with git, you risk them messing a lot of things up, and maybe need strict pull-request time policity, while in fork they cn just do whatever, and force push/rewirte hitory still its done etc10:12
|Ace| we are in the same org. if we fork it he will obviously have access to it, this was so to null out any chance of ruining his master code that he has been working on, and once he is happy with out development he can choose to merge it or not.10:12
selckin so its all a valid option, just depends on what you prefer10:12
|Ace| he is familiar with git, one in our team is not10:12
so there is no "correct" way of doing things?10:12
crose joined10:12
selckin not really10:13
|Ace| well in that case I don't really like his condescending tone >:(10:14
selckin people will religiously defend what they believe in best practice in CS, thats life10:15
Brainium joined10:15
selckin he want to work to visible to people interested in the original project, as a branch can be organicly found, and a fork thats harder, and if you chose not to merge it, can still be there for the futuree etc10:16
its not like he's wrong, but feel like the practical organisation things outweight any technical reason10:16
so there is no "right" awnser, without knowing the culture in your company/school/whatever10:17
also i'm just a random guy on irc :)10:18
|Ace| I need more opinions from random guys on irc10:18
Dirak left10:18
|Ace| to build enough samples to make a conclusion :P10:18
Aquazi joined10:18
uniquerockrz left10:19
selckin turn it around, if you intent to use his work, any reason you wouldn't want him to work on a branch?10:20
mat001 left10:21
tango_ joined10:21
takyashi joined10:21
selckin (which usually resorts to security/acess control) which is where "fork" came from, github/gitlab, you don't have access to the original repo, but want to share your work under your own account in a fork10:22
|Ace| not really unlike him I am very flexible, if he wants to work on a branch that's fine by me10:23
selckin and then it comes back to practical things, maybe you want his to have his on issue list in gitlab to not polute the main repo or other things etc10:24
uniquerockrz joined10:24
Jackneill joined10:28
|Ace| he's overplaying it. It's a research code, so it's a mess already and he's literally the only developer/user until we came around.10:28
to give you an idea modules are named after shades of a colour instead of what they actually do10:29
selckin well PhD ppl usually are assholes more concerned with social status and faking it in my experience so that fits10:30
figuinhas joined10:30
takyashi left10:31
phanimahesh left10:32
stennowork joined10:33
DarthRadar joined10:33
stennowork good day, yesterday i read that you should not mix merging with rebasing. now, during `git pull --rebase` a merge conflict happened and was resolved, then the rebase was continued with `git rebase --continue`.10:34
the history of that branch looks just fine10:34
Dirak joined10:34
selckin that sounds correct10:34
stennowork can i now still rebase onto that branch without risking that my history will blow up at some point?10:34
|Ace| pretty much yes, even more so when they doing phd at oxbridge10:34
stennowork was that a 'merge' in that sense after all?10:34
selckin no was a rebase10:35
stennowork gotcha, great10:35
so all is still well in gitland10:35
selckin should be10:35
kjartan_ left10:36
Dirak left10:39
kjartan joined10:41
thiago_ left10:42
uniquerockrz left10:44
|Ace| left10:48
zlogan left10:50
zlogan joined10:50
enoq joined10:51
tonythomas joined10:52
uniquerockrz joined10:53
mobidrop_ joined10:53
mobidrop left10:57
RandomSerb left11:00
xnaas joined11:02
thiago joined11:08
Stoot left11:09
uniquerockrz left11:10
kleisli joined11:13
uniquerockrz joined11:15
thiago left11:23
cdown joined11:24
takyashi joined11:28
akemhp joined11:28
uniquerockrz left11:34
cYmen joined11:41
cYmen Hello! :) Does anybody have an idea how I might check if all local work has been pushed on some branch?11:42
Essentially to ensure that work has been backed up.11:42
nedbat cYmen: "git status" ?11:42
_ikke_ git rev-list --count <branch>@{u}..<branch>11:42
cYmen nedbat: oh, right...I want to check from a script!11:45
uniquerockrz joined11:45
cYmen _ikke_: hm...and then iterate that for all branches?11:46
osse check what, precisely?11:46
cYmen I want to make sure that if this computer dies, I don't lose anything.11:46
So changes to files, untracked files, stashed commits, all of it....11:47
osse check that git ls-files --others --exclude-standard doesn't print any files, that git diff is empty and the think _ikke_ showed, for all local branches11:47
_ikke_ cYmen: git branch -vv as well11:49
cYmen Alright, I guess I will have to set up some tests now.11:51
Thanks!11:51
glosoli left11:51
agg joined11:51
Lucas_Gray joined11:52
Stoot joined11:53
localhorse joined11:56
glosoli joined11:56
localhorse j416: hey, i rebased that feature branch (that i was talking about yesterday) on master, but now i noticed i missed something in an earlier commit during the rebase. how can i change that past commit?11:56
i haven't pushed yet11:57
but rebase is complete11:57
can i just re-run rebase? or will i lose all the work i did during the rebase?11:57
raven-au left11:58
raven-au joined11:59
localhorse git rebase -i HEAD~4 ?12:00
Moongoodenby localhorse: I think so. In any case, if you note the commit hash of the current HEAD, you can pretty much get your history back even if you mess something up12:00
Lucas_Gray left12:00
Moongoodenby (yay git)12:01
localhorse Moongoodenby: you think so regarding 1 or 2) ?12:01
uniquerockrz left12:01
Moongoodenby AIUI, if you rebase again now, you'll be starting from the current state, not the state before the rebase you already did.12:01
emsjessec joined12:02
localhorse 2) worked12:03
thx12:03
Lucas_Gray joined12:04
mixaz left12:06
localhorse Moongoodenby: how can i grep through my branch's history to see WHICH commits' diff contains a certain word?12:07
cdown left12:07
eamanu314 joined12:09
_ikke_ localhorse: git log -S 'word'12:10
uniquerockrz joined12:10
bvdw left12:11
localhorse _ikke_: thx. how can i also see the diff, not just that commit?12:12
bvdw joined12:12
localhorse Moongoodenby: if i just run `git rebase -i` without `HEAD~4`, will it start from the point where my branch branched off of its parent?12:12
_ikke_ localhorse: add -p (--patch)12:13
localhorse thx!12:14
monr0e joined12:18
rardiol joined12:20
selckin left12:23
selckin joined12:23
uniquerockrz left12:25
thiago joined12:26
CoolerX joined12:27
CoolerX hey12:27
I have multiple github accounts12:27
lucasb joined12:27
CoolerX currently I can only push to one of them12:27
the other one gives me a 40312:27
how do I add multiple accounts to git?12:28
salamanderrake joined12:28
wyre what would happen if I: 1. Make a fork for a particular project, 2. Create a branch to modify a specific file, 3. Do a PR to upstream project, PR is accepted and I also merge that new branch into the <main_branch>, 4. I make a `git pull --rebase upstream <main_branch>` ?12:30
there would be a kind of conflict when I do the `git pull --rebase ...`?12:31
uniquerockrz joined12:32
cdown joined12:33
selckin it will drop commits that are equal12:34
takyashi left12:36
BeerLover left12:36
wyre selckin, so ... there is not conflict, I guess :-)12:37
bladane left12:38
j416 localhorse: interactive rebase. !book12:39
gitinfo localhorse: 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:39
localhorse thx12:39
i'll read it on my 5h train ride tomorrow12:40
donofrio joined12:40
enoq left12:40
takyashi joined12:40
sQVe joined12:44
Stoot left12:46
mobidrop_mobidrop12:49
uniquerockrz left12:51
uniquerockrz joined12:58
sQVe left12:58
oxymoron93 left13:01
sQVe joined13:02
glosoli left13:03
mowcat joined13:04
sQVe left13:05
sQVe joined13:05
oxymoron93 joined13:12
staafl__ So... what's the civilized way to move an LFS-tracked file back to regular tracking?13:16
Google suggests using filter-branch but I'm not interested in rewriting history13:16
uniquerockrz left13:18
adam_mc3 left13:23
rwb left13:25
uniquerockrz joined13:25
igemnace joined13:27
eamanu314eamanu13:30
Xiti left13:30
nius joined13:34
adam4 joined13:35
adam4adam_mc313:35
interrobangd joined13:35
KnoP joined13:36
adam_mc3 left13:36
Xiti joined13:36
tmager joined13:36
adam_ joined13:37
adam_adam_mc313:37
mobidrop left13:38
glosoli joined13:38
akemhp left13:39
CoolerX hey13:40
anyone know how to add more accounts?13:40
berndj joined13:40
stennowork er what?13:40
CoolerX I tried doing git config --user.name "..."13:40
git config user.name "my name"13:41
git config user.email "my email"13:41
I am still getting 403 when I try to push13:41
cd left13:41
_ikke_ CoolerX: those have nothing to do with authentication against a third party git service13:41
CoolerX git push --local doesn't work either13:42
it says unrecognized option13:42
uniquerockrz left13:42
CoolerX _ikke_, oh13:42
_ikke_, so it just for who commited?13:42
it only affects git commit ?13:43
osse yes13:43
CoolerX ok so how do I add more accounts so that git push will work?13:43
jbu joined13:43
R2robot push where?13:45
oh, i see way above13:45
CoolerX every article on this seems to assume I have ssh keys setup https://medium.com/@geeky_sh/manage-multiple-git-accounts-on-a-single-machine-d49d710ec22913:45
R2robot, to github13:45
I am just using https and logging in13:46
with username password13:46
stennowork you can configure users in your github...13:46
CoolerX stennowork, I am using the command line git13:47
stennowork git and github are essentially unrelated13:47
CoolerX ik13:47
R2robot #github13:47
CoolerX stennowork, I am using the command line git13:47
stennowork ok, because you mentioend something with accounts and github, which is unrelated to git itself13:47
CoolerX stennowork, it is not unrelated, git push is part of git13:48
jeez every single answer assumes ssh keys https://stackoverflow.com/questions/3860112/multiple-github-accounts-on-the-same-computer13:49
osse CoolerX: what are the URLs you're pushing to?13:49
CoolerX osse, https13:49
osse I know that part13:49
R2robot ssh > https :P13:50
stennowork CoolerX, i told you to add your ssh keys on github13:50
osse Usually you're prompted for a username and password13:50
are you not?13:50
CoolerX osse, https://github.com/foo/bar.git13:50
R2robot and do you have 2FA enabled? I think that causes a problem13:50
CoolerX osse, no I am not getting any such prompt13:50
osse, it prompted only a single time the very first time I used it several months ago13:50
R2robot, no13:51
osse Sounds like it's cached and it needs to be cleared13:51
CoolerX stennowork, I don't have any ssh keys13:51
stop assuming that13:51
R2robot lol13:51
make 'em13:51
osse CoolerX: what does 'git config credential.helper' say?13:52
CoolerX R2robot, that is inconvenient since I would have to carry my ssh keys with me everywhere in a usb drive or something13:53
R2robot hooo'k13:53
CoolerX using a username password I can just login from anywhere13:53
R2robot your edge case is way too far off for me13:53
CoolerX R2robot, what? not carry a usb drive full of ssh keys with you everywhere you go? you call that an edge case?13:54
that is the default case13:54
R2robot #github13:54
CoolerX osse, it says manager13:54
what does that mean?13:54
beastDiv_ joined13:55
osse CoolerX: it means git is configured to store usernames and passwords somehow (i'm not sure of the details)13:55
CoolerX: can you re-run with --show.origin13:55
I mean --show-origin13:55
uniquerockrz joined13:56
CoolerX osse, that gave no output13:57
oh wait what?13:57
now when I do git config credential.helper it prints --show-origin13:57
osse heh, at least that's not a valid manager13:58
you added the --show-origin in the wrong place (because I didn't tell you where to put it)13:58
so you changed the value from "manager" to "--show-origin"13:58
CoolerX osse, oh13:58
osse ok, brute force approach:13:59
git config --list --show-origin | grep credential13:59
CoolerX there is no grep, I am on windows 1013:59
osse use findstr14:00
CoolerX file:C:/Program Files/Git/mingw64/etc/gitconfig credential.helper=manager14:00
file:.git/config credential.helper=--show-origin14:00
osse ok, run: git help credential-manager14:01
That thing there remembers your username(s) and password(s) and apprently does it too well14:02
clime joined14:02
CoolerX osse, https://i.imgur.com/ds2BkpQ.png14:03
osse fuckit14:03
CoolerX maybe I need to change that setting back to "manager"14:03
the one I accidentally changed to "--show-origin"14:04
osse You can try removing it first14:04
git config --unset credential.helper && git config --unset --system credential.helper14:04
CoolerX yeah && doesn't work in powershell for windows 10 The token '&&' is not a valid statement separator in this version.14:05
osse ok, run them sepratately then14:05
Lucas_Gray left14:06
uniquerockrz left14:06
oxymoron93 left14:06
CoolerX error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied14:06
I guess some program is using it?14:07
osse probably need admin access14:07
Remove (or comment with ;) that line from the file. I don't really care how you do it.14:07
git config is basically just a file editor14:08
CoolerX osse, I ran it in a powershell opened as administrator14:09
osse ok. now try to git fetch or push or whatever14:09
CoolerX alright it worked, now it prompts for username and password14:10
thanks for the help14:10
osse CoolerX: as for how to store separate usernames and password for separate URLs, I don't know.14:11
Maybe this manager thing can do it.14:11
m0viefreak joined14:11
uniquerockrz joined14:11
osse AFAIK that is not distributed with git, so it's a third party thing14:11
you can see if you have a git-credential-manager.exe somewhere on your system14:12
CoolerX osse, I installed git from here https://git-scm.com/14:12
I didn't install any separate manager14:12
osse That configuration must have come from somewhere... Visual Studio maybe?14:13
CoolerX osse, I am using visual studio code for development14:13
but I am executing git commands from the command line14:14
osse This thing exists: https://github.com/microsoft/Git-Credential-Manager-for-Windows14:14
check if you have that exe file somewhere14:14
rardiol left14:14
osse is sourcetree installed?14:14
that thing fucks everything up14:14
saint_ left14:14
CoolerX no14:14
osse I don't know then14:15
CoolerX I think git-scm installed the manager14:15
I searched for git-credential-manager.exe nothing showed up14:16
it might not be indexed, windows 10 needs a quick file search like Linux has14:16
takyashi left14:16
stennowork or even spotlight14:17
jast windows does have a file indexer, it's not enabled for the whole disk by default as I recall14:17
stennowork amazing that spotlight from 2006 is still superior to windows search in 201914:17
osse CoolerX: I can't recommend this tool enough: https://www.voidtools.com/14:17
CoolerX: it's pretty amazing14:17
It's the most instant file search I've ever come across14:18
_ikke_ ah, windows :014:18
:)14:18
osse I wish that existed for Linux14:18
stennowork locate ?14:18
is what i use for linux14:18
jast now add Everything to Keypirinha and fun ensues14:18
locate doesn't do fuzzy search IIRC14:19
okay, neither does Everything14:19
stennowork locate is near instant14:19
jast on Linux I use fzf for fuzzy matching, but it needs some kind of data provider to work with14:19
yeah, I know, I didn't say it wasn't14:19
osse stennowork: doesn't that have to update a db? what if you create a file and then immediately try to locate it?14:19
stennowork of course still inferior to spotlight because spotlight does fulltext search in files too14:19
jast yeah, locate depends on updatedb14:20
stennowork osse, correct, you have to call updatedb14:20
jast usually run as a cronjob14:20
osse jast: yeah Everything can do regex and you can set up filters and whatnot, but it's not fuzzy in the fzf/fzy sense14:20
that would be awesome14:21
jast tbh I don't *need* fuzzy search but it's awfully convenient14:21
osse But everything has a CLI version so it's doable :p14:21
oxymoron93 joined14:21
jast I don't think the fzf approach could scale to an entire disk though14:21
you'd probably need a reverse index of characters and maybe sparse n-grams14:21
mowcat left14:22
jast this kind of optimization problem is really interesting to me but I don't have time to actually tinker with it :)14:22
CoolerX osse, oh that is nice14:23
it found it straight away14:23
osse :D14:23
CoolerX NOICE14:23
osse Where was it?14:24
stennowork i assume that finding stuff really fast depends on a lot of things, including the filesystem itself14:24
CoolerX in C:\Program Files\Git\mingw64\libexec\git-core14:24
jast check out Keypirinha for accessing Everything and a whole bunch of other things. it's much less lightweight than Everything and mostly for power users, but it can do a lot of fun things14:24
oh yeah, I could have told you that's where these things are :)14:24
joined in too late14:24
stennowork and the super tight integration of osx to its hardware helps14:24
osse CoolerX: so it is from Git itself14:24
huh14:24
jast you can do real-time indexing on any platform14:24
osse Why don't I have it? :O14:25
jast all you need is a filesystem events API14:25
osse that's what Everything uses, afaik14:25
jast e.g. inotify on linux and a whole plethora of APIs on windows14:25
CoolerX osse, yeah I think git-scm installed it14:25
sgn joined14:25
stennowork i see14:25
akemhp joined14:25
osse CoolerX: weird that it doesn't have any docs then14:25
sQVe left14:25
osse jast: have you use git-credential-manager ?14:25
jast and how fast initial indexing works depends mostly on the filesystem and how good FS buffering is in the OS14:25
stennowork so is there a spotlight for linux?14:26
i.e. instant fulltext search14:26
over all filse14:26
jast osse: nope14:26
CoolerX osse, https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage14:26
If you’re using Windows, you can install a helper called “Git Credential Manager for Windows.” This is similar to the “osxkeychain” helper described above, but uses the Windows Credential Store to control sensitive information. It can be found at https://github.com/Microsoft/Git-Credential-Manager-for-Windows.14:27
stennowork apparently something called 'albert'14:27
osse CoolerX: Ohhh so it IS that ting14:27
thing14:27
Surely there must be a way to store multiple usernames and passwords14:27
CoolerX I think maybe the installer had that as an optional component14:27
https://github.com/Microsoft/Git-Credential-Manager-for-Windows#how-to-use14:28
How to use14:28
You don't. It magically works when credentials are needed. For example, when pushing to Azure DevOps, it automatically opens a window and initializes an oauth2 flow to get your token.14:28
uniquerockrz left14:28
CoolerX "magic"14:28
doesn't seem to have a way to add more accounts https://github.com/microsoft/Git-Credential-Manager-for-Windows/blob/master/Docs/CredentialManager.md#usage14:31
jast that's weird, normally it should prompt automatically14:33
CoolerX https://github.com/microsoft/Git-Credential-Manager-for-Windows/issues/74914:33
jast or do you have multiple github accounts you want to use?14:33
oh, I see14:34
omnireq joined14:34
jast yeah, I'd try username prefixes in the URLs14:34
https://user1@github.com/... https://user2@github.com/...14:34
thiago left14:35
jast though you probably only need the prefix for those repos where you don't want to use your "main" account (the one already known to the credential manager)14:36
CoolerX jast, that still requires you to input the password14:36
jast it shouldn't, more than once14:36
does it work for you with a single github account?14:36
CoolerX well according to the OP it does ask each time for the password https://github.com/microsoft/Git-Credential-Manager-for-Windows/issues/749#issuecomment-42227412414:37
uniquerockrz joined14:37
jast hmm, seems this case isn't covered well14:39
using that 'httpPath' option seems like an annoying way to work around it14:39
*useHttpPath14:40
Bombe I solved a similar problem with bitbucket by defining a custom host and username in my .ssh/config and then using git’s url.<custom url>.insteadOf=<normal url>.14:40
osse Maybe some of the other credential managers are better in this case14:40
jast the official helpers are 'cache' (RAM) and 'store' (plain text storage on filesystem, urg)14:41
the windows mechanism used by the credential manager at least encrypts it with your account key14:42
(windows account)14:42
osse But they will still be better for our dude if they allow multiple accounts :p14:43
jast who stated both in the github ticket and in the stackoverflow question that the solution should be reasonably secure14:45
osse I think maybe we're talking about different dudes14:47
CoolerX well any credential manger that works like magic is probably not worth the trouble14:49
I prefer it be a little bit more transparent to avoid confusion14:49
thanks for the help14:49
CoolerX left14:49
Sigma left14:51
uniquerockrz left14:52
akemhp left14:52
deadlysin joined14:54
jast oh yeah14:54
my bad :)14:54
though I don't think he understood how non-magical the credential manager is for the most part :)14:54
saint_ joined14:56
altendky joined14:56
hussam joined14:56
ExeciN joined14:57
uniquerockrz joined14:59
macaronus left15:00
glosoli left15:02
Sigma joined15:02
Inline joined15:05
leeN left15:07
rafasc joined15:09
akemhp joined15:14
uniquerockrz left15:16
TomyWork left15:17
phanimahesh joined15:18
gitinfo set mode: +v15:18
duderonomy joined15:19
rardiol joined15:19
uniquerockrz joined15:21
beastDiv_ left15:21
rardiol left15:25
yawkat left15:25
rardiol joined15:26
greggerz joined15:27
ExeciN left15:27
greggerz left15:28
greggerz joined15:29
akemhp left15:29
rardiol_ joined15:30
de-vri-es joined15:31
greggerz_ joined15:31
greggerz left15:31
rardiol left15:31
RoriconKnight joined15:33
gxt left15:36
RoriconKnight left15:37
leeN joined15:38
RoriconKnight joined15:38
yawkat joined15:40
uniquerockrz left15:42
omnireq left15:42
uniquerockrz joined15:47
planetcall|work left15:50
eamanu left15:51
mat001 joined15:53
mat001 left15:57
CoolerX joined15:59
CoolerX ok I did a stupid thing and deleted all the files15:59
.git is still there16:00
submerciful joined16:00
CoolerX how do I rollback to the latest commit?16:00
Bombe git status tells you.16:01
stennowork would that actually restore deleted files?16:03
CoolerX uhoh16:04
fatal: not a git repository (or any of the parent directories): .git16:04
.git is still there16:04
you know what I will just delete everything and fetch from the remote16:04
Belliash left16:04
Bombe Well, only the directory is not enough. Are there still files in it?16:04
CoolerX only lost a bit of work16:04
mowcat joined16:05
CoolerX Bombe, the folders are still there16:05
rafasc if the .git is there, git checkout <branch>; would mostly work.16:05
CoolerX but I can't find any files16:05
Bombe There’s your problem.16:05
CoolerX I ran this "del /f /s /q dist 1>nul"16:05
uniquerockrz left16:06
CoolerX dangerous command right there16:06
stennowork windows things?16:06
CoolerX I thought it would just delete files inside the "dist" directory but that is not the case16:06
rafasc untracked files would be lost, staged files can be recovered with some effort. (fsck --lost-found)16:06
and reflog for committed.16:06
CoolerX rafasc, fsck is that linux only?16:08
stennowork fsck the system16:08
rafasc CoolerX: no, I am talking about $git fsck.16:09
CoolerX: if you ever did a git add on them, you can use $git fsck --lost-found, and it will write unreachable files into .git/lost-found16:10
Noti left16:10
uniquerockrz joined16:11
rafasc You can try to find your files there. Usually done by grepping for a known string.16:11
interrobangd left16:12
CoolerX rafasc, how does that work?16:13
if the files are delete16:13
d16:13
all the files inside .git16:13
are you hoping that they haven't been overwritten on disk?16:13
rafasc Ahh, if you deleted files inside .git, your out of luck.16:13
you're16:13
sunri5e left16:14
sunri5e joined16:18
chele left16:19
uniquerockrz left16:24
glosoli joined16:24
Hello71 left16:25
omnireq joined16:27
omnireq left16:29
rsrx joined16:32
Hello71 joined16:32
omnireq joined16:32
uniquerockrz joined16:34
rkta_ joined16:35
Nazral osse: oh I see, but not way to actually read the previous version of the commit, or to get some information (like modification time)16:36
ARKANOID joined16:36
rkta_ left16:38
glosoli left16:38
glosoli joined16:39
Norimo joined16:39
ARKANOID left16:40
aesthe joined16:40
shokohsc joined16:42
algiss left16:44
glosoli left16:45
truthseeker joined16:47
barteks2x joined16:47
cthulchu joined16:50
uniquerockrz left16:54
benfelin joined16:56
CoolerX left16:58
benfelin left17:01
dionysus69 left17:02
uniquerockrz joined17:03
shady_traveller left17:03
duderonomy left17:05
oxymoron93 left17:06
barteks2x left17:07
xcm left17:08
xcm joined17:08
Atlenohen joined17:09
causasui joined17:11
Heirlung left17:12
Heirlung joined17:13
niki joined17:15
uniquerockrz left17:16
rardiol_ left17:18
mat001 joined17:18
osse Nazral: if you know the sha1 then you can do it17:19
vicfred joined17:19
osse Nazral: if you don't know you can maybe find it with git fsck --lost-found17:19
Nazral: but in the specific rebase case you can use the !reflog17:20
gitinfo Nazral: The git reflog (`git log -g`) temporarily (90 days by default) snapshots your branch states at each operation that changes the branch, making it easy to undo e.g. merges and rebases. The usual warnings about !rewriting/undoing history apply. See http://sethrobertson.github.com/GitFixUm/ for full details.17:20
stennowork !fsck17:20
gitinfo [!profanity] Hey! This is a family-safe channel, so keep it frakking clean you fierfekker!17:20
stennowork :I17:20
well thats funny but how can i tell the bot to show me about git fsck ? :P17:21
!git-fsck17:21
Inline left17:21
stennowork i will just read it up online17:22
rfuentess left17:22
Inline joined17:25
rafasc man git fsck17:25
gitinfo the git-fsck manpage is available at https://gitirc.eu/git-fsck.html17:25
uniquerockrz joined17:25
Inline left17:25
dionysus69 joined17:26
stennowork man ed17:26
aw17:26
fair17:26
rafasc or !lost, or !dangling_commit17:26
gitinfo As long as you have `git commit`ed your changes (or even `git add`ed them), your changes will not be lost for over two weeks unless you work really hard at it. There are two places where "lost" changes can be hiding. They might be in the reflog (`git log -g`) or they might be in lost&found (`git fsck --unreachable`). Type "!dangling" and "!reflog" into IRC for more info.17:26
A dangling commit is a commit no longer reachable by any branch or tag. This can happen due to resets and rebases and are normal. `git show SHA` will let you inspect them. Also this (look for dots w/o children and w/o green label): gitk --all --date-order `git fsck --no-reflog | grep "dangling commit" | awk '{print $3;}'`17:26
Inline joined17:28
Inline left17:29
Inline joined17:31
stennowork left17:32
Human_G33k joined17:32
Inline left17:32
dijitol joined17:32
Human_G33k left17:33
fphilipe left17:33
Human_G33k joined17:33
Inline joined17:34
Human_G33k left17:34
Human_G33k joined17:35
plujon joined17:35
HumanG33k left17:35
mikecmpbll left17:37
DarthRadar left17:39
uniquerockrz left17:39
plujon I often find I would like to fixup a line of code such that the fixup is applied to the last time the same line was changed. Is there a handy way to do this in git? I'm aware of git?17:39
Phylock joined17:40
clime left17:44
OMGOMG !amend > plujon17:44
gitinfo Use `git commit --amend` to combine your current staged changes with those in the previous commit. If you have already pushed the last commit, this counts as a !rewrite17:44
rafasc plujon: not builtin to git.17:45
there's osse's blame-diff; which figuring out the line, and a more automated tool called git absorb17:45
https://github.com/Osse/git-scripts/blob/master/git-blamediff17:46
https://github.com/tummychow/git-absorb17:46
uniquerockrz joined17:46
fphilipe joined17:46
DarthRadar joined17:46
caskd-dev joined17:48
xcm left17:51
fphilipe left17:51
mowcat left17:51
xcm joined17:51
Dirak joined17:52
plujon rafasc: Thanks. I'll take a look..17:53
tonyj joined17:54
m0viefreak left17:55
m0viefreak joined17:57
briian joined17:58
Stoot joined17:59
DarthRadar left17:59
briian left18:00
uniquerockrz left18:03
DarthRadar joined18:03
spacesuitdiver joined18:04
fphilipe joined18:06
dartmouthed left18:07
uniquerockrz joined18:08
oxymoron93 joined18:11
bvdw left18:11
bvdw joined18:12
fphilipe left18:13
enoq joined18:14
josvuk joined18:14
josvuk Hello! Im hacking ...18:15
doing so I want to see my editor which is used by git commit ...18:16
fphilipe joined18:16
josvuk git config --gloabal --get-all gives me error18:17
What can I do ....18:17
:-)18:17
aesthe left18:18
josvuk error: wrong number of arguments, should be from 1, to 218:18
pks left18:19
fphilipe left18:21
oxymoron93 you need to provide the keys, check man git config18:21
gitinfo the git-config manpage is available at https://gitirc.eu/git-config.html18:21
oxymoron93 ie, add `core.editor` to the command18:21
Jackneill left18:22
Norimo left18:22
iNCoNFuN joined18:24
Norimo joined18:24
mat001_ joined18:25
Dirak left18:28
mat001 left18:28
uniquerockrz left18:29
KnoP left18:33
josvuk left18:34
uniquerockrz joined18:34
KnoP joined18:35
wootehfoot joined18:38
mat001_ left18:40
mat001 joined18:40
clemons joined18:44
peepsalot joined18:44
peepsalot how can i view the specific changes in a stash? if i do "git diff stash@{X}" it compares with head and there's been a merge so its showing a bunch of things I don't care about which weren't specifically changed in that stash itself18:46
clemons1 joined18:46
osse plujon: let me know of any bugs18:46
peepsalot: git stash show -p18:46
peepsalot osse: ah, thank you18:47
osse peepsalot: to use git diff specifically (eg. for scripting) you'd do git diff foo~ foo where foo is the stash thingy18:48
ie. diff with it's parent18:48
clemons left18:48
rsrx left18:49
Paradisee left18:51
rjstone Does anyone know how to detect the failure of a previous step inside a javascript github action? I know it must be in a context or env variable but I can't seem to find the docs.18:51
Dirak joined18:52
uniquerockrz left18:53
Stoot left18:56
snits is there a way in .gitconfig to default git format-patch to --no-renames? I thought diff.renames = false did it, but apparently that isn't the case18:59
Stoot joined18:59
clemons1 left19:01
uniquerockrz joined19:02
clemons1 joined19:03
Edisto joined19:07
ZeroWalker joined19:07
john2496 joined19:08
pks joined19:08
ZeroWalker can anyone help me with removing some git stuff from it's history. This case revolves around a casing issue where i ignored casing, but then didn't or something, so there's two versions, and i can get it to work but it's very annoying to try to fix it each time i happen to wana clone/push/pull etc. I have done it before but don't recall how, and googling shows something about --filter-branch which seems kinda complicated. So i19:09
thought i better ask someone first for some assistance:)19:09
Sasazuka joined19:10
cdown left19:11
Human_G33k left19:12
iNCoNFuN left19:13
HumanG33k joined19:13
barteks2x joined19:15
clemons1 left19:15
enoq left19:15
rafasc ZeroWalker: !rewrite19:16
gitinfo ZeroWalker: Rewriting public history is not recommended. Everyone who has pulled the old history will have to do work (and you'll have to tell them to), so it's infinitely better to just move on. If you must, you can use `git push --force-with-lease <remote> <branch>` to force (and the remote may reject that, anyway). See http://goo.gl/waqum19:16
clemons1 joined19:17
lacrymology joined19:17
rafasc If you fix the case issue, new branches will not be affected. For older ones, enabling git rerere might help resolving repeated conflicts.19:18
uniquerockrz left19:20
boombatower joined19:26
sauvin left19:26
wyre joined19:27
uniquerockrz joined19:27
T_UNIX left19:29
figuinhas left19:29
khisanth_ left19:36
khisanth_ joined19:37
howdoi joined19:37
uniquerockrz left19:41
vicfred left19:42
dionysus69 left19:45
uniquerockrz joined19:48
oxymoron93 left19:50
ndorf joined19:52
Abbott left19:54
lucasb left19:57
reprazent left19:59
plujon left20:00
plujon joined20:01
mowcat joined20:01
Narrat joined20:05
uniquerockrz left20:06
KnoP left20:08
Dirak left20:09
malmalmal joined20:09
im0nde_ joined20:11
alexandre9099_ joined20:12
BonusPlay left20:12
alexandre9099 left20:12
BonusPlay joined20:12
BonusPlay left20:12
BonusPlay joined20:12
BonusPlay left20:12
BonusPlay joined20:13
im0nde left20:13
BonusPlay left20:13
jamiejackson joined20:13
BonusPlay joined20:14
uniquerockrz joined20:15
oxymoron93 joined20:16
Narrat left20:18
Narrat joined20:19
Phanes left20:19
qqx left20:20
mixaz joined20:21
Norimo left20:21
Hello71 left20:26
gpanders left20:26
Hoffman left20:26
ghost43 left20:26
Peng_ joined20:26
qqx joined20:26
Phanes joined20:26
uniquerockrz left20:28
john2496 left20:30
royal_screwup21 joined20:32
ghost43 joined20:33
tryte joined20:33
iNs joined20:33
uniquerockrz joined20:34
gpanders joined20:34
xelxebar joined20:34
gxt joined20:35
willbarr joined20:35
truthseeker left20:35
deadlysin left20:36
Narrat left20:39
emsjessec left20:39
Hoffman joined20:39
Dirak joined20:39
Narrat joined20:40
Hello71 joined20:42
gareppa joined20:47
akemhp joined20:47
mat001_ joined20:49
oxymoron93 left20:50
KnoP joined20:51
mat001_ left20:51
mat001_ joined20:52
mat001 left20:53
uniquerockrz left20:56
Narrat left20:56
zlogan left20:57
zlogan joined20:57
fstd_ joined20:57
Narrat joined20:58
elibrokeit joined20:58
heftig joined20:58
royal_screwup21 left20:58
g00s joined21:00
brettgilio left21:00
greggerz_ left21:01
greggerz_ joined21:02
fstd left21:02
fstd_fstd21:02
uniquerockrz joined21:03
Narrat left21:03
Dirak left21:05
Narrat joined21:05
JanC left21:06
gareppa left21:06
Xeago_ joined21:06
infl00p68 joined21:07
malmalmal left21:07
misuto9 joined21:07
equwal- joined21:07
misuto9 left21:07
cyberanger_ joined21:07
luckman212_ joined21:07
rjsalts_ joined21:07
bookworm_ joined21:07
holdsworth joined21:07
nero_ joined21:07
rmsvc_ joined21:08
topdownjimmy left21:08
Habbie left21:08
yawkat` joined21:08
lucasb joined21:09
irrgit_1 joined21:09
mikap joined21:09
SuperL4g joined21:09
Habbie joined21:10
cdunklau_ joined21:10
shalok_ joined21:10
coldaemon1 joined21:10
topdownjimmy joined21:10
thomasross_ joined21:10
thomasross left21:10
thomasross_thomasross21:10
_BonusPlay joined21:11
alfredb joined21:12
DarthRadar left21:12
ColdKeyboard left21:12
blaisebool left21:12
bookworm left21:12
uniquerockrz left21:12
yawkat left21:12
diogenese left21:12
SuperLag left21:12
BonusPlay left21:12
tgunr left21:12
equwal-equwal21:12
shalok_shalok21:12
Xeago_Xeago21:12
nero_nero21:12
mikapmika21:12
splud joined21:12
Dirak joined21:12
diogenese joined21:12
Habbie left21:13
cybrNaut joined21:13
_W_ joined21:13
kini joined21:14
markmarkmark joined21:14
Habbie joined21:14
clime joined21:17
Ekho joined21:19
spacesuitdiver left21:19
Narrat left21:19
rkta joined21:20
JanC joined21:22
thomasross left21:23
cdown joined21:25
_BonusPlayBonusPlay21:26
obiwahn joined21:27
josvuk joined21:28
hexa- joined21:32
thomasross joined21:32
toothe Is there a way to have git track files without running "add" ?21:34
without staging them.21:34
_ikke_ sf21:34
toothe sf?21:34
akemhp_ joined21:36
clime left21:36
Fernando-Basso joined21:37
bookworm_bookworm21:37
akemhp left21:38
enoq joined21:38
Jackneill joined21:40
cdown_ joined21:40
j416 toothe: git-commit can take paths.21:41
toothe I'm sorry, I don't follow?21:41
j416 man git-commit21:41
gitinfo the git-commit manpage is available at https://gitirc.eu/git-commit.html21:41
j416 git commit <file>21:42
toothe Perhaps I'm not being clear - I do not want to commit the file just yet, but I want to see the difference sin my working tree21:42
cdown left21:42
cdown_cdown21:42
j416 man git-add look for -N21:42
gitinfo the git-add manpage is available at https://gitirc.eu/git-add.html21:42
_ikke_ git add -N <filenae>21:42
indeed21:43
ZeroWalker left21:43
toothe ahh, thank you!21:43
_ikke_ asking the right question helps a lot :)21:43
akem__ joined21:48
alfredb left21:49
josvuk left21:50
akemhp_ left21:50
Narrat joined21:51
Anthaas_ joined21:51
Anthaas left21:51
royal_screwup21 joined21:54
Jackneill left21:57
cdunklau_cdunklau21:58
steven- joined22:00
iNs left22:03
steven-steven22:03
iNs joined22:04
rwb joined22:05
im0nde_im0nde22:06
submerciful left22:07
phanimahesh left22:08
Phylock left22:09
rkta left22:10
enoq left22:14
zlogan left22:14
tmager left22:17
fphilipe joined22:18
cdown left22:19
cd joined22:19
spacesuitdiver joined22:20
cdown joined22:22
fphilipe left22:23
leeN left22:27
KnoP left22:31
wootehfoot left22:35
cdown_ joined22:35
rkta joined22:35
cfoch joined22:35
cdown left22:37
cdown_cdown22:38
thiago joined22:38
greggerz__ joined22:41
greggerz_ left22:44
greggerz__ left22:44
fphilipe joined22:46
akemhp_ joined22:46
Narrat left22:49
akem__ left22:49
jamiejackson left22:49
Narrat joined22:50
fphilipe left22:51
eamanu joined22:51
peepsalot left22:53
misuto joined23:00
vicfred joined23:01
cdown left23:06
akemhp_ left23:06
justanotheruser left23:07
zlogan joined23:11
jbu left23:11
feriman left23:12
VSpike joined23:12
tryte left23:13
rkta left23:13
tryte joined23:13
rkta joined23:14
VSpike Typical workflow for me is to be on master, do `git switch -c new_feature_branch`, make some changes, then `git push`, and every time get the error about no upstream being set ...23:14
rafasc VSpike: push -u23:15
VSpike then have to copy and paste the suggested line `git push --set-upstream origin new_feature_branch` .. what's best way to avoid this?23:15
`push origin HEAD` works but you have to do that every time, as upstream is still not set23:15
rafasc you can use $git push -u origin HEAD;23:18
Fernando-Basso left23:18
VSpike rafasc: just tried that, and it's definitely a lot shorter! And can be aliased23:18
rafasc and you only need to do that the first time.23:18
rkta_ joined23:19
rkta left23:19
VSpike I was wondering if that was to with the change to the push.default setting a while back, because my memory says it used to just assume you wanted to create a branch. But I might be misremembering23:19
rkta_rkta23:19
VSpike I have push.default = simple23:19
rafasc simple is the default anyways.23:20
thiago left23:21
errr_ joined23:21
rafasc VSpike: I think that if change it to "current", it would work as you describe.23:22
But then, you lose the ability to push to the branch you are tracking automatically.23:23
errr left23:24
dijitol left23:26
errr_ left23:28
spacesuitdiver left23:28
rafasc VSpike: alias first-push='-c push.default=current push'23:28
VSpike Neat :)23:29
rafasc Not really better than HEAD, but just to demonstrate you can override configs with aliases.23:29
VSpike Yeah, I didn't know about that ... useful to know23:29
rafasc and you would probably want to add --set-upstream to that.23:31
mowcat left23:31
spacesuitdiver joined23:31
deadlysin joined23:31
rardiol joined23:35
Codaraxis joined23:36
g00s left23:38
KnoP joined23:39
somasis joined23:39
localhorse left23:42
kleisli left23:44
boombatower left23:46
Codaraxis I'm working in an up-to-date working directory with a number of submodules. The submodules are listed as changed but not staged. Attempts to discard all modifications changes, including "git submodule update --init --recursive", CDing into each and running "git checkout ./", "git submodule update <individual submodule>", "git submodule update -f --init", "git checkout -- .", etc. have yielded nothing.23:47
Also, there doesn't appear to be any change when running a diff. I just see subproject commit <same id>-dirty for the change.23:47
Could someone tell me what's wrong and how I clean this up?23:48
mat001 joined23:49
j416 Codaraxis: what does 'git status' say if you run it in one of the submodules?23:49
Codaraxis j416, Huh. It appears I have a detached head and it lists the modifications in that submodule23:51
spacesuitdiver left23:51
rafasc detached head in submodules is normal.23:51
j416 detached HEAD seems normal for a submodule (I don't use them so haven't checked, though)23:52
nod23:52
mat001_ left23:52
Narrat left23:52
jnewt joined23:53
akemhp joined23:53
errr_ joined23:54
kerframil joined23:55
rafasc Codaraxis: that does git status say on the parent project?23:56
you may have untracked files, which will make diff say dirty.23:57
since you already did update -f, the commit and staging area should be in sync.23:58
you can do something like: git submodule foreach git clean -i23:58

Logs Search ←Prev date Next date→ Channels Documentation