IRCloggy #git 2020-01-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.

2020-01-21

leeN left00:00
guzzlefry kind of?00:00
rafasc There must be something running git fetch.00:00
guzzlefry yes, me :P00:00
I'm ssh'ing in and doing it.00:00
ttoocs left00:01
guzzlefry I got around it by setting ACL permissions, but I'd still like to know what's going on if possible.00:01
omnireq left00:02
Codaraxis joined00:03
Dirak joined00:03
g00s left00:05
Dirak left00:08
jamiejackson left00:10
Dirak joined00:14
shabius_ left00:19
mikecmpbll left00:19
shabius joined00:24
oatmealraisin left00:26
ttoocs joined00:28
ttoocs left00:33
xcm left00:34
duderonomy left00:34
xcm joined00:34
causasui joined00:36
fphilipe_ joined00:38
CodeSlingerPaul left00:40
dedowsdi left00:41
mowcat left00:41
Anthaas left00:41
fphilipe_ left00:42
paws_ left00:44
jimender2 joined00:45
budonyc joined00:45
Anthaas joined00:46
budonyc left00:53
gioyik left00:54
lefne left00:57
lefne joined00:59
ttoocs joined01:00
causasui left01:00
igemnace joined01:01
omnireq joined01:02
dedowsdi joined01:04
ttoocs left01:05
ravndal left01:06
royal_screwup21 left01:06
xcm left01:06
xcm joined01:07
Goplat joined01:15
oatmealraisin joined01:15
Decobus joined01:15
igemnace left01:16
jstein left01:16
ttoocs joined01:32
jetchisel left01:33
rominron_ joined01:33
jetchisel joined01:33
rominronin left01:36
ketas left01:36
ttoocs left01:38
ketas joined01:39
igemnace joined01:40
ycon_ joined01:43
ycon_ Im so baffled by this- if my git modules used https, then where I clone it will have to use https too? Does that sounds right?01:44
fairuz joined01:45
fairuz left01:46
guzzlefry left01:46
Lucas_Gray left01:49
Ori_B yes, git submodules are effectively just cloned using 'git clone' from the url in $REPO/.gitmodules01:55
CryptoDavid left01:56
ycon_ left01:58
rafasc left02:02
fairuz joined02:03
ttoocs joined02:04
florekm joined02:06
statusf90 left02:07
sveinse left02:07
ttoocs left02:09
sinhue left02:10
Codaraxis left02:17
beastDiv_ left02:17
_Warl0ck left02:18
dumb_moth left02:19
beastDiv_ joined02:26
tpewnag joined02:34
tpewnag left02:34
ttoocs joined02:36
Brainium left02:37
finalbeta left02:38
RoseBus left02:40
Thorn joined02:40
justanotheruser left02:41
ttoocs left02:42
jetchisel left02:43
jetchisel joined02:44
_Warl0ck joined02:46
yonder left02:46
chandoo left02:47
finalbeta joined02:48
_Warl0ck left02:48
justanotheruser joined02:48
dumb_moth joined02:49
_Warl0ck joined02:50
causasui joined02:51
fattredd left02:51
veegee left02:51
tpewnag joined02:52
CCR5-D32 left02:52
ravndal joined02:53
F0rTex left02:55
dumb_moth left02:56
F0rTex joined02:56
_Warl0ck left02:56
ShapeShifter499 hi02:57
How can I merge two repositories together and all the branches they have?02:58
jaziz1jaziz02:58
dartmouthed left03:02
ycon_ joined03:06
ycon_ Ori_B: oh thanks. sorry was disconnected03:06
kantlivelong left03:07
kantlive- joined03:08
ycon_ Super wiered- even though my submodule folders show ssh method, as my url github asks for my username and pass. Could something be wrong here?03:08
kantlive-kantlivelong03:08
ttoocs joined03:09
bvdw left03:09
bvdw joined03:10
omnireq_ joined03:13
ttoocs left03:14
howdoi left03:14
omnireq left03:15
causasui left03:17
ttoocs joined03:24
lagothrixGuest9851003:25
Guest98510 left03:25
lagothrix joined03:25
beastDiv_ left03:26
ycon_ Hi all. new to submodules here. What is the way to recursively git fetch all directories?03:30
as in , check all submodules for latest changes03:31
igemnace ycon_: no dedicated command for it. check out git submodule foreach in the help03:36
ycon_ I'm also confused with git fetch. If I have done --force-with-lease, does that mean git fetch won't think there are new commits?03:36
igemnace it'll still fetch the new commits03:45
ycon_ left03:45
beastDiv_ joined03:46
igemnace you just won't immediately be able to git merge the upstream of the branch you did --force-with-lease in on some other machine03:46
...weird sentence but the idea is push --force-with-lease will affect merging local and remote branches, not fetching remote branches03:48
fattredd joined03:49
Codaraxis joined03:52
davidfetter is there some resources that helps decide among git submodule, git subtree, etc.?03:54
sauvin joined03:54
igemnace davidfetter: good question. i've only been able to stitch together that information from various sources in the past. are you trying to decide for a specific use case? or just collecting resources in general?03:57
Cabanossi left03:57
ycon_ joined03:58
ycon_ Hi all, im trying to fetch updates from a repo on my server- where it should override all conflicts/not merge. However, git fetch does not work.03:58
duderonomy joined03:58
davidfetter igemnace, it's for a possible dependency for PostgreSQL, so we need to be able to control pretty carefully what exact commit we're using with each branch03:58
ycon_ This worked: "git fetch --all;git reset --hard origin/<branch_name>". But is there a way to write that, without having to specify the branch?03:58
igemnace davidfetter: is it a dependency you're going to maintain yourselves? or do you expect the dependency's maintainers to work separately?04:00
davidfetter ...and given the longevity of the PostgreSQL project, we've found ourselves the maintainers of several "external" packages already. Spencer's regex, e.g.04:00
we're maintaining the dependencies. others might (from our perspective) send patches to sub-assemblies, which we'd need to review, possibly modify, etc.04:01
igemnace ah. the idea is that for subtrees, the entire history of the subtree will be included in the superproject as well. for submodules, the submodule's history will be separate, and the superproject will only keep reference information (remote URL, checked-out hash)04:01
davidfetter that latter sounds more attractive, as our history goes back quite a ways, and we'd rather not cloud it with Other People's Pushes04:02
beastDiv_ left04:02
davidfetter would ordinarily be down with OPP, but in this case, not so much04:02
igemnace right, and apart from that, with subtrees you should be ready to have commits relating only to the subtree being part of the whole superproject history04:03
even the ones made by "first-party" maintainers04:05
davidfetter that sounds like it'd make a lot more sense than shuffling in others' whole history. are there systems I should consider other than those two?04:05
barteks2x left04:05
igemnace for git, i'm only familiar with those two. i'm not familiar with other techniques04:05
ycon_ Like this seems to work: git fetch --all;git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)04:06
davidfetter has seen reference to submodule, subtree, subrepository, and Composer so far04:06
igemnace yep, outside git, there might already be dependency management systems for the language/stack you're working with. composer is one of those04:07
dedowsdi left04:08
Cabanossi joined04:09
igemnace ycon_: if your branch already has an upstream set up, you can do git reset --hard @{u}04:09
dedowsdi joined04:09
ycon_ igemnace: oh thanks. That's pretty neat. Basically if my branch is remote, then it will always have an upstream yeah?04:10
fairuz left04:10
igemnace depends on how the branch was created. if it was created by doing git checkout branch-name (which will automatically set up a local branch with an upstream if no local branch exists) or by more explicit commands such as git checkout --track, then yes it will have an upstream04:12
ycon_ Cool. Very good04:13
nickodd joined04:16
tpewnag left04:18
Dirak left04:20
g4570n left04:21
oatmealraisin left04:23
netz left04:25
dedowsdi left04:26
dedowsdi joined04:27
crose left04:36
hussam left04:36
fling left04:42
ferdna joined04:45
Dirak joined04:53
bukkitgerman left04:53
bukkitgerman joined04:53
dedowsdi left04:57
dedowsdi joined04:58
jcbitter left05:01
ycon_ Git submodules is really confusing. Can someone give me clarity on how to get the lastest changes from remove submodules?05:01
git submodule update --init --recursive does not do anything05:01
pks_ joined05:01
pks left05:03
pks_pks05:03
fairuz joined05:06
orbyt_v7 joined05:09
dedowsdi left05:09
dedowsdi joined05:11
ycon_ left05:15
orbyt_v7 left05:19
Dirak left05:25
Dirak joined05:32
_Warl0ck joined05:35
dumb_moth joined05:36
xco joined05:43
ferdna left05:47
bukkitgerman left06:00
bukkitgerman joined06:01
beastDiv_ joined06:02
ycon_ joined06:10
R2robot left06:12
ycon_ left06:13
fairuz left06:19
zrhoffman left06:19
__salt joined06:19
zrhoffman joined06:20
_salt left06:20
orbyt_ left06:20
zrhoffman left06:21
jetchisel left06:22
zrhoffman joined06:23
fairuz joined06:25
Mattiaslndstrm joined06:26
jetchisel joined06:27
jetchisel left06:28
jetchisel joined06:28
ycon_ joined06:29
ycon_ Hi all, is there I way I can do "git reset --hard @{u}" conditionally- only adding the @{u} if it actually points to a branch?06:29
prit joined06:29
ycon_ Will this acehive it?06:31
mud You should be able to use `git rev-parse --verify @{u}` to check if points to something, then do a very short bash script based on that?06:33
pandakekok9 joined06:34
trittweiler joined06:35
gitinfo set mode: +v06:36
FH_thecat left06:36
Codaraxis_ joined06:40
trittweiler What's the best way to "categorize" files in a repository? I.e. I would like to find out whether files are part of the repository, untracked, or ignored? It doesn't seem like `git ls-files` can do that.06:40
fphilipe_ joined06:40
jetchisel left06:41
netz joined06:41
mat001 left06:41
Codaraxis left06:43
osse trittweiler: it can list each category separately06:44
jetchisel joined06:45
osse a small script could produce a long merged list with an indication of which list it came from06:45
http://sprunge.us/z6H07G - something like this maybe?06:50
fairuz left06:51
osse the command with --ignored also needs --others06:52
Trieste left06:57
xco left06:57
Trieste joined06:58
kjartan left06:59
kjartan joined07:00
xco joined07:12
theorangeone left07:18
Noti joined07:19
theorangeone joined07:20
sQVe joined07:21
ycon_ left07:27
BeerLover joined07:28
nickodd left07:28
duderonomy left07:32
chele joined07:32
Goplat left07:33
im0nde_ joined07:35
trittweiler Cheers.07:35
ijash joined07:35
im0nde left07:36
shady_traveller joined07:36
duderonomy joined07:36
theoceaniscool left07:39
beastDiv_ left07:41
thiago left07:44
reprazent joined07:44
gxt joined07:50
gxt left07:50
gxt joined07:53
lankanmon left07:53
robamman2020 joined07:54
beastDiv_ joined07:54
rfuentess joined07:55
pandakekok9CommunistMonotyp07:55
CommunistMonotyppandakekok907:56
lankanmon joined07:56
graungaard joined07:58
graungaard83 joined07:58
graungaard83 left07:58
glosoli joined08:02
glosoli left08:02
glosoli joined08:02
BonusPlay left08:08
BonusPlay joined08:08
oxymoron93 joined08:08
robamman2020 left08:17
dumb_moth left08:18
_Warl0ck left08:18
dumb_moth joined08:21
_Warl0ck joined08:22
dartmouthed joined08:23
xco left08:23
dre_ joined08:31
mobidrop joined08:34
sbeyer joined08:36
xco joined08:40
enoq joined08:42
Helenah left08:44
Helenah joined08:46
Lope joined08:47
Lope if I commit to the wrong branch and have already pushed it to bitbucket, is there a way to roll it back?08:48
osse, ^ :)08:48
dre_ left08:49
oxymoron93 sure, it requires force push08:49
igemnace git revert is the safe way08:49
Lope igemnace, `git revert $id; git push ...` ?08:50
oxymoron93 I assume roll back really means that, but yeah, if you weren't aware of git revert, check it out if it is applicable for your case: man git revert Lope08:50
gitinfo the git-revert manpage is available at https://gitirc.eu/git-revert.html08:50
igemnace yep. that'll *add* a new commit (your history will move forward), but whose tree is a "roll back" (your files will go back to the state before the reverted commit)08:51
oxymoron93 it will create another commit, which cancels out changes made by commit used in command08:51
Lope are you guys familiar with `git undo` ?08:52
oxymoron93 resulting in no history rewrite, and you can just push it08:52
Lope it's part of some git scripts available in debian.08:52
oxymoron93 I am not08:52
igemnace neither am i08:52
oxymoron93 from what I see, it is basically `git reset` :D08:53
which is not what `git revert` does08:53
Lope it's part of the git-extras package.08:53
floppydh joined08:54
oxymoron93 yeah, found the manual, is that what you want to do with this latest commit?08:54
Lope I use `git undo` often08:54
but I've pushed to bitbucket already08:54
so how can I undo there?08:54
oxymoron93 only with force push , but check this out !rewrite08:55
gitinfo 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/waqum08:55
Lope this is the git undo command: https://github.com/tj/git-extras/blob/master/bin/git-undo08:56
oxymoron93 well, even better, now I know it is `git reset` :D08:56
tsujp left08:56
yonder joined08:58
dionysus69 left09:00
bigfondue left09:00
Kaisyu7 left09:02
gitter1234 Hey! How come when I rebase to an old commit I can't see the files that are staged for that commit?09:06
bvdw left09:09
bvdw joined09:10
ijash left09:10
oxymoron93 elaborate more, rebase is done with clean working directory (no staged, or modified files) and files staged for the existing commit isn't clear to me either09:11
gitter1234 When I do git commit --amend, then I can see the all the files that are gonna be part of that commit09:12
tonythomas joined09:12
osse gitter1234: have you marked a commit as "edit" ?09:12
gitter1234 Yeah09:13
Makes it kinda hard to see what changes I'm supposed to make. I have to make a copy of the repo and then git show <the commit I'm rebasing> to get an overview.09:13
osse it's set up so that you're supposed to use git commit --amend09:13
gitter1234 Yeah I know09:13
osse you can git reset --soft @~ and commit the usual way09:13
bigfondue joined09:13
osse make a copy?!?!09:13
gitter1234 But I'd like to see all the files that are gonna be applied to the current commit when I do git status09:14
osse my suggesteed reset thing does that09:14
but remember to not use --amend when you're done09:14
gitter1234 Cool, thanks09:14
Ah so that's why I fucked up my repo just now :-)09:15
osse also you could just "git show" when you're there. making a copy sounds silly09:15
gitter1234 Ah yeah git show shows it09:16
Although I'd like just a list of the modified files. I'll try out your command, cheers09:17
osse git show --name-only09:17
git diff HEAD~ HEAD --name-onlu09:17
igemnace left09:17
gitter1234 Ohhh nice!09:17
Onemore thing if you don't mind09:17
When I do git commit --amend and get taken to the editor, how come the commit is still amended even though I exit the editor instead of saving it?09:18
Like, once I do git commit --amend, there's no turning back?09:18
fphilipe joined09:18
osse you can empty the editor09:18
or make it exist with a failing exit status09:19
gitter1234 I see. Sounds good!09:19
fphilipe_ left09:21
canton7 gitter1234, or you can go ahead with the amend, and then undo it09:22
gitter1234 I'm good :-)09:24
canton7: Are you a Spree/Solidus dev by any chance?09:24
Your nick seems familiar.09:25
YuGiOhJCJ joined09:25
tsujp joined09:27
gitter1234 Half German half Turkish?09:28
Nevermind09:28
igemnace joined09:30
Kaisyu7 joined09:32
Syzygy joined09:33
voker57 left09:34
feriman joined09:36
voker57 joined09:37
graungaard left09:38
vitaminx joined09:41
jstein joined09:42
xco left09:49
sbeyer left09:51
sbeyer joined09:53
yonder left09:54
kleisli left09:58
fphilipe left09:58
Lope left10:00
rfuentess left10:03
rfuentess joined10:03
enoq left10:04
enoq joined10:06
Dirak left10:08
palooka-jock left10:09
dbacc joined10:09
dbacc hey, I had a forced update to some branch with git rebase. I'm the only user of the git repo and wanted to continue to work on that version on my second client. However, when I pull, I get a nasty merge conflict. How do I force getting the version from origin?10:10
osse don't pull.10:11
git reset --hard origin/master (or whatever the branch name is)10:11
YuGiOhJCJ left10:11
xco joined10:12
osse (assuming you don't have any non-push commits for your second client)10:12
dbacc osse: that worked, thanks! And no, it just kept rechanging certain things10:14
libertyprime joined10:19
sunri5e left10:21
sunri5e joined10:25
fphilipe joined10:25
charolastra joined10:26
statusf90 joined10:29
fphilipe left10:30
charolastra i've got a customer that wants the web-deployment through git on a self hosted repo. the project is already composed of various submodules. would you copy everything, strip all of git from the directory tree and then commit/push it to that private repo or are ther bette ways?10:30
palooka-jock joined10:30
FH_thecat joined10:31
BonusPlay left10:37
BonusPlay joined10:37
pandakekok9 left10:42
igemnace left10:44
figuinhas joined10:47
pandakekok9 joined10:50
glosoli left10:52
barteks2x joined10:58
fphilipe joined10:59
igemnace joined11:00
glosoli joined11:03
fphilipe left11:04
glosoli left11:06
doublex__ joined11:10
ledx left11:11
AndrewPRS left11:14
doublex_ left11:14
AndrewPRS joined11:14
chele left11:14
jimender2 left11:14
chele joined11:14
beastDiv_ left11:14
JanC left11:15
JanC joined11:15
glosoli joined11:17
xco left11:22
CCR5-D32 joined11:28
Brainium joined11:29
osse !deploy11:31
gitinfo Git is not a deployment tool, but you can build one around it (in simple environments) or use it as an object store(for complex ones). Here are some options/ideas to get you started: http://gitolite.com/deploy.html11:31
charolastra thanks11:38
statusf90 left11:39
torbjorn joined11:40
Lucas_Gray joined11:40
Matej8 left11:41
torbjorn In a particular application I need a file to be checked out and not have its newlines modified. the rest of the files in the repo I don't care about, and the default handling is probably fine.11:41
well this is part of a test case. Do I need to just handle this problem in my test code, ie have it string replace on all newlines in the file and write them to a temp file, or can I tell git not to touch the newlines of this particular file only?11:42
ah .gitattributes perhaps11:43
troulouliou_dev joined11:44
catphish joined11:45
sickdyd joined11:45
pandakekok9 left11:46
osse torbjorn: yeah. 'filename -text' > .gitattributes11:46
sickdyd hello! how can I create a github repo by command line?11:46
osse !hub11:46
gitinfo Hub is a wrapper around git which provides specific github features to the git cli. See https://github.com/github/hub for details.11:46
osse !spindle11:46
gitinfo [!git-spindle] https://github.com/seveas/git-spindle is a handy tool to use the features of GitHub (and GH Enterprise), GitLab, BitBucket and possibly more from the command line.11:46
sickdyd I have my project and I'd like to push it to github without having to go on the website11:46
osse those two probably do the trick11:47
sickdyd osse: cheers11:47
pandem1 sickdyd: https://hub.github.com/11:47
sickdyd pandem1: thanks11:47
catphish i have a branch that i've reset back a few commits, and added some new commits, i would like to push it to a remote, is there a way i can create a new commit that points to my new tree, completely disregarding what's at the remote, but which has the remote as a parent, essentially i want a push -f of my branch but i don't want to actually force a push11:48
cadabrax Hey, what was this webpage to help you out with most git problems where it would ask questions to understand what's happening and then suggest commands to run to fix it?11:48
torbjorn osse: thanks!11:49
bremner cadabrax: google? (sorry, could not resist)11:49
cadabrax haha no11:50
it was a few years ago on this channel IIRC11:50
mikecmpbll joined11:51
catphish looks like "git merge -s ours origin/branch" is what i want11:52
lefne left11:52
flaviodesousa joined11:53
prc94 joined11:53
prc94 left11:53
Rashad joined11:54
OnkelTem left11:54
cdown_ joined11:55
cdown left11:57
cdown_cdown11:57
statusf90 joined12:00
royal_screwup21 joined12:00
cd joined12:01
emihir0 joined12:02
oatmealraisin joined12:02
royal_screwup21 left12:04
thevishy joined12:04
royal_screwup21 joined12:10
milkt_ left12:13
oxymoron93 cadabrax is this it: https://sethrobertson.github.io/GitFixUm/fixup.html12:13
Lucas_Gray left12:13
cadabrax oxymoron93: yes, thank you12:15
Rashad left12:15
oxymoron93 it is under _fixup if you ever need to recover it12:16
cadabrax good to know, thank you12:16
milkt joined12:16
Lucas_Gray joined12:17
oxymoron93 tho I never read it, it seems like a nice project this Seth did12:18
gitter1234 man i love this feeling... when you're done with your app and can finally lower your shoulders12:19
and actually enjoy rebasing going from the initial commit to the last, cleaning up things as you go :)12:20
sbeyer left12:20
fphilipe joined12:26
mowcat joined12:27
lucasb joined12:28
haiiokarin joined12:29
enoq left12:32
enoq joined12:36
trittweiler I have a file which was deleted locally. Is there a way to find out *when* that file was deleted?12:40
oxymoron93 git diff --diff-filter=D -- file something like that12:42
git log12:42
pardone me12:42
yeah, seems like I haven't misspelled option: https://git-scm.com/docs/git-log#Documentation/git-log.txt---diff-filterACDMRTUXB8230820312:43
trittweiler The file is only deleted locally, not as part of a commit. `git status` lists it as "deleted"12:45
an unstaged delete12:45
It's a silly question, thinking about it. There is no way for git to have a track of this12:46
aw1 joined12:47
oxymoron93 sure, if just deleted, git status will give you the info :)12:47
_ikke_ trittweiler: correct, git does not know *when* it was deleted12:48
oxymoron93 just recently12:48
_ikke_ you could delete it, and run git status a year later12:48
catphish left12:55
sybariten left12:56
azwieg103 joined13:02
thevishy left13:06
R2robot joined13:10
TomyWork joined13:13
johnny56 left13:18
royal_screwup21 left13:20
clime joined13:21
crose joined13:22
ShapeShifter499 left13:23
glosoli left13:23
BeerLover left13:24
glosoli joined13:25
johnny56 joined13:26
milkt_ joined13:30
chrisml` joined13:30
chrisml left13:30
milkt left13:32
clemons1 left13:32
aw1 left13:32
feriman left13:33
clemons1 joined13:33
feriman joined13:35
royal_screwup21 joined13:36
CryptoDavid joined13:42
Lucas_Gray left13:42
Paradisee joined13:43
cfoch joined13:46
royal_screwup21 left13:52
fercell joined13:53
fercell left13:58
hendry1 left14:04
sidetrack joined14:05
Tobbi_ So, apparently, I changed my default push target using the command git push -u azure --all. Assuming I want to set it back to origin, do I simply do git push -u origin --all14:11
?14:11
Or can I destroy stuff?14:11
I mean, will that destroy stuff?14:12
kjartan left14:16
crater2160 joined14:16
crater2160 left14:17
crater2150 left14:18
crater2150 joined14:18
kjartan joined14:18
causasui joined14:20
_ikke_ Tobbi_: git branch --set-upstream-to14:24
Tobbi_ _ikke_: Can I update multiple branches like that?14:24
_ikke_ Not in one command14:25
justanotheruser left14:25
glosoli left14:25
dedowsdi left14:25
Tobbi_ Hrm...so that command above git push -u origin --all won't re-set it to origin? (I can't test because origin is currently not available)14:25
glosoli joined14:27
glosoli left14:27
xco joined14:31
oxymoron93 left14:34
g4570n joined14:34
justanotheruser joined14:37
SteffanW joined14:39
Noti left14:40
dionysus69 joined14:43
enoq left14:44
oatmealraisin left14:44
seraphire left14:44
duderonomy left14:50
thiago joined14:53
donofrio left14:53
shady_traveller left14:55
CodeSlingerPaul joined14:56
glosoli joined15:00
Noti joined15:01
Dirak joined15:01
statusf90 left15:01
SteffanW left15:05
Dirak left15:06
bvdw left15:09
bvdw joined15:10
jaziz left15:10
im0nde_ left15:10
Anthaas left15:10
comptroller left15:11
Anthaas joined15:11
g4570n left15:11
zher joined15:15
ttoocs left15:15
hussam joined15:17
henrebotha[m] Curious about how Git stores linked working trees. I see .git/worktrees/my-branch has a huge file called index15:20
Is that file like a patch on top of the main working tree? Or what's happening there?15:21
sQVe left15:22
Dirak joined15:22
comptroller joined15:22
clime left15:23
g4570n joined15:23
haiiokarin left15:25
selckin can have one entry for every file in the repo, shouldn't be 'huge'15:25
sperry joined15:26
sickdyd left15:27
deltam left15:27
Dirak left15:27
sauvin left15:28
cadabrax how could I build a list of people who committed to a repo up to a certain commit in the past? I'd like to know who worked on a repo up until a commit from a year ago, but not include people who have worked on it later.15:28
thevishy joined15:29
xSke left15:29
selckin git log --pretty=format:'%an' --abbrev-commit --before='Fri Jan 17 08:05:24 2015 +0100' | sort -u15:30
omnireq_ left15:34
trittweiler left15:39
sauvin joined15:40
xalen7 joined15:41
truthseeker joined15:41
roadie joined15:42
Lucas_Gray joined15:42
xalen7 left15:43
bolovanos joined15:44
enoq joined15:44
bolovanos left15:45
bolovanos joined15:46
floppydh left15:47
comptroller left15:48
cousteau joined15:54
cousteau Hi!15:54
sperry left15:54
osse henrebotha[m]: that's just like .git/index, except for the other working tree15:55
cousteau Version control of MS Word documents? (any rich text document that can be opened in MS Word, not necessarily .docx)15:55
henrebotha[m] Ok so I guess I need to know how .git/index works then! Lol15:55
cousteau I was wondering if git can deal with RTF, but I'm not sure it's texty enough15:56
selckin its just a binary file to git15:56
is_null left15:57
cousteau Specifically I'm interested in whether there is a way to merge Word documents, because Word's merging tool sucks (and I can prove it, it's not a personal opinion)15:57
osse henrebotha[m]: the index is the "middle man" between commits and the actual files on disk. it's used for several purposes, most notably keeping track of what you've git add'ed15:57
cousteau Basically it lacks the three-way merge features a proper version control system has15:57
selckin cousteau: no15:58
cousteau :(15:58
RTF is a text format btw. But I don't know if it's the kind of text format that works fine with git15:59
thiago left16:01
durham joined16:02
osse I say just commit it and deal with it if it becomes a problem16:03
henrebotha[m] cousteau: this article covers some basic techniques https://blog.martinfenner.org/2014/08/25/using-microsoft-word-with-git/16:04
comptroller joined16:04
henrebotha[m] Git allows you to shell out to external tools for various purposes such as diffing16:04
It may be possible to use those to get a reasonable workflow16:05
prepend joined16:06
duderonomy joined16:06
gordonfish left16:07
gordonfish joined16:07
cousteau I don't know how reliable pandoc is for doc diffing16:07
Anon34623 joined16:08
Noti left16:09
sdgathman 90% of the problems people have with Word or LibreOffice are caused by using explicit formatting instead of styles.16:10
Once that finally gets drilled into their heads, the light goes on, and they realize that WYSINWYG is not such a bad idea. Latex is maybe too complex, but markdown is simple to learn.16:11
rafasc joined16:12
jackedin joined16:13
chele left16:13
_Warl0ck left16:17
dumb_moth left16:17
omnireq joined16:18
_Warl0ck joined16:19
dumb_moth joined16:20
oxymoron93 joined16:20
dumb_moth left16:20
_Warl0ck left16:20
neckutrek left16:24
thurstylark left16:25
charolastra is there no way to treat a submodule inside a master repository as just files? for the containing repo the git of the contained plugins doesn't matter16:25
gxt left16:26
zher left16:27
mobidrop left16:30
durham left16:31
vitaminx left16:32
tsprlng left16:35
is_null joined16:35
tsprlng joined16:36
fission6 joined16:38
thevishy left16:38
Cyrano joined16:43
henrebotha[m] I mean making it a submodule is explicitly saying you want to treat it as a Git repo, not just files16:43
rominron_ left16:43
fling joined16:43
thevishy joined16:43
omnireq left16:46
omnireq joined16:47
charolastra well, i just called it a submodule16:47
osse sdgathman: i find using styles is hard too :( am I a moron?16:47
beastDivision joined16:47
beastDivision left16:47
Silicium joined16:48
Silicium hi there16:48
greggerz joined16:49
Silicium when i do a git rebase to take changes from one branch into another, git will not change the commit ID. if i do it using a github pullrequest and rebase&merge, it changes them, why?16:49
durham joined16:50
Joel left16:50
fission6 left16:51
rfuentess left16:53
fission6 joined16:54
Anthaas left16:54
durham left16:55
xcm left16:56
xcm joined16:57
Anthaas joined16:57
z1haze joined16:59
thevishy left16:59
z1haze general process question here, but in our process, we use mostly a trunk based process, but we do have release branches in which features are merged into, and then when the release is stable, that gets merged into master.. I keep getting into arguments with someone who is rebasing their feature branches onto the release that its going into rather than master17:00
Am i wrong for this? My thought process is if you rebase your feature onto the release, and then the release gets something pulled out, then your feature could potentially have commits in there that shouldn't be17:01
durham joined17:02
emihir0 left17:02
durham left17:02
osse Silicium: I think you're wrong. git rebase almost always changes commit IDs17:03
unless you're already rebased and there's nothing to do17:03
z1haze that is not for me, right?17:05
osse no17:05
thevishy joined17:05
z1haze cool, thanks. just making sure because "i think you're wrong" came right after asking if im wrong :D17:05
Silicium osse: i dont know what i'am doing different but it doesnt in my case17:06
same timestamp same id17:06
osse that sounds *very* strange17:06
can you !repro17:06
gitinfo [!transcript] Please paste (using https://gist.github.com/ or similar) a transcript ( https://git.io/viMGr ) of your terminal session so we can see exactly what you see17:06
Silicium nope, since it is an internal one, sorry17:07
is_null left17:07
igemnace left17:07
osse i don't need to see the code. just the commands you run and some shas17:08
but anyway, if you can do git rev-parse HEAD and then git rebase whatever and then git rev-parse HEAD again, and it prints the same thing then you are a wizard17:08
thiago joined17:08
micro4lpha joined17:09
lefne joined17:09
micro4lpha what is the best practice to develop on a dev branch and then merge to a master branch (I need to modify some values after I merge to the master branch) and I don't want it to be an individual commit on the master branch. Basically to have two environmnets at the same time17:09
dev and prod17:09
charolastra you keep those individual settings out of git. if it's for web you can use environment variables17:11
prc94 joined17:12
flaviodesousa left17:13
is_null joined17:15
rafasc z1haze: usually once you have a release-branch, only bugfixes get merged.17:17
lefne left17:17
lefne joined17:18
rafasc z1haze: but creating feature branches on the oldest relevant commit is also common. Because it allows you to merge features independently.17:18
z1haze rafasc, thanks.. so in that case.. what do you do with a feature that still needs to be tested? does it not get merged into a release until it is tested?17:18
micro4lpha charolastra: the thing is those settings are java spring boot and they are needed for profile settings17:18
Anon34623 Good $timeoftheday, everybody. I am fairly new to this channel, so excuse me for probably not formatting my message in an appropriate manner. In any case, I would like to ask a git-related question. I am using Arch and I've been trying to set up my own git server on nginx with gitweb (for web interface) lately, and it works great, except for the fact default git http backend doesn't really have any authentication options besides those on the webserver17:19
side, such as basic password-based authentication, which is much less than I need. My goal is to have an authentication level sufficient to provide account-based access to repos (not just git itself). I found that gitolite is a good way to achieve this, but I haven't been able to find any relevant documentation on integrating it into my git (nginx/git-http-backend/gitweb) setup, only some information in regards to Apache. Can anyone provide me with such a17:19
piece of documentation or with a sequence of actions I am required to take in order to make it work? Alternatively, if implementation of gitolite is impossible in such a setup, are there any similar alternatives for gitolite with similar authentication capabilities? My current nginx conf file looks like this: https://upaste.de/P8817:19
z1haze rafasc, that is my understanding too.. we have an issue though where a feature will get merged into the release, because QA tests the release branch, and they find too many issues so that feature has to get pulled out of the release, which requires we rebuild the relase17:19
micro4lpha like while it's on dev I want it to load spring.boot.profile=dev, when it's on prod i want it to load spring.boot.profile=aws17:19
charolastra micro4lpha: no idea about java but you need to keep it out of git17:19
z1haze so i guess we are just missing the piece of what do we do with a feature that we aren't sure is ready to go into the release, because it hasnt been given a green light by QA to get merged17:19
currently, we deploy the feature solo to a test instance and they test it there and give the thumbs up, if that happens they it gets merged to the release.. but the flow for that is clunky17:20
rafasc z1haze: depends, there are numerous way to make an workflow, for example in the git project the various feature branches are merged into something called pu (proposed updates) where various features are tested together to see if they may interfere between them.17:20
then each feature goes throw a promoting process until it reaches master. pu -> next -> master.17:21
cd left17:21
micro4lpha charolastra: can't keep it out of git as it gets built on Amazon into a docker container and has to be inside the file17:21
nutron left17:22
micro4lpha i'm sure someone has another solution17:22
z1haze so the pu branch isnt an eternal branch?17:22
like a 'develop' branch.. because i def don't want to go that way17:22
rafasc No, it gets rewritten all the time. But the git process is different, because you do not use branches. You submit patches via email, and all the branches are managed by the maintainer.17:23
z1haze currently we have likea hybrid of trunk based with releases.. maybe i should look into going full into trunk based process17:23
thevishy left17:23
z1haze via email?17:23
oh geez17:23
rafasc git and the linux kernel are both managed via email.17:25
dzho Anon34623: I don't know about making such integrations. I do know that pagure builds atop gitolite to offer web access to repos.17:25
beyond that there are things like self-hosted gitlab, gitea, gogs, kallithea ...17:26
trac, I suppose17:26
mikecmpbll left17:27
Khisanth left17:27
mikecmpbll joined17:28
thevishy joined17:29
z1haze rafasc, so people are emailing their code changes to files and a single individual patches that into a branch?17:29
why wouldnt the dev just make a PR17:29
rafasc because it's the workflow they use. There isn't a public repo you can PR agaist. All public repos are just mirrors.17:30
TomyWork left17:30
thevishy left17:31
rafasc if your really want to contribute to git via github PRs, you can use https://gitgitgadget.github.io/ which is a bot that converts the PRs into mail submissions. It's managed by the git for windows maintainer.17:31
localhorse joined17:31
rafasc remember that github and git are different things. !git_vs_github17:32
gitinfo [!github_vs_git] github.com is not git; it's a hosting platform for git. There are alternative hosting offers (you can even host repositories yourself, or work on something on your own without any hosting whatsoever), and the range of features on the corresponding websites may differ. Git has little influence on what happens in github's web interface.17:32
mat001 joined17:32
fphilipe left17:33
zher joined17:34
mikecmpbll left17:36
thevishy joined17:37
Khisanth joined17:40
oxymoron93 left17:41
fission6 left17:42
kleisli joined17:46
thevishy left17:46
nickodd joined17:49
is_null left17:50
Jackneill left17:50
azwieg103 left17:51
azwieg103 joined17:51
dzho speaking of email-based workflows, this also reminds me that SourceHut is a thing17:51
fission6 joined17:52
Dirak joined17:53
orentanay joined17:53
prc94 left17:54
FFY00 left17:58
FFY00 joined17:58
Dirak left17:59
sgen joined18:05
clime joined18:05
truthseeker left18:07
prc94 joined18:12
sbeyer joined18:12
igemnace joined18:14
gitter1234 left18:15
Lucas_Gray left18:15
savolla joined18:15
amcclure left18:15
lungaro left18:17
amcclure joined18:18
xalen7 joined18:19
Phylock joined18:19
leeN joined18:20
Paradisee left18:24
igemnace left18:29
plexigras joined18:31
Dirak joined18:41
dbacc left18:41
igemnace joined18:42
FLHerne z1haze: Note that git has various commands like `send-mail` and `mailsplit` that mostly automate that process18:44
fission6 left18:44
FLHerne (most projects/devs with such a workflow have various shell-scripts as well)18:45
H2Q joined18:46
vicfred left18:46
vicfred joined18:47
oatmealraisin joined18:48
zher left18:49
fission6 joined18:50
z1haze im just trying to fight this git-flow argument18:52
we have a guy whos just dead set on changing to that18:52
most of us prefer trunk, but what we currently have isnt really either.. maybe a mashup18:52
erebel55 joined18:53
erebel55 lo18:53
enoq left18:53
z1haze definitely curious to hear the rooms opinion18:53
_ikke_ those workflow models are mostly just that, models18:54
erebel55 I canceled an in progress branch change and now I'm stuck with a ton of staged and unstaged files. I hadn't changed any files myself, so there is nothing to lose. But is there anyway to fix my repo without deleting and repulling everything?18:54
_ikke_ I think no one hear would argue you have to adhere exactly to a certain workflow18:54
rafasc erebel55: yes, but depends on what you mean by "fix my repo".18:54
orentanay I'd like to setup 3 repos for a Magento 1.x multi store scenario where the base installation and package/theme are at the root and sub directories (this would be repo1), but then the packages for my other stores themes are split between 2 root level subfolders (app and skin), and within those sub folders are the files and sub folders for templates and styling that I want to be my seperate repos18:55
(repo2 /app/package1/ and /skin/package1/) and (repo3 /app/package2 and /skin/package2). I'm guessing I can just add the use the gitignore for repo1 to exclude the directories for what I want in repos 2&3, but how would I setup Repos 2&3? sorry for the long cryptic description. Thanks.18:55
_ikke_ z1haze: You have to use what makes sense for your project18:55
glosoli left18:55
_ikke_ z1haze: git flow is mostly geared towards projects that work with (sometimes multiple) stable releases18:55
rafasc _ikke_: I think what z1haze is trying to figure out is if git-flow makes sense for their project.18:55
erebel55 I just want to get back to a point where I don't have any staged/unstages files. So get back to a clean slate on either the branch I had checked out when I canceled or the branch I was switching to.18:55
_ikke_ rafasc: yes, I was following up on that18:56
z1haze we USUALLY have a single running release, 2 week sprints18:56
there are occasions when the sprints are a bit longer, and MAY result in 2 release being in development at the same time, but this is very rare18:56
rafasc erebel55: if you use git status, it should tell you how to unstage changes.18:57
_ikke_ z1haze: THe nice thing is that you can adopt your workflow to what makes sense at any given moment18:57
fission6 left18:57
fphilipe joined18:57
rafasc erebel55: on recent versions of git, "git restore --staged :/" will unstage everything.18:57
_ikke_ Have a single release, just work on master with feature branches and make a release when you're ready18:57
working on multiple releases? Maybe branch of for a certain release while still continue to develop for the next version18:58
z1haze _ikke_, that's exactly what we do now18:58
we branch features off master, then create a release when ready18:58
merge those features into the release18:58
and releae gets tested18:58
_ikke_ z1haze: And I would argue you could still call that kind of git-flow (maybe a lighter version, which is sometimes also called github flow)18:59
z1haze the issue we have though is that features don't get tested (by qa) until they're merged into the release. and if qa finds a lot of issues, we end up having to back that feature out of the release, and its a pain in the ass18:59
rafasc erebel55: with older versions, git reset; will do it.18:59
glosoli joined19:00
zher joined19:00
_ikke_ z1haze: Not sure how git-flow would solve this though. At some point, you have to wait until features get merged, or they will have to test individual feature branches19:00
rafasc what kind of qa is that? quality assurance only after the code is considered releases? o.O19:00
fission6 joined19:01
_ikke_ Kind of a waterfall model19:01
you first do all the development, once everything is finished, you hand over to QA19:01
nickodd left19:02
_ikke_ z1haze: Is there no way for QA to test whatever is in master at any given time?19:02
z1haze heh, look at production i guess19:02
that is master19:03
_ikke_ But isn't that already too late?19:03
rafasc once everything is finished should be different than considering it a release. Ideally, finish - handover to QA - get thumbs up from QA - promote it to release.19:03
z1haze we dont merge into master until qa says its good19:03
_ikke_ Wouldn't you want to test things before they go to production?19:03
z1haze of course dude19:03
hold on a second, i think you've misunderstood me19:03
_ikke_ yes, I think so19:03
z1haze day one of sprint is like this: release branch created off master, then all features are created off master.. developers submit PR to release branch as they finish, PR is merged into release19:04
the issue is we dont really have a process for QA to test individual or even combined features before they get into the release branch19:04
and if durign testing the release branch qa finds issues witha particular feature, we have to revert that feature from the release, and if there were a lot of commits/changes it can be a pain19:04
_ikke_ z1haze: ok, git flow is more like this: everyone branches of from master for their feature branches. Once they are considered ready, they get merged to master19:05
z1haze uh?19:05
git flow is where everything is merged into the develop branch19:05
_ikke_ Euh, right19:05
Which is your integration branch basically19:05
z1haze we don't have that.19:06
we have a release branch19:06
the release branch is what is tested19:06
i guess we need to just think through a new process19:06
_ikke_ Yeah, but it sounds like you have a need for an integration branch19:06
where you can integrate new features which can be tested combined19:06
z1haze we were using the release branch as that branch19:07
rafasc And to consider common nomenclature. What you guys are doing are not what people commonly use release-branches for.19:07
munsterberg joined19:07
z1haze so the release was the integration tested branch19:07
but they want to be able to test these features independent before the release19:07
so i just need a some process to deploy features to an instance where they can be tested19:08
munsterberg for release branches, should merges be done directly to the release branch, or should they go through the devleopment branch first? I realize this question could probably use some context, so if you have any clarification questions, shoot19:08
_ikke_ munsterberg: sounds similar to what z1haze is asking about19:08
z1haze: another interesting aproach might be what git itself is doing19:09
munsterberg sorry, just joined missed the previous conversation19:09
rafasc munsterberg: !logs in case you're interested19:09
gitinfo munsterberg: [!irclog] Public logs of #git are kept at: https://gitirc.eu/log19:09
fission6 left19:10
munsterberg perfect thank you19:10
_ikke_ z1haze: the maintainer basically merges topics / features that are somewhat polished to pu (proposed updates)19:10
z1haze i heard someone say this earlier19:10
but then he said sometyhing along the lines of its all done via email19:10
_ikke_ But this branch is regularly rewritten19:10
yes, but that's just a detail19:10
cousteau left19:11
z1haze so basically its a 'develop' branch that isnt eternal19:11
_ikke_ It's basically a living integration branch19:11
z1haze yeah19:11
Codaraxis_ left19:11
z1haze so its just the same as my release is now19:11
except the release can be sure it has only stuff that will stay19:11
_ikke_ Well, the difference is that people don't build on it19:11
z1haze no one builds on the release either19:11
they shouldnt be anyway19:11
_ikke_ If some feature should be dropped, the branch is rebuilt19:12
z1haze correct19:12
that's how our release branch works19:12
rafasc No, you said you revert.19:12
pu actually drops the commits out of the log. The branch is rewritten.19:12
_ikke_ ok, but calling it a release branch can be confusing (people have expectations with that kind of name, like rafasc already mentioned earlier)19:12
fphilipe left19:13
z1haze well we dont use revert commits actually, we usually just literally rebuild the release19:13
yeah i totally get it19:13
but in my case it really is a release branch19:13
_ikke_ ok, but then there should be no issue merging feature so that they can be tested, right?19:13
fission6 joined19:13
z1haze because it is what ultimately will get merged into master19:13
Khisanth left19:14
z1haze not if we just keep rebuilding the release19:14
but i dont want to have to do that19:14
_ikke_ git itself has another intermediate branch19:14
z1haze its a pain, especially if there are a lot of commits19:14
_ikke_ pu -> next -> master19:14
z1haze so feature -> pu ... ?19:14
is next the release?19:14
_ikke_ next will be the next release :)19:15
z1haze and it goes from features into pu?19:15
xalen7 left19:15
rafasc For me the pain is that you guys are calling 'release branch' to something that the community call something else.19:15
z1haze rafasc, is it not a release though, this branch, though it gets rewritten (if necessary) ultimately gets tagged and merged into master when it goes to production19:15
how is that not a release19:15
_ikke_ yes, topic branch gets merged into pu after the first round of review19:15
munsterberg for my own clarification, what is 'pu'?19:15
_ikke_ munsterberg: proposed updates19:16
munsterberg ok thank you19:16
_ikke_ It's the first point of integration19:16
can be unstable19:16
features can be dropped again19:16
is regularly rewritten19:16
z1haze _ikke_, so how does the feature get a first round of review.. how can it be given a code review if there is nowhere to submit a PR to.. how does it get build to a test instance if it is just a feature19:16
_ikke_ z1haze: in the case of git or in your case?19:16
Sasazuka joined19:17
z1haze git19:17
curious how they do it19:17
that's our sticking point19:17
_ikke_ You post a patch series to the mailing list (which is basically similar to making a merge / pull request)19:17
z1haze its hard to qa a feature without first submitting the PR to release and then merging then testing19:17
rafasc z1haze: doesn't make sense to call it release imho. release is something that you release to the public. Once you merge that to master, You could fastforward the release branch to that point, but call that branch that gets rewritten "release" is outright confusing because that's not what the community expect from a release branch.19:18
z1haze we do fast forward master at that point19:18
and we tag that commit as a release commit19:18
rafasc I bet part of the confusion is people trying to apply things they read about "release branches" to your workflow.19:18
_ikke_ in git-flow, a release branch is the branch you create right before a release19:18
rafasc But it's simply not the same thing. Hence fights...19:18
lefne left19:18
_ikke_ It mostly contains commits to prepare the release, and maybe last-minute fixes19:18
z1haze fair enough19:18
jetchisel left19:19
z1haze so in your opinion, a release branch should be used for what? simply branching off the pu branch and .. ?19:19
sounds like in the end, once all dev is done, the PU branch and the RELEASE branch would be identical19:19
because they'd all have the same code19:19
_ikke_ No, the pu branch is always updated with new features19:20
z1haze but when it gets reset.. where does it get reset to19:20
to master?19:20
you guys said that it goes pu -> next -> master19:20
jetchisel joined19:21
z1haze does it actually go feature -> pu, then feature -> next?19:21
_ikke_ yes19:21
z1haze yes to which statement19:21
_ikke_ the latter19:21
z1haze so pu is literally just a intermediate integration/testing grounds19:22
_ikke_ exactly19:22
so it might be a good source for deploying somewhere to test around19:22
z1haze im trying to think of a logical jira workflow for that then19:22
and another question then -- i've always though it best to test individual features off master, so that this feature is the only thing in play.. if we are deploying the pu branch to test features, then we dont always know what the issue is19:23
sgen left19:23
_ikke_ A good CI system might help there19:23
but you need good automation to be able to actually deploy each individual feature19:24
rafasc there's also the personal jch, which is the attempt of the maintainer for the pu branch. But that's not part of the official flow, Junio just lets us peek.19:24
z1haze we have a basic one, well we use bitbucket's piplines and its decent19:24
caveman left19:24
z1haze the ci isnt our issue, its the number of environments we have19:24
the platform we develop on is a saas19:24
so we require their system, and we are limited on environments19:24
_ikke_ right, so you might need to adopt your workflow then as well19:25
z1haze we just deploy code to the 'instance' and it runs on their server19:25
_ikke_ I don't think it's feasible to test each individual feature in isolation (would be a point of contention probably)19:25
sauvin left19:26
Samian joined19:26
Samian how do I undo my last push to remote?19:26
z1haze reset and force push19:26
Samian I type git reset19:26
git force push ?19:26
huh?19:26
rafasc Samian: !rewrite19:26
gitinfo Samian: 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:26
z1haze `git reset --hard "HEAD^"` i believe will reset it. use --soft if you want to keep your changes staged19:27
_ikke_ that would just reset the last commit19:27
z1haze that's what hes asking19:27
_ikke_ They could have pushed more then one commit19:27
z1haze ah, good point19:27
jackedin left19:27
rafasc z1haze: please let they give more context, we don't even know if they know the consequences.19:28
_ikke_ git push origin <branch>@{1}:<branch>19:28
git push origin --force-with-lease <branch>@{1}:<branch>19:28
but yes19:28
context is important19:28
z1haze right on19:28
rafasc --hard --force* is all things that may put them in a situation harder to recover than what they have now.19:28
def_jam joined19:29
Samian when I type git rev-parse HEAD19:29
I get 5098016bf0afa573b33244cfc5ef5d35bd86017d19:29
eb0t_ joined19:29
Samian when I type git branch -a, for master it shows remotes/origin/HEAD -> origin/master19:30
eblip left19:30
eb0t left19:30
azwieg103 left19:31
lefne joined19:31
Samian fuck I hate fucking git19:31
Khisanth joined19:31
azwieg103 joined19:31
Samian I just want to undo the last push19:31
no one else has pulled from git since19:31
because it's just me and one other coworker19:31
rafasc the line remotes/origin/HEAD -> origin/master only tells you that the default branch of the remote is master.19:31
Samian okay19:32
CryptoDavid left19:33
Samian so the last commit to remote is 5098016bf0afa573b33244cfc5ef5d35bd86017d19:33
rafasc Samian: if you know the consequences, git reset --hard <ID>; git push --force-with-lease; for example19:33
Samian dangit19:33
rafasc but if there's anything that diverged after that commit, you will potentially be in trouble.19:33
Samian rafasc I'm trying to make sure I get the id stuff right19:33
I type git log remotes/origin/HEAD19:34
but it shows local log it appears19:34
rafasc no, it shows the same thing as origin/master19:34
figuinhas left19:34
rafasc which is your remote tracking branch.19:34
Samian okay yes nevermind19:34
rafasc !rtb19:35
gitinfo [!remote_tracking_branch] Remote-tracking branches (branches which start with e.g. 'origin/', listed by 'git branch -r') are read-only mirrors of the branches in another repository. They're updated by 'git fetch'. You can't edit them directly (trying to check them out results in a !detached HEAD), but you can create a local branch based on a remote-tracking branch using e.g. 'git checkout -b <branch> <remote>/<branch>'19:35
Samian so I want the last commit on remote to be ad94ddd6095d908427217415c3198f77c6e2778619:35
rafasc git reset --hard ad94ddd6095d908427217415c3198f77c6e2778; git push --force-with-lease;19:35
Samian got it19:35
rafasc but your buddy, needs to reset as well. Not pull19:36
_ikke_ or git push --force-with-lease origin ad94ddd6095d908427217415c3198f77c6e2778:master19:36
then you don't need to reset your current branch19:36
rafasc otherwise he will merge the thing again.19:36
lefne left19:36
Samian darn it says I need git ForcePush permission19:37
aha I'm figuring it out19:37
how to get permission19:37
woohoo it worked19:39
xcm left19:40
xcm joined19:40
oncall-pokemon joined19:41
erebel55 @rafasc Thank you so much, "git restore --staged :/" did it and was surprisingly fast19:41
rafasc erebel55: next time, type git status and read the hints. It tells how to undo most operations that affect it.19:42
lungaro joined19:42
Dirak left19:42
erebel55 I did try git status. I guess I should have pipped the output to a file19:42
rafasc it wouldn't mention the :/ part, I think it says <file>19:42
but yea19:42
erebel55 I think the hint is at the top and there were thousands of files, so I didn't see it19:42
Samian thank you guys!19:43
rafasc erebel55: ah, makes sense.19:43
caveman joined19:43
erebel55 But that is a good tip. I'll pipe to a file next time I run into it :)19:43
rafasc erebel55: or to a pager. e.g. git --paginate status19:45
Helenah left19:45
erebel55 ah I didn't know about pagers19:46
rafasc You probably use it when you use git log.19:46
But I think status doesn't paginate by default.19:47
Dirak joined19:47
Helenah joined19:47
foul_owl left19:47
glosoli left19:48
gioyik joined19:48
Samian rafasc my buddy never pulled after I did the screw up push19:51
but he still needs to do a reset too?19:52
g4570n left19:52
Samian he needs to type a reset command?19:53
Mattiaslndstrm left19:53
rafasc if he never pulled or fetched (some tools fetch automatically) the "wrong" commit, they should be fine.19:53
Samian woohoo19:53
thanks rafasc19:54
jetchisel left19:54
keynaris joined19:55
jetchisel joined19:56
caveman left19:56
rafasc you're welcome.19:56
relipse joined19:59
g4570n joined19:59
relipse how do I add all untracked folders with /ja/ in their name19:59
Trieste left19:59
relipse listed under Untracked files19:59
glosoli joined20:02
orentanay left20:02
rafasc relipse: git add :/**/ja/**20:03
note that git doesn't track directories, only files.20:04
Trieste joined20:04
rafasc So only things that have files at the end will be added. If you have a structure of empty dirs you'll need to add a placeholder, e.g. a .gitignore with an '*' pattern.20:05
keynaris left20:06
relipse ok thanks what is : for20:06
Dirak left20:07
rafasc the :/ is git pathspec to denote the root of the repository.20:08
osse TIL pathspec works for untracked files20:09
rafasc it also helps ensure that what you pass isn't substituted by the shell.20:09
osse: I think this might be new, because I had the impression it didn't.20:10
but tried and it worked.20:10
kleisli left20:11
osse it's been like that at least since 2008 :O20:12
or maybe "pathspec" meant something else then :p20:12
skelletor joined20:15
caveman joined20:17
funhouse joined20:17
funhouse Hi there, just created a private repository, how do I add my folder and files to it in linux?20:17
jess left20:17
jess joined20:17
pandem1 you created a local git repo or a repo on lab, hub or some other online service?20:19
glosoli left20:20
_Warl0ck joined20:21
dumb_moth joined20:21
kreyren left20:22
kreyren joined20:23
owlscientist joined20:24
fission6 left20:24
fphilipe joined20:25
Lucas_Gray joined20:26
troulouliou_dev left20:26
jamiejackson joined20:27
skelletor left20:27
goh joined20:28
goh What's the best tutorial for git conflict resolution?20:28
_ikke_ !eek20:28
gitinfo [!eekaconflict] Merge conflicts are a natural part of collaboration. When facing one, *don't panic*. Read "How to resolve conflicts" in man git-merge and http://git-scm.com/book/ch3-2.html#Basic-Merge-Conflicts then carefully go through the conflicts. Picking one side verbatim is not always the right choice! A nice video explaining merge conflicts: https://www.youtube.com/watch?v=zz7NuSCH6II20:28
pandem1 damn, the bot has everything20:29
_ikke_ We make sure it does :)20:29
Syzygy left20:30
goh If the key advice is *don't panic*, maybe the keyword shouldn't be "eek" :)20:30
_ikke_ goh: the response to "eek" is don't panic :)20:30
goh Is vimdiff a decent merge tool? I'm working remotely via SSH, so need something terminaly20:31
comptroller left20:31
_ikke_ goh: The default colorscheme is awfull to me, so you might want to tweak that20:31
zher left20:31
_ikke_ goh: it's a decent tool, you just need to know how to work with it20:32
goh I'm just really confused by what REMOTE, LOCAL, BASE mean20:32
I want to be able to quickly jump to the points of conflict, see why that conflict occured, and resolve it.20:32
_ikke_ Those are the 3 components of a 3-way merge20:33
goh heh, 3-way20:33
I guess the page in the link will explain?20:33
_ikke_ https://www.rosipov.com/blog/use-vimdiff-as-git-mergetool/20:33
zher joined20:33
Codaraxis joined20:34
_ikke_ ]c and [c to jump between conflicts20:34
goh nice20:34
In this case I'm not sure why there's even a conflict20:34
_ikke_ :diffget <pattern> to get the change from one of those files (:diffget RE to get REMOTE, etc)20:34
goh LOCAL and BASE appear to be identical20:35
kleisli joined20:35
_ikke_ add / add to the same location is a conflict20:35
touching the context of of another change is a conflict20:35
goh I should probably understand what a 3-way merge actually means.20:36
veegee joined20:36
_ikke_ progit does not seem to explain that20:38
https://www.drdobbs.com/tools/three-way-merging-a-look-under-the-hood/24016490220:38
skelletor joined20:38
duderonomy left20:39
comptroller joined20:39
duderonomy joined20:40
learning1 left20:41
skelletor left20:42
goh thanks!20:44
sidetrack left20:45
munsterberg left20:48
duderonomy left20:48
cdown left20:48
learning1 joined20:49
AndyAndyBoBandy joined20:49
cdown joined20:50
royal_screwup21 joined20:50
AndyAndyBoBandy Can anyone recommend a good TUI for github issues and/or PRs? I currently use stephencelis/ghi which is ok, but last updated 2016. I also see jsmits/github-cli last updated 2012. I know hub, but that seems to just open the pages in a browser, whereas I'm looking for a TUI or CLI.20:50
azwieg103 left20:51
azwieg103 joined20:51
_ikke_ Not aware of anything20:53
rafasc AndyAndyBoBandy: git-bug has a github bridge.20:55
goh So a 3-way merge is just merging two conflicting changes based on the file state before these changes, right?20:56
(That's the "third" part)20:56
_ikke_ goh: it's a way to find what is actually a conflict and what is change just made on one side20:57
rafasc goh: yes, all that happened in between is ignored.20:57
_ikke_ If you just compare two files, you have no idea what part to pick from what side20:57
By comparing each side to a common ancestor, you know what part of a file changed, and what part remained the same20:58
goh So if I look at my conflict, and LOCAL and BASE are the same, that means REMOTE just introduced a change and that's it?20:58
_ikke_ yes, but is LCOAL and BASE exactly the same?20:58
s/is/are20:58
goh BASE is the common ancestor, what are LOCAL and REMOTE?20:59
rafasc remote is what you are merging in, local is what you have.20:59
_ikke_ LOCAL represents HEAD21:00
goh I'm cherry-picking, not merging in this case21:00
rafasc git checkout master; git merge feature; local=master remote=feature base=common ancestor between master and feature21:00
goh about about rebase/cp?21:00
_ikke_ LOCAL is HEAD21:00
goh REMOTE is the commit I'm rebasing/cping?21:01
AndyAndyBoBandy rafasc: thanks, I'll look into git-bug21:01
_ikke_ goh: yes21:01
rafasc remote is the thing being picked, base is the parent of the thing being picked.21:01
goh the darkness of ignorance is banished by the light of knowledge!21:01
rafasc (cherry-pick actually a kind of merge in the background)21:01
(so is each 'pick' from rebase)21:01
goh rafasc: interesting, I thought it was a one-commit rebase21:01
_ikke_: LOCAL and BASE are not exactly the same21:02
That part of the file is exactly the same.21:02
The part REMOTE changed21:02
rafasc goh: It's more like rebase is a multiple cherry-picks sequentially, but yeah.21:03
goh But LOCAL has changes over BASE21:03
fission6 joined21:03
goh I _suspect_ some trailing whitespace was removed from the area of REMOTE's change21:04
which caused the conflict.21:04
_ikke_ yes, that would explain it21:05
goh The lesson is clear: never remove trailing whitespace ;)21:05
rafasc or never put them in.21:05
goh It's a joke21:06
I finally understand conflict resolutions, sorta21:06
Shentino_ left21:06
goh so I'm no longer afraid of conflicts21:06
I confirmed it's the whitespace btw21:06
_ikke_ :-)21:06
rafasc just wait until you hit one of those created by the recursive strategy.21:06
:D21:06
goh LOCAL removed some trailing whitespace from BASE, then REMOTE made a completely different change21:06
_ikke_ rafasc: :D21:07
goh rafasc: I'll prepare my resume so I can quit my job immediately in that case.21:07
_ikke_ rebase conflicts can be daunting as well21:07
rafasc kdiff3 helps me a lot.21:08
goh how is BASE identified?21:08
_ikke_ man git merge-base21:08
gitinfo the git-merge-base manpage is available at https://gitirc.eu/git-merge-base.html21:08
rafasc for merges ^21:08
goh OK, so it's just the merge-base of LOCAL and REMOTE, got it21:08
rafasc for cherry-picks it is the parent of you are picking21:08
goh i.e. most recent ancestor21:08
right, because in CP, REMOTE isn't part of the graph21:09
rafasc if you pick a merge, you'll need to specify the parent you want with -m N21:09
goh "pick a merge"?21:09
Dirak joined21:09
rafasc you can cherry-pick a merge commit.21:09
bvdw left21:09
goh Insanity.21:09
Did I tell you today I figured out the DAG is a Merkle Tree?!21:10
bvdw joined21:10
goh You seem less than impressed :|21:12
rafasc :)21:12
goh I wonder what the next quantum leap in VC will be.21:12
Like the sort of leap Git made over SVN. What will be the next such leap over Git?21:12
Codaraxis left21:12
rafasc brain upgrades21:13
goh anyway, since the DAG is a Merkle Tree, BRB adding "blockchain" to resume21:15
rafasc Not really, because usually when we say blockchain we also have the part about consensus.21:15
jcbitter joined21:15
rafasc git doesn't have that.21:15
Although, there was an implementation for jgit that I can't seem to find.21:16
irrgit left21:16
rafasc https://www.eclipse.org/lists/jgit-dev/msg03073.html21:16
_ikke_ "a digital database containing information (such as records of financial transactions) that can be simultaneously used and shared within a large decentralized, publicly accessible network"21:16
Sounds like git21:16
afaik, concensus is not a requirement for blockchains21:17
erebel55 left21:17
fphilipe left21:17
irrgit joined21:18
rafasc 90% of the time people say blockchain they mean the consensus kind. But I guess you're technically correct.21:19
https://dictionary.cambridge.org/dictionary/english/blockchain21:21
_ikke_ but a blockchain is not limited to cryptocurrencies21:21
rafasc directly mentions the crypto currency kind.21:21
_ikke_ ^21:21
wikipedia: "A blockchain, originally block chain, is a growing list of records, called blocks, that are linked using cryptography Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data (generally represented as a Merkle tree). "21:23
"A blockchain, originally block chain, is a growing list of records, called blocks, that are linked using cryptography Each block contains a cryptographic hash of the previous block, a timestamp, and transaction data (generally represented as a Merkle tree). "21:24
wrong one21:24
"The first work on a cryptographically secured chain of blocks was described in 1991 by Stuart Haber and W. Scott Stornetta They wanted to implement a system where document timestamps could not be tampered with."21:24
so the origin is not even cryptocurrency21:24
rafasc I agree, just wanted to show that even a seemly reputable source refer defines 'blockchain' as the consensus one.21:24
It will be probably one of those things that the meaning either gets blurred or changes.21:24
just my opinion.21:25
_ikke_ same with the term "crypto"21:25
rafasc hung up the phone.21:25
It's not the first time this happens.21:26
m0viefreak joined21:26
_ikke_ ofcourse not21:26
goh blockchain inherently has nothing specific to do with crypto21:26
there's applications in contracts for example21:26
rafasc anyway, git ketch would be the consensus blockchain version of git blockchain.21:27
goh git kvetch21:27
a revolutionary consensus algorithm21:27
Dirak left21:27
bolovanos_ joined21:28
goh who thought up all this stuff? like the DAG and how it should work21:29
Dirak joined21:29
bolovanos left21:32
duderonomy joined21:33
bolovanos_ left21:36
royal_screwup21 left21:37
eirc left21:37
eirc joined21:37
duderonomy left21:38
AndyAndyBoBandy left21:40
Inside joined21:42
Inside heyo! Anyone having problems with github right now?21:42
_ikke_ https://www.githubstatus.com/21:43
for me it's working21:43
fstd_ joined21:43
_ikke_ Though, it does feel sluggish21:43
learning1 left21:44
Inside I'm trying to deploy using capistrano and the script fails on a 'git remote update --prune' command. I can run the command manually and about 50% of the time it fails with a "Could not read from remote repository" error21:44
Sasazuka left21:44
goh Is Linus the one who designed the DAG and all the basic Git design?21:44
canton7 goh, most likely, unless he got the idea from somewhere else21:45
Sasazuka joined21:45
Inside Are you asking if he invented DAGs?21:45
canton7 I assumed, came up with the idea of using a DAG to represent history in a VCS21:45
owlscientist left21:45
xco left21:46
yonder joined21:46
Inside Don't all VCS use a DAG of some sort to represent history?21:47
goh Inside: Yeah, I'm asking if Linus invented graph theorey and modern computer science ;)21:47
Inside: nope.21:47
fstd left21:47
fstd_fstd21:47
goh Git was the first one afaik.21:47
royal_screwup21 joined21:47
Inside This is beyond me :)21:47
goh SVN and CVS use a very simple linear changeset model.21:47
canton7: using a DAG as a Merkle Tree to represent the commit graph is pretty genius.21:48
owlscientist joined21:49
owlscientist left21:49
Inside Hmmm. Anyone want to clone a repo from github and hammer 'git remote update --prune' a couple of times to comiserate with me? :)21:53
owlscientist joined21:57
zher left21:59
cdown_ joined22:00
oncall-pokemon left22:00
cdown left22:02
cdown_cdown22:02
shabius_ joined22:04
gioyik left22:04
voker57 left22:07
goh Can there ever be a case of conflict / resolution in a two-way merge?22:07
shabius left22:07
_ikke_ goh: in a two way merge, every change is a conflict22:07
goh !22:08
voker57 joined22:08
goh so every merge in git is a 3-way merge?22:08
nutron joined22:09
_ikke_ yes22:09
unless git cannot find a common ancestor (ie, when merging unrelated histories)22:09
goh what's the recursive thingie rafasc mentioned before?22:10
_ikke_ man git merge, look for merge strategies22:10
gitinfo the git-merge manpage is available at https://gitirc.eu/git-merge.html22:10
gioyik joined22:10
goh I have so much appreciation for Linus from learning Git22:10
is_null joined22:11
Shentino joined22:11
goh It's a bit ironic that he wrote an operating system in his 20s, and then much later wrote a VCS22:11
One wonders what a great OS he'd write if he was to do it now.22:11
_ikke_ That was mostly out of necessity22:11
They used to use bitkeeper, but they had a conflict (:p)22:12
FrozenKow joined22:12
goh Sure, but Git is pretty brilliant, with the DAG and all22:12
Imagine he used the same brilliance to write a new kernel from scratch22:13
rafasc more impressive that git was made in a week. If i recall correctly.22:13
at least the core part.22:14
_ikke_ It was a very bare-minimal version of git22:14
rafasc goh: linus also made subsurface, a scuba divelog manager. But no one talks about that.22:14
goh Linus designed the DAG in a week?!22:15
I should quit my job as an engineer, I'm not worthy22:15
Eugene implemented*22:15
goh It wasn't his design/idea?22:15
Eugene It's been an idea on/off for a long time; the original git implementation was really just "hash some objects together". It wasn't a full-fledged system.22:16
tjbp left22:16
_ikke_ It's barely comparibly (as a complete system) with how it works now22:16
goh Who came up with this idea?22:16
thevishy joined22:17
goh "The idea" == using a DAG to implement a Merkle Tree of commits.22:17
_ikke_ https://www.youtube.com/watch?v=4XpnKHJAok822:17
m1dnight_ left22:17
_ikke_ very early presentation from Linus on git22:17
rafasc goh: a merkle tree is a type of dag.22:18
pie_ joined22:18
Codaraxis joined22:18
m1dnight_ joined22:18
goh rafasc: fair, I'm interested in who thought of using it to implement a VCS22:18
eb0t joined22:20
feriman left22:20
eblip joined22:21
def_jam left22:22
eb0t_ left22:22
Shentino left22:23
pie_ left22:23
thevishy left22:24
FLHerne goh: Bitkeeper, Bazaar-ng and mercurial all predated git22:24
goh Bitkeeper already used Merkle Trees?22:24
goh moves on to worship the developer of Bitkeeper22:25
royal_screwup21 left22:25
Shentino joined22:26
zher joined22:26
_ikke_ FLHerne: I recall Mercurial and git being about the same age22:27
FLHerne goh: hg does; not 100% sure about Bitkeeper22:27
(but that definitely pioneered a lot of the conceptual model that git uses)22:28
_ikke_ Linus credits bitkeeper a big deal for the way he designed git22:28
goh per Wikipedia, Git and Hg initial releases are the same month22:28
April 200522:28
yashi joined22:29
FLHerne _ikke_: I remember the "what VCS should we use for the kernel...hey look, I wrote git" thread features Linus testing (and complaining about) hg22:29
Too damn slow at the time, IIRC22:29
thevishy joined22:29
FLHerne (possibly still)22:29
_ikke_ FLHerne: They have been using BitKeeper for some time22:29
FLHerne _ikke_: I know22:29
goh FLHerne: makes sense, as I believe Hg was originally written in pure Python22:30
much of the internals have since been replaced with C22:30
but Git is probably still faster.22:30
_ikke_ isn't it still mostly writtin in python?22:30
goh most or even all of the hot loops are in C nowadays22:31
so classic Python-with-C program.22:31
IIRC there's other stuff that makes it less efficient22:32
like the way the object database is stored.22:32
rafasc left22:32
_salt joined22:33
Sasazuka__ joined22:33
__salt left22:33
mud Ya, I'd imagine the "other stuff" is the big difference, since even git is a mix, it's not only C. And just the fact that linus heavily focused on speed as a UI goal from I'd assume the very beginning.22:33
_ikke_ yes22:34
mud Tech can matter a lot less than just what you focus on optimizing.22:34
_ikke_ "If it's not fast, it's not worth using"22:34
goh I wouldn't be so sure. There's still a big difference between a Python program that gradually replaced most of its hot loops with C, and a mostly pure C program22:34
m1dnight_ left22:34
goh AFAIL Perl is only used as glue in one-time operations?22:35
m1dnight_ joined22:35
_ikke_ Most scripts have been rewritten in C22:35
there are just a hand-full left22:35
goh It's sort of like buying a regular car and upgrading it to a racing car, vs getting a racing car with some very minor compromises :)22:36
Sasazuka left22:36
FLHerne goh: Quite a lot of git is/was made of shell scripts :P22:37
prepend left22:37
Arguggi left22:38
Arguggi joined22:39
_ikke_ mostly was22:39
kleisli left22:42
mud left22:42
goh FLHerne: a lot of shell with most of the key performance parts written in C would still outperform pure Python :)22:46
especially when the C parts are written by Linus22:46
BTW, is there a goal to eliminate Perl as a dependency of Git?22:46
thevishy left22:48
emmanuelux joined22:49
prc94 left22:50
azwieg103 left22:51
azwieg103 joined22:51
jetchisel left22:51
thevishy joined22:53
thevishy left22:57
ARoxdale joined22:57
fission6 left22:58
ARoxdale I'm working on a cross platform project and I'm asking about autocrlf settings. If I selected "autocrlf=input" apparently I will commit as LF. But are only by diff lines commited as LF, or is the whole file changed to LF?22:58
Mattiaslndstrm joined23:00
thevishy joined23:02
Mattiaslndstrm left23:02
_ikke_ goh: there is no direct goal23:04
alexandre9099 left23:05
thevishy left23:06
alexandre9099 joined23:08
Lucas_Gray left23:08
xcm left23:09
Lucas_Gray joined23:09
xcm joined23:10
Phylock left23:11
thevishy joined23:12
thevishy left23:14
fphilipe joined23:14
is_null left23:15
Dirak left23:15
SpeakerToMeat joined23:17
fphilipe left23:19
thevishy joined23:19
dartmouthed left23:20
Dirak joined23:20
gioyik left23:20
xelxebar left23:23
xelxebar_ joined23:23
DiscoDisconsented23:24
Phylock joined23:24
gioyik joined23:25
thevishy left23:26
Inside Welp, I'm still having weird github issues23:26
Or SSH issues - I can't tell. In the local VM that I am on, I can do 'git remote update' multiple times with no errors. On the staging environment, that command fails about 50% of the time.23:28
Jonno_FTW left23:31
thevishy joined23:31
zher left23:31
plexigras left23:32
Sasazuka joined23:32
TheJollyRoger left23:33
greggerz left23:34
Sasazuka__ left23:34
leeN left23:34
TheJollyRoger joined23:36
H2Q left23:36
thevishy left23:37
greatgatsby left23:41
ferdna joined23:44
oatmealraisin left23:44
kleisli joined23:44
dedowsdi joined23:45
Aelius left23:47
gioyik left23:50
Aelius joined23:51
thiago left23:52
clime left23:53
ferdna left23:54
Shentino left23:55

Logs Search ←Prev date Next date→ Channels Documentation