IRCloggy #git 2020-01-25

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-25

sveinse i'm not sure what git terms a commit thou, different vcs use different names00:00
williamboman left00:00
sveinse the unit of transactions00:00
williamboman joined00:00
rafasc the unit of transaction is commit in git.00:01
CodeSlingerPaul left00:02
sidetrack joined00:02
rafasc you can take the tip commit of the "subtree" and do something like: git branch --contains "hash"00:03
sveinse thus, if this commit is present in both repos, the commit is shared. So I need to verify that all commits of a are in b, but not the other way round.00:03
rafasc that will list all branches that contain that commit.00:03
sveinse rafasc: yes, I use that a lot when working with detached heads and trying to figure out where it belong00:04
lagothrix left00:06
omnireq left00:07
rafasc fetch from both repos then: git log --all --not $(git rev-parse --remotes=upstream)00:08
jaziz joined00:09
causasui joined00:09
rafasc that will list commits from this repo that are not present in the other one.00:10
thiago joined00:11
lagothrix joined00:11
rafasc im stupid00:12
git log --graph --decorate --remotes=origin/ --not --remotes=upstream/00:12
Gurkenglas left00:13
sveinse rafasc: there it is! Thanks! Perfect00:15
rafasc if you're using this for scripting, you should use rev-list instead of log00:15
but it's pretty much the same thing00:15
mbalmer joined00:16
andreas303 left00:16
sidetrack left00:17
sveinse rafasc: yeah, thanks. git log will do00:17
rafasc git log is not meant to be scripted around, unless you pass --format, I guess.00:18
andreas303 joined00:18
mbalmer left00:20
Newami joined00:20
yonder joined00:22
sveinse linux kernel is peksy. It is well above the nag limit on bitbucket and github and very close to the stoplimit on bitbucket. Pity when everything else of ours is there00:23
sidetrack joined00:28
Helenah left00:31
sidetrack left00:32
iNs_ left00:32
iNs joined00:32
Helenah joined00:33
oatmealraisin left00:35
user____ joined00:37
Newami left00:38
tanuki_ left00:38
user____toastedoats00:39
tanuki joined00:40
plexigras left00:41
swalladge left00:41
thomasrossGuest475700:41
thomasross_ joined00:41
Guest4757 left00:41
thomasross_thomasross00:41
swalladge joined00:42
Dirak left00:48
jcbitter joined00:50
jetchisel left00:52
jetchisel joined00:53
jcbitter left00:55
m1dnight_ left00:55
Dirak joined00:56
jcbitter joined00:56
m1dnight_ joined00:57
g00s joined00:57
jetchisel left00:57
jetchisel joined00:58
sidetrack joined00:59
Dirak_ joined01:01
Dirak left01:01
lucasb left01:01
jcbitter left01:02
jetchisel left01:02
jcbitter joined01:02
m1dnight_ left01:03
sidetrack left01:04
m1dnight_ joined01:04
jcbitter left01:08
jcbitter joined01:09
mbalmer joined01:10
oncall-pokemon left01:11
rustyshackleford left01:11
Aelius left01:14
Lucas_Gray left01:14
mbalmer left01:14
Aelius joined01:16
orbyt_ joined01:17
omnireq joined01:18
libertyprime joined01:21
m1dnight_ left01:27
prepend joined01:28
prepend left01:28
m1dnight_ joined01:29
igemnace joined01:29
dmc joined01:33
Fernando-Basso left01:39
g4570n left01:40
RonPaulHoff01:41
g4570n joined01:42
throstur` joined01:45
igemnace left01:47
throsturx left01:48
m0viefreak left01:49
austin987 left01:49
wildlander joined01:52
Sasazuka left01:53
mud joined01:56
Dirak_ left01:57
jetchisel joined01:57
Dirak joined01:57
mowcat left02:03
mbalmer joined02:04
leeN joined02:07
mbalmer left02:09
Olipro left02:13
sidetrack joined02:15
sidetrack left02:19
cd left02:20
Shentino left02:20
Shentino joined02:24
dartmouthed left02:30
CCR5-D32 left02:31
prepend joined02:33
prepend left02:36
igemnace joined02:37
duderonomy left02:37
thebope joined02:37
libertyprime left02:38
finalbeta left02:38
prepend joined02:39
thomasross_ joined02:40
thomasrossGuest8877302:40
thomasross_thomasross02:40
Guest88773 left02:42
netz left02:44
libertyprime joined02:46
finalbeta joined02:48
pandakekok9 joined02:49
F0rTex left02:51
F0rTex joined02:53
ketas left02:58
Anthaas left02:59
ketas joined02:59
Anthaas joined03:00
pandakekok9 left03:03
truthseeker_ joined03:03
zulutango left03:03
zulutango joined03:03
pandakekok9 joined03:09
statusf90 left03:10
thomasross left03:12
chandoo left03:15
causasui left03:18
dionysus69 joined03:18
Atlenohen left03:19
lagothrix left03:21
lagothrix joined03:21
thomasross joined03:23
toastedoats left03:30
Goplat joined03:33
statusf90 joined03:36
fattredd joined03:40
locrian9 joined03:41
delli3 joined03:43
pabs3 joined03:46
thebope left03:46
justinmrkva left03:47
pabs3 is there a way to create custom objects in git? I was thinking I want a "built-from" object to link a tree of built objects to the source files they were built from. (this is in the context of building a static website)03:48
justanotheruser left03:49
throstur_ joined03:50
rafasc that's a commit?03:51
a commit is literally a collection of files.03:51
with some extra metadata.03:51
throstur` left03:52
pabs3 commit is an object but a different type of object to what I want03:52
rafasc you can git hash-object -t blob <file>; to make blobs.03:53
libertyprime left03:54
rafasc then write a key-value pair, or whatever.03:54
Cabanossi left03:54
fattredd left03:55
rafasc or make a commit with all the build files, then merge -s ours <source>;03:55
Cabanossi joined03:55
rafasc If you want the source, SHA^2, if you want the built files SHA^1 or just the merge SHA.03:56
libertyprime joined03:57
rafasc Or, if you prefer: No, it's not possible to have custom objects.03:58
omnireq_ joined03:59
fattredd joined03:59
omnireq left04:01
monk12 joined04:05
mauz555 joined04:07
ARoxdale left04:09
justanotheruser joined04:10
libertyprime left04:12
beastDivision joined04:14
omnireq_ left04:14
omnireq_ joined04:15
Khisanth left04:18
mauz555 left04:18
dionysus69 left04:22
kurahaupo left04:23
Khisanth joined04:30
mud left04:37
rafasc left04:41
g4570n left04:42
beastDivision left04:46
statusf90 I know I'm probably going to get some biased answers asking here but I figured I may as well. If an employer asks for my github would it likely suffice to put my gitlab link and say I don't use github?04:46
mbalmer joined04:47
pabs3 statusf90: when asked for that I usually link to the page on my website where I link to the many different development system accounts that I have04:49
beastDivision joined04:50
mbalmer left04:52
duderonomy joined05:00
bket left05:01
pks left05:02
pks_ joined05:02
pks_pks05:02
bket joined05:04
sidetrack joined05:10
dtux joined05:13
bvdw left05:13
bvdw joined05:14
locrian9 left05:15
sidetrack left05:20
locrian9 joined05:21
xcm left05:22
xcm joined05:22
Dirak left05:23
begui left05:26
FH_thecat joined05:27
begui joined05:31
begui left05:32
P1RATEZ joined05:32
begui joined05:39
localhorse joined05:40
wildlander left05:48
Dirak joined05:54
throstur_ left05:56
pikapika left05:58
pikapika joined06:00
dtux left06:01
howdoi left06:02
prepend left06:08
fragamus joined06:15
nickodd joined06:15
monk12 left06:20
Hello71 left06:28
justanotheruser left06:29
jadax left06:30
Hello71 joined06:34
mbalmer joined06:35
Beam_Inn joined06:39
Beam_Inn anyone chillin'? :D06:39
I'm trying to upload my local repo for the first time to my remote github location06:39
i learned how to bring a remote repo to my pc, but i didn't learn the command to send mine as master to a remote location06:39
mbalmer left06:40
statusf90 left06:42
CryptoDavid left06:42
orbyt_ left06:45
Beam_Inn oh i found it06:45
justanotheruser joined06:52
nika joined07:01
Celelibi left07:01
thebope joined07:02
fattredd left07:03
fattredd joined07:04
crose left07:08
Mattiaslndstrm joined07:13
sidetrack joined07:15
g00s left07:16
sidetrack left07:20
Celelibi joined07:20
badLuckJoe left07:28
thebope left07:29
no_gravity joined07:30
no_gravity Is there a way to do "git add ." but exclude untracked files?07:31
jetchisel left07:31
_ikke_ git add -u07:31
no_gravity _ikke_: Great, thanks!07:32
rustyshackleford joined07:32
mbalmer joined07:33
ferdna joined07:33
mbalmer left07:37
thebope joined07:39
sidetrack joined07:44
thebope left07:44
Khisanth left07:46
andreas303 left07:47
Beam_Inn hint: Updates were rejected because the tip of your current branch is behind07:49
sidetrack left07:49
_ikke_ It means either someone else pushed before you, are you have rewritten history07:50
Beam_Inn the only thing i've done is create the empty repo on github07:51
andreas303 joined07:51
_ikke_ did you enabled something like "add readme"?07:52
Beam_Inn no.07:53
https://github.com/Fohsap/yidenGit07:53
license07:53
_ikke_ right07:53
So if you already have a repo locally, you would need to overwrite this07:53
You could download that license file and commit that locally first07:54
no_gravity left07:54
Beam_Inn i did git pull and07:55
i mean that didn't work07:55
_ikke_ no, that's most likely not what you want anyway07:55
Beam_Inn fatal: refusing to merge unrelated histories07:56
merge: https://github.com/Fohsap/yidenGit.git - not something we can merge07:56
ferdna left07:56
_ikke_ Beam_Inn: I recommend just download that license file, commit it, and then git push -f -u origin master07:56
(assuming your remote is called origin)07:56
McSmelly left07:57
Beam_Inn i can't do that via gitbash?07:57
_ikke_ you can07:57
Beam_Inn i understand what you're saying not trying to be obnoxious07:58
_ikke_ well07:58
not the download part07:58
what you can do07:58
git fetch origin07:58
Beam_Inn i'm just wondering what's the proper gittierre way to do it07:58
_ikke_ git checkout origin/master LICENSE07:58
Khisanth joined07:58
Beam_Inn updated07:58
_ikke_ Then you should have that license file locally07:59
and can commit it07:59
Beam_Inn wow gitbash froze08:00
_ikke_ did you accidentally pressed ctr+s?08:00
try ctrl+q08:00
Beam_Inn ! [rejected] master -> master (non-fast-forward)08:01
_ikke_ you need to force push08:01
git push --force --set-upstream origin master08:01
thiago left08:01
Beam_Inn that sounds pretty aggressive, man08:01
but if i need to, I guess I will08:01
_ikke_ don't try to antropomorphise it :)08:02
you basically have 2 separate repositories nwo08:03
now08:03
and without explicitly telling it to, git won't merge those together08:03
and if you do, it would look messy anyway08:03
so better to just ignore what was on github already and overwrite it with what's in your local repo08:03
Beam_Inn this is crazy08:04
_ikke_ It's just because you selected to add the license file08:04
then github already starts the repo with commits which are unrelated to what you have locally08:04
Beam_Inn some day gitbash is going to allow shift-home and shift-a and stuff08:04
_ikke_ nice feature, but confusing if you don't know what's the consequence08:05
P1RATEZ left08:06
Beam_Inn after adding a remote location, is it a branch?08:06
like git checkout myremote08:06
_ikke_ no, it's a remote, not a branch08:07
a remote is more like a shortcut08:07
though git has some logic that when you checkout from a remote, it will use the 'default' branch for that remote08:07
rustyshackleford what is a branch exactly?08:08
its more like a tag08:08
i got an argument with someone about renaming a branch. "We already deployed. We don't want to create a new commit"08:09
_ikke_ rustyshackleford: a branch in git is basically 2 things08:09
renaming a branch is more like renaming a file in git08:09
rustyshackleford so I was trying to explain that a branch simply points to a commit08:09
_ikke_ correct08:09
You don't create a commit by renaming or creating branches08:09
rustyshackleford anyway, might give a talk on git. What's the proper terms for the relationship between a branch and a commit? what is a branch?08:10
it would be nice if there was someone's power point I could rip off08:10
_ikke_ rustyshackleford: in the most crude sense: echo {hash} >.git/refs/heads/{branchname}08:10
Beam_Inn rustyshackleford you want to deeply understand content that you'll be using in industry, eventually.08:11
_ikke_ !video08:11
gitinfo [!talks] Some good video talks about Git: [yt] http://goo.gl/z72s (Linus Torvalds: History&Concepts); [yt] http://goo.gl/R9H2q (Scott Chacon: Git basics, live examples); http://vimeo.com/35778382 (Randal Schwartz: Git basics, descriptional); http://vimeo.com/46010208 (Jessica Kerr: Git basics, descriptional)08:11
_ikke_ Beam_Inn: the one from Jessica Kerr is probably good in that context08:12
Beam_Inn: start at minute 1808:12
Beam_Inn can i ask you a question?08:12
rustyshackleford you already did08:12
_ikke_ !just_ask :-)08:12
gitinfo You can just ask your question. If anybody knows the answer, they will answer soon (most of the time)08:12
Beam_Inn so, i want to find a total synonym set for rust terms. :D08:13
rustyshackleford some people are good at presentations08:13
git happens08:13
already off to a good start lol08:13
pandakekok9 left08:14
Beam_Inn git happens, 163 megabytes08:15
Trieste left08:15
Mattiaslndstrm left08:15
mbalmer joined08:15
Mattiaslndstrm joined08:16
thebope joined08:16
Trieste joined08:18
Mattiaslndstrm left08:19
pabs3 left08:25
thebope left08:30
igemnace left08:38
truthseeker_ left08:39
jwynn6 left08:39
jimender2 left08:40
Mattiaslndstrm joined08:42
jwynn6 joined08:44
Trieste left08:46
Trieste joined08:48
Newami joined08:48
Cabanossi left08:48
Newami left08:49
Ploppz joined08:51
Ploppz left08:51
Ploppz joined08:52
_salt left08:53
_salt joined08:53
TheWild joined08:54
mat001 left08:55
barteks2x joined08:55
Cabanossi joined08:56
alfredb joined08:57
Gurkenglas joined09:01
Mattiaslndstrm left09:02
Mattiaslndstrm joined09:07
Mattiaslndstrm left09:09
Gurkenglas left09:11
Ploppz how can I understand better what happens when I try to rebase a path that has merges? What I mean is for example if HEAD = commit A, and I call `git rebase -i <commit B>`, and there have been some merges in-between.. and then in I choose to squat all but one commit. I get conflicts, even if there is one path from commit B to commit A (I mean, when09:12
thinking back, I started at commit B, made some commits and a couple merges, before getting commit A)09:12
mbalmer left09:12
mbalmer joined09:13
Ploppz I just want to take the current state (state = sum of all files), and apply the difference on top of commit B in a new commit09:13
Gurkenglas joined09:14
Beam_Inn what should i take away from this, _ikke_?09:18
_ikke_ Beam_Inn: a good visual way to explain branches and commits in git?09:19
Beam_Inn yeah it's nice but maybe too easy for me09:19
my questions are mostly about when things happen. maybe they call them lifetimes?09:19
and i just need to apply a lot of commands. I went through an advanced git course and did well, but I never applied any of it and lapsed it all09:20
Ploppz I found a solution: generate diff, checkout <commit B>, and apply patch09:20
Beam_Inn and also i hope i can eventually learn hos the git sourcecode works09:21
Goplat left09:23
tonythomas joined09:24
Gurkenglas left09:32
Dirak left09:33
nowhere_man joined09:33
alfredb left09:34
Fernando-Basso joined09:38
Belliash left09:42
Beam_Inn if anyone wants to tell me the most important chapters/sections, i would love that. :D09:45
lol09:45
if i want to be a pretty advanced user09:46
nika left09:46
nika joined09:47
fphilipe left09:48
Dirak joined09:49
Dirak left09:55
locrian9 left09:58
jetchisel joined10:00
akemhp left10:04
akemhp joined10:05
akemhp_ joined10:05
akemhp_ left10:06
dedowsdi left10:21
dedowsdi joined10:23
Belliash joined10:25
H2Q joined10:30
gxt joined10:30
fphilipe joined10:34
leeN left10:46
sidetrack joined10:48
truthseeker_ joined10:48
sidetrack left10:53
theoceaniscool joined10:54
nika left10:56
nika joined10:56
Dirak joined11:02
feriman joined11:05
dedowsdi left11:05
dedowsdi joined11:06
Dirak left11:07
royal_screwup21 joined11:07
bvdw left11:13
milkt left11:14
bvdw joined11:14
royal_screwup21 left11:14
CCR5-D32 joined11:15
royal_screwup21 joined11:17
xcm left11:20
royal_screwup21 left11:20
gxt left11:20
reprazent left11:20
xcm joined11:20
beastDivision left11:20
mbalmer left11:22
Dirak joined11:23
Giant81 left11:23
andreas303 left11:24
mowcat joined11:26
Lucas_Gray joined11:28
Dirak left11:28
andreas303 joined11:30
Exec1N joined11:30
omnireq_ left11:36
omnireq_ joined11:39
Helenah left11:43
Atlenohen joined11:44
Helenah joined11:45
random_yanek left11:49
Mattiaslndstrm joined11:49
mbalmer joined11:50
plitter left11:54
mbalmer left11:56
plitter joined11:57
omnireq_ left11:58
omnireq_ joined11:59
theorangeone left12:01
theorangeone joined12:01
gitter1234 joined12:03
random_yanek joined12:06
royal_screwup21 joined12:06
Exec1N left12:08
Lucas_Gray left12:10
troulouliou_dev joined12:11
Lucas_Gray joined12:12
mbalmer joined12:24
Trieste left12:26
thebope joined12:27
Trieste joined12:27
shored left12:28
mbalmer left12:29
shored joined12:30
Dirak joined12:31
thebope left12:33
brethil joined12:33
nowhere_man left12:34
Dirak left12:36
freakyy left12:38
freakyy joined12:41
greatgatsby joined12:46
plexigras joined12:48
Dirak joined12:52
m0viefreak joined12:53
cdown left12:54
causasui joined12:55
locktree joined12:55
locktree Morning12:56
Dirak left12:57
cdown joined12:58
locktree51 joined12:58
locktree51 left12:58
locktree left13:02
locktree joined13:02
locktree Morning13:03
locktree left13:05
mowcat left13:08
Gurkenglas joined13:10
causasui left13:11
H2Q left13:11
troulouliou_dev left13:14
enoq joined13:14
mescalinum joined13:15
mArtale joined13:17
mArtale left13:17
troulouliou_dev joined13:18
Shentino left13:22
cdown_ joined13:24
Shentino joined13:25
cdown left13:27
cdown_cdown13:27
royal_screwup21 left13:31
albel727 joined13:36
g4570n joined13:56
Lucas_Gray left14:06
dedowsdi left14:07
mat001 joined14:12
wildlander joined14:14
jaziz left14:26
thebope joined14:29
troulouliou_dev left14:30
thebope left14:33
Eryn_1983_FL left14:35
Eryn_1983_FL joined14:35
troulouliou_dev joined14:37
Dirak joined14:38
localhorse left14:39
yamppa joined14:45
g4570n left14:48
g4570n joined14:50
fragamus left14:56
CCR5-D32 left14:57
vicfred left14:59
plexigras left15:00
lucasb joined15:01
nickodd left15:07
mbalmer joined15:07
nickodd joined15:08
Mattiaslndstrm left15:08
mbalmer left15:12
troulouliou_dev left15:13
Mattiaslndstrm joined15:15
troulouliou_dev joined15:18
cd joined15:27
statusf90 joined15:28
cdown_ joined15:28
sidetrack joined15:30
cdown left15:30
cdown_cdown15:30
fragamus joined15:30
sidetrack left15:35
_homme__ left15:38
greatgatsby left15:43
cdown left15:48
FernandoBasso joined15:48
cdown joined15:49
sidetrack joined15:50
rustyshackleford left15:50
TheFuzzball joined15:51
Fernando-Basso left15:51
dgw left15:51
dartmouthed joined15:52
sidetrack left15:55
TheWild left15:56
dgw joined15:56
justanotheruser left15:57
Beam_Inn left16:00
nika left16:01
mbalmer joined16:01
begui left16:02
gumupho joined16:03
mbalmer left16:06
TheWild joined16:09
thiago joined16:10
fragamus left16:11
minionofgozer joined16:13
nickodd left16:13
Ploppz is there any way to do something like `git diff A B > patch ; git checkout A ; git apply patch` without creating a file `patch`, and possibly even without checking out?16:13
(and possibly also commit the changes to A)16:14
nickodd joined16:14
Ploppz well maybe I can use /tmp to host the patch file. But would be nice to not have to checkout anything16:14
sidetrack joined16:17
cavemancavewomanista16:20
mowcat joined16:20
greatgatsby joined16:21
_ikke_ Ploppz: You cannot apply patches without checking out the branch16:28
git checkout A; git apply - <(git diff A B)16:29
justanotheruser joined16:33
TheFuzzball left16:39
mescalinum left16:42
cbreak Ploppz: man git-cherry-pick16:44
gitinfo Ploppz: the git-cherry-pick manpage is available at https://gitirc.eu/git-cherry-pick.html16:44
begui joined16:44
Mattiaslndstrm left16:45
justanotheruser left16:47
ferdna joined16:55
mbalmer joined16:56
Mattiaslndstrm joined16:58
sgen joined16:58
crose joined17:00
mbalmer left17:00
H2Q joined17:02
tonythomas left17:05
rsrx joined17:07
TheFuzzball joined17:09
FernandoBasso left17:10
bvdw left17:13
bvdw joined17:14
sgen left17:15
sgen joined17:16
Dirak left17:16
sidetrack left17:16
sgen left17:17
oncall-pokemon joined17:18
justanotheruser joined17:28
Dirak joined17:32
rustyshackleford joined17:32
lightstalker joined17:33
Dirak left17:37
diogenese left17:38
kupi joined17:39
diogenese joined17:39
rafasc joined17:47
mbalmer joined17:50
mbalmer left17:54
TheFuzzball left17:58
truthseeker_ left18:02
CoolerX joined18:05
CoolerX hey18:05
how do I get this pull request? https://github.com/torch/distro/pull/25718:05
can I jump to that pull request?18:05
I cloned the original repo https://github.com/torch/distro18:05
TheFuzzball joined18:08
rafasc CoolerX: there are two ways: clone the repo that originated the PR, and checkout the branch.18:09
you can see the branch name near the open label.18:09
CoolerX rafasc, I think it is this one? https://github.com/Oskop/distro/tree/installdepscleanup18:10
rafasc or, clone the repo that is receiving the PR, and run: git fetch <repo> refs/pull/257/head:refs/heads/pr-25718:10
when I said clone, you can simply do remote add instead.18:10
CoolerX oh no it isn't18:11
TheWild left18:11
CoolerX which one is it?18:11
rafasc https://github.com/torch/distro/tree/installdepscleanup18:11
click on the name.18:11
CoolerX https://github.com/torch/distro/pull/257 the guy who made the pull request doesn't have any repos18:11
https://github.com/li01bin?tab=repositories18:11
rafasc the PR is being made from within the torch/distro repo.18:12
CoolerX rafasc, so git checkout installdepscleanup ?18:12
rafasc in this case, yeah18:12
sidetrack joined18:13
rafasc what I mentioned is the general case, which will work even if the PR originated from a fork.18:13
CoolerX ok18:14
greatgatsby left18:15
CoolerX rafasc, seems that branch isn't what I need18:15
rafasc, how can I switch to https://github.com/Oskop/distro/tree/patch-118:15
?18:15
rafasc git remote add selfcontained https://github.com/Oskop/distro;18:17
git fetch selfcontained;18:17
git checkout patch-118:17
sidetrack left18:18
RatSalad joined18:20
Helenah left18:23
mat001 left18:23
kjartan left18:24
kjartan joined18:25
CoolerX thanks18:25
CoolerX left18:26
Helenah joined18:35
CoolerX joined18:36
CoolerX rafasc, seems that isn't it either18:36
turns out I need this one https://github.com/nagadomi/distro18:36
TheFuzzball left18:37
Goplat joined18:38
TheFuzzball joined18:38
hyperair joined18:40
rafasc CoolerX: the steps are the same.18:41
add repo as remote, fetch, checkout a branch.18:41
jess left18:43
rafasc There's a simplified version: git fetch repourl +branchname:temp; git checkout temp;18:44
CoolerX ok thanks18:45
rafasc that will overwrite the "temp" branch18:45
CoolerX what does --recursive do?18:45
tonythomas joined18:45
CoolerX git clone https://github.com/torch/distro.git ~/torch --recursive18:45
rafasc man git clone18:45
gitinfo the git-clone manpage is available at https://gitirc.eu/git-clone.html18:45
rafasc it also clones submodules recursively18:45
CoolerX submodules?18:46
rafasc by default, when you clone a repo submodules are not cloned.18:46
submodules is the mechanism that allows you to have nested repos in git.18:46
https://github.com/torch/distro/blob/master/.gitmodules18:47
they have a bunch18:47
CoolerX ooh nested repos18:47
that's insane18:47
rafasc on github, they're rendered as: env @ d28424a18:48
means that the env directory is actually a repository checked out at the d28424a.18:49
man git submodule; man gitsubmodules18:49
gitinfo the git-submodule manpage is available at https://gitirc.eu/git-submodule.html18:49
the gitsubmodules manpage is available at https://gitirc.eu/gitsubmodules.html18:49
CoolerX what is the use case for submodules?18:50
rafasc When you need nested repos.18:51
Usually when your project depends on another.18:51
Many people try to avoid to deal with this in the git layer and rely on dep managers, pip npm etc18:52
But submodules allow you to make sure your commit is used with a specific commit on the dependency.18:53
amcclure left18:54
CoolerX rafasc, why is that important?18:55
n000g left18:55
CoolerX isn't that why you version18:55
rafasc Not necessarily.18:55
CoolerX pin which version of the dependency you want18:55
rafasc For example, many dependencies manager rely on semantic version.18:55
amcclure joined18:55
rafasc So my commit can run pretty much with any 2.0.x version18:55
TheFuzzball left18:56
CoolerX rafasc, you can bump version automatically on commit18:56
rafasc 2.x.x even.18:56
With submodules you're pinning to the specific commit. So your commit includes the dependency at that specific commit.18:57
Not one before not one after.18:57
n000g joined18:57
rafasc Sometimes that's unecessary. If your dependency follows semantic versioning, Major.Minor.Patch, only bumps in Major are considered backwards incompatible.18:59
Decobus left18:59
rafasc Meaning you can let your dep manager, choose the best version that fits your constraints.18:59
Decobus joined18:59
CoolerX rafasc, sounds horrible, if you are pinning to specific commits then something is wrong with your software architecture19:00
fix some APIs and program to those19:00
rafasc You can pin it to whatever you want.19:01
Usually yes, people will pin it at some released version. But submodules allow to pin to anything.19:01
brettgilio left19:01
rafasc Not everyone want's to install a full blown dependency manager to manage a handful of repos.19:02
wants*19:02
cbreak left19:03
cbreak joined19:04
hseg joined19:07
cdown_ joined19:09
CoolerX rafasc, that's like saying noone wants to install a full blown version manager to just manage a handful of source code files19:09
why have git when you could just put files in folders19:10
cdown left19:11
cdown_cdown19:11
thomasross left19:11
leeN joined19:13
bremner CoolerX: feel free not to use submodules if they are not useful for you19:14
BtbN submodules are a good way to end up with ancient dependencies and when someone wants to use you with the latest versions, stuff explodes.19:15
locktree joined19:16
thomasross joined19:16
locktree left19:18
Olipro joined19:19
Mattiaslndstrm left19:21
Mattiaslndstrm joined19:22
rafasc CoolerX: it's different. submodules are a way to manage a dependency. And it does it by making sure the version of the dependencies that were used to make the commit are used in the checkout.19:22
If you need something more flexible than that, feel free to use npm, pip, cargo, or whatever is more adequate for your language.19:23
leeN left19:25
diogenese left19:26
HaMsTeRs joined19:26
diogenese joined19:26
CoolerX rafasc, it's not a very good way to manage dependencies19:29
rafasc It's generic.19:29
localhorse joined19:29
HaMsTeRs left19:30
HaMsTeRs joined19:30
HaMsTeRs left19:33
gumupho left19:36
Fernando-Basso joined19:37
leeN joined19:38
ttl joined19:39
milkt joined19:41
monk12 joined19:45
H2Q left19:49
alfredb joined19:54
sidetrack joined19:57
Mattiaslndstrm left19:57
sidetrack left19:57
Newami joined20:00
developer24 joined20:00
Newami left20:01
RatSalad left20:03
fattredd left20:05
Human_G33k left20:05
Human_G33k joined20:06
alfredb left20:06
CoolerX left20:13
RatSalad joined20:13
RatSalad left20:14
_brezanacbrezanac20:17
b0nn Have sub modules improved (genuine question, for a while there they had a nasty reputation)20:26
rsrx left20:27
b0nn Or had they garnered their reputation for ... interestingness.. because people weren't using them properly?20:27
BtbN They're as annoying as ever20:28
rafasc both20:28
b0nn ok20:28
I'm thinking I will wait until they're easier to use properly, I can see their advantages, but i have heard of a lot of problems with them20:29
rafasc Its UI was a bit , err, complicated to use. That tarnished its reputation, there are memes online calling it "git sobmodules"20:29
b0nn (read: I'll learn how to use them properly when I am forced to by other people's decisions)20:29
rafasc It's not perfect now, but it is much better than it once was.20:29
b0nn ok20:30
That's the nature of development though, things start out 'rough' but that feedback shows people what needs to be done20:30
rafasc BtbN: have you heard of https://github.com/apenwarr/git-subtrac yet?20:30
BtbN no, looks horrible20:31
rafasc it deal with some of the aspects that make submodules hard.20:31
BtbN Stuff like npm/cargo/pip/... is pretty much always the saner choice20:31
rafasc says no, then says looks horrible.20:32
b0nn So, go relies on git heavily for its package mangement20:32
rafasc is confused20:32
BtbN I looked at it for 10 seconds, saw go build instructions, and closed the page again20:32
b0nn Including the current "modules" system20:32
BtbN Don't need another layer of compexity on top of the already complex stuff20:32
b0nn Exactly, that's why I refuse to use <ALL FOTWARE WRITTEN IN A LANGUAGE I DON'T WRITE IN>20:33
SOFTWARE*20:33
BtbN Well, with that logic you cannot use git in most cases20:33
or... your OS20:33
rafasc That's from one of the git devs. Having people look at this stuff is important for improvements to submodules.20:34
magic_ninja left20:34
rafasc It's the same person that wrote git subtree, that got eventually into the git repo.20:34
monk12 Hey all, was reading some git tutorials to understand more deeply whats going on under the hood... When you do a 'git pull', everyone says that basically does a 'git fetch' followed by a 'git merge'. So if there are 3 branches (branch1, branch2, and branch3), and 2 of them were updated in the remote repo by another user (branch2 and branch3, NOT the one Im currently working on in my working dir which is branch1 pretend). Then the20:34
'git pull' will update the /refs/remotes/myRemote/branch2 and branch3 with the latest commits with the fetch portion. But wasnt sure about the merge portion... will it try to merge the changes into /refs/heads/branch2 and branch3? or will a merge ONLY happen if I also had one of those branches checked out in my working dir?20:34
b0nn BtbN: huh, that's exactly what you're saying about it being written in Go20:34
BtbN I don't care what language it is in20:34
Lucas_Gray joined20:34
BtbN if it's more complex than a simple shell script, it's too much complexity.20:35
b0nn 07:32 < BtbN> I looked at it for 10 seconds, saw go build instructions, and closed the page again; 07:32 < BtbN> Don't need another layer of compexity on top of the already complex stuff20:35
BtbN Yes?20:35
b0nn Ok, I mean, it's up to you, I have no argument with someone that thinks that way20:35
I'll just judge you quietly instead20:36
BtbN I would need to install several gigabytes of additional dependencies to even use that.20:36
And would impose the same on users of my repo.20:36
rafasc If only you read the page.20:36
BtbN That just cannot be the answer to submodules being annoying20:36
rafasc Just like git subtree, this doesn't force itself on users. That's the point.20:37
But 10s isn't enough to understand that.20:37
anyways..20:37
BtbN If I use it for my repo, surely anyone using my repo will also have to deal with it.20:37
rafasc Go inform yourself, then we can discuss.20:38
BtbN yeah whatever20:38
b0nn It seems to be more of a UI than a "This arranges your code"20:38
magic_ninja joined20:38
Hello71 "End users downloading your project don't need to have git-subtrac installed"20:39
CCR5-D32 joined20:39
Hello71 according to my clock, you've been complaining about this for more than 7 minutes. according to wc, there are 324 words before that line. if you read at least 1 word per second, you would have read that sentence more than 2 minutes ago20:40
and one word per second is really fucking slow20:40
rafasc Do you know what we can do instead of continuing this? Help monk12 .20:40
b0nn oh, I was going to point him at gitscm, but thought that might be a bit "RTFM"20:41
Hello71 well I just got here. I was getting to that.20:41
man git-pull20:41
gitinfo the git-pull manpage is available at https://gitirc.eu/git-pull.html20:41
Hello71 "Incorporates changes from a remote repository into the current branch. In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD."20:41
"More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch."20:41
so yes, that is another reason why git pull is confusing20:42
thebope joined20:45
rafasc monk12: basically the fetch will grab all branches, but the merge will only affect your checked out branch.20:47
monk12 Hello71/rafasc I think I gotcha. so if the pulled changes were not affecting my checked out branch (branch1), nothing will happen in that portion.20:50
Hello71 sort of20:50
nkz joined20:50
Hello71 ... more or less20:50
rafasc monk12: not sure if I understand what you mean.20:51
nkz hey, beginner here. I have two branches, dev and master. On dev I write my code and I use master just for deploying to heroku. How should I name commits I put in master branch? Like I deploy it after I fix many things in dev branch and I don't care for source code inside master.20:52
they are very different, dev is two folders, front-end and back-end. Master is just back-end folder with front-end built and placed inside of it.20:54
rafasc monk12: just to makes things clear, the fetch part will update your remote tracking branches. The read-only branches that live inside refs/remotes/<remotename>/ . Never ever conflicts in this part, because they're a mirror. It just replicates whatever is on the remote.20:54
monk12 rafasc, so branch2 and branch3 were modified by somene else (they didnt touch branch1). I am working on branch1 though (its currently checked out on my computer). so the fetch updates the /refs/remotes/origin/branch1 and /refs/remotes/origin/branch2 ... There was nothing to merge on the merge part, right?20:54
rafasc monk12: the merge part only affects the branch you are at. (the local refs/heads/<name>)20:54
Dirak joined20:54
H2Q joined20:55
enoq left20:57
rafasc monk12: branch2 and branch3 would never be merged when using just git pull while you have branch1 checked out.20:57
even if you have a copy of that branch checked out locally. Merge only operates on the current branch.20:58
even if you have a copy of that branch locally. (not checked out)20:59
monk12 okay excellent, thanks for clearing that up rafasc.21:00
teratorn joined21:01
rafasc you would need to: git checkout branch2; git pull; (or just git merge because you already did one fetch with the previous pull)21:01
monk12 gotcha, i was just about to ask how i would update branch2/3 after the pull :).21:02
zebrag left21:02
rafasc common segway :)21:02
teratorn i've run `git fetch`. how can I see a log of the commits that were fetched? i.e. the commits that are ahead of the current branch?21:03
rafasc teratorn: git log ..@{u}21:04
BonusPlay left21:04
BonusPlay joined21:04
rafasc or git log HEAD..HEAD@{upstream}21:04
BonusPlay left21:04
zebrag joined21:04
BonusPlay joined21:04
teratorn rafasc: thanks!21:05
rafasc If you have the output of git fetch, it prints sha..sha for each fetch, you can use that.21:06
because the command I have you compares with your local branch, not the last fetch21:06
delli3 left21:07
rafasc that would be something like: git log origin/master@{1}..origin/master;21:07
but usually you're interested in comparing with the current branch.21:08
Es0teric joined21:11
Es0teric hi -- i have a quick question... I am using git for windows and when i try to do `git add .` it hangs after awhile and i get the message 'Warning LF will be replaced by CRLF in <directory>. The file will have its original line endings in your working directory.21:12
for a lot of the files its trying to do git add to21:12
how do i stop it from hanging?21:12
teratorn rafasc: so once I'm satisfied with the log, how would I apply the commits that were fetched without reaching back out to the remote and potentially pulling new commits that I haven't reviewed yet?21:13
rafasc teratorn: you do: git merge21:13
teratorn rafasc: cool21:14
rafasc teratorn: note that merges are completely local until you push it back. So you can still use git pull, inspect the result and undo it if there's something you do not like.21:17
Both are valid. I personally tend to fetch and merge separately, but it's not a huge difference.21:18
ttl left21:23
mbalmer joined21:29
jim left21:32
jim joined21:33
ChanServ set mode: +o21:34
mbalmer left21:34
Eugene changed the topic to: Welcome to #git | First visit? https://gitirc.eu | Current stable version: 2.25.0 | Getting "cannot send to channel"? /msg gitinfo .voice | This channel is logged: https://gitirc.eu/log | all your rebase are belong to us21:34
Eugene kicked Eugene (de-op)21:34
Eugene joined21:35
hqdruxn08_ left21:35
magic_ninja left21:40
orbyt_ joined21:40
thebope left21:42
hqdruxn08 joined21:42
jess joined21:43
CryptoDavid joined21:44
kupi left21:47
minionofgozer left21:50
g00s joined21:50
Es0teric can anyone help me with my question?21:51
leeN left21:53
sidetrack joined21:59
leeN joined22:01
rafasc Es0teric: it's a warning related to windows end-of-line normalization.22:01
I am not very experienced with git for windows.22:02
does your repo have a .gitatrributes? Namely something like '* text=auto'22:03
Helenah left22:03
jim left22:03
sidetrack left22:03
rafasc core.autocrlf also controls the behaviour, I believe gfw asks you what you want to do with end-of-lines when you install.22:04
jim joined22:06
lankanmon joined22:06
Es0teric rafasc nope22:12
i do not have .gitattributes22:13
leeN left22:14
rafasc what about: core.autocrlf ?22:15
HumanGeek joined22:15
rafasc git config core.autocrlf22:15
(probably true)22:15
Human_G33k left22:18
beastDivision joined22:19
f8e3 joined22:20
f8e3 how do you strucutre your dirs when working with multple workspaces repos etc? dont know how to name them, get confused with grouping by language / theme / ... ?22:20
unlimiter joined22:23
rafasc I have them all in /home/rafasc/git/22:23
Lucas_Gray left22:24
rafasc no grouping. Considering changing the name from git to projects/ because I also have a couple of svn and mercurial ones in there.22:24
mbalmer joined22:24
caskd left22:26
Helenah joined22:26
crem left22:27
nkz left22:27
feriman left22:27
qpdb left22:28
mbalmer left22:29
beastDivision left22:29
beastDivision joined22:30
beastDivision left22:30
qpdb joined22:31
nickodd left22:32
H2Q left22:34
mowcat left22:35
caskd joined22:35
caskd left22:35
caskd joined22:36
jaziz joined22:38
darkstardevx left22:42
darkstardevx joined22:43
thebope joined22:46
unlimiter left22:53
g00s left22:58
f8e3 what if: part of cloned is part of your repo?22:59
justanotheruser left23:04
ttl joined23:05
caskd left23:07
caskd joined23:08
Es0teric rafasc yes its ture23:15
rafasc The files in your workdir probably have LF endings.23:16
git is telling you that it will convert it to CRLF in the future, due to your crlf-settings.23:18
statusf90 left23:18
mbalmer joined23:18
rafasc Es0teric: git ls-files --eol; what does it say for one of the mentioned files?23:19
zebrag left23:19
zebrag joined23:19
g00s joined23:20
d1b left23:20
d1b joined23:21
fragamus joined23:21
shabius_ left23:22
Es0teric i/lf w/lf attr/23:23
rafasc23:23
mbalmer left23:23
rafasc i is the index/repo, w is the worktree.23:23
statusf90 joined23:24
Ploppz left23:24
rafasc why are your files with lf-endings in windows?23:24
git prefers lf, so if you have configured your editor to use LF, you may want to disable the autocrlf23:25
hqdruxn08_ joined23:26
Shentino left23:29
Es0teric how do i disable that?23:29
rafasc23:29
hqdruxn08 left23:29
Fernando-Basso left23:29
duderonomy left23:31
Shentino joined23:32
delli3 joined23:37
fstd_ joined23:37
thebope left23:38
ttl left23:38
fstd left23:42
fstd_fstd23:42
shabius joined23:43
plexigras joined23:47
captain42 left23:47
dedowsdi joined23:47
captain42 joined23:51
akemhp_ joined23:54
akemhp left23:56
thebope joined23:58

Logs Search ←Prev date Next date→ Channels Documentation