IRCloggy #git 2021-08-26

Logs Search ←Prev date Next date→ Channels Documentation

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

2021-08-26

Vallenciana joined00:00
kurtthemaker left00:03
nate1 joined00:08
christall left00:10
nate1 left00:12
natrys left00:13
batrick left00:16
jaggz left00:20
batrick joined00:21
m0viefreak left00:36
Lord_of_Life left00:36
Lord_of_Life joined00:37
pretty_dumm_guy left00:37
Vallenciana left00:39
plitter left00:39
Vallenciana joined00:40
plitter joined00:41
plitter left00:41
plitter joined00:41
ferdna joined00:42
christall joined00:49
Xenguy left00:50
keypusher left00:53
SleePy left01:00
SleePy joined01:03
Xenguy joined01:08
odoood joined01:14
clime joined01:16
chexum left01:17
christall left01:18
chexum joined01:18
Vallenciana left01:19
Vallenciana joined01:20
ttree joined01:31
Vooch left01:31
Vooch joined01:31
clime left01:33
odoood left01:35
schmillin_ joined01:42
schmillin left01:42
christall joined01:43
FFY00 left01:47
schmillin joined01:53
britho joined01:55
roadie joined01:55
schmillin_ left01:56
Vallenciana left01:59
Vallenciana joined02:00
thiago_ joined02:01
epolanski left02:02
roadie left02:06
betelgeuse left02:07
betelgeuse2 joined02:08
christall left02:08
xx left02:08
jazzy2 joined02:08
jazzy left02:12
thiago_ left02:13
FFY00 joined02:17
FinnElija left02:18
FinnElija joined02:20
Drek45 left02:31
nate1 joined02:32
nate1 left02:36
Vallenciana left02:39
jaggz joined02:39
Vallenciana joined02:40
codebam I did a rebase on staging to fix my merge conflicts before I opened a PR but for some reason github still says there are conflicts, why?02:42
how do I fix them locally02:43
if I merge staging it's already up to date02:43
and I can ff if I try merging into staging so I don't understand02:43
oh I figured it out02:44
I forgot to pull02:44
gnoo joined02:45
britho :) The joys of Git02:45
elastic_dog left02:52
rewrit3 left02:52
nyah left02:53
randm left02:54
randm joined02:55
elastic_dog joined02:57
shailangsa left03:01
roadie joined03:05
Drek45 joined03:05
Drek45 left03:10
christall joined03:12
jab416171 left03:13
nate1 joined03:15
christall left03:17
shailangsa_ joined03:17
codebam :)03:18
jab416171 joined03:19
jab416171 left03:19
Vallenciana left03:19
nate1 left03:20
Vallenciana joined03:20
schmillin_ joined03:21
jab416171 joined03:24
schmillin left03:25
nate1 joined03:37
hbautista_ left03:45
skapata left03:50
pulse left03:51
stkrdknmibalz joined03:52
ferdna left03:54
Vallenciana left03:59
Vallenciana joined04:00
nate1 left04:01
nate1 joined04:01
Milos left04:05
Milos joined04:05
roadie left04:06
linguist left04:09
Jonno_FTW left04:13
thebombzen joined04:14
ByteHackr joined04:18
nate1 left04:21
mutandis left04:26
roadie joined04:32
gast0n left04:33
CrispoCrispy04:34
Vallenciana left04:39
Vallenciana joined04:40
tristan__ joined04:41
cmc left04:41
cmc joined04:41
subopt left04:48
Jonno_FTW joined04:50
w0ng left04:50
jstein joined04:54
zebrag left04:55
w0ng joined04:55
cmc left04:56
gnoo left04:56
chexum left04:56
ghost43_ left04:56
tejr left04:56
gxt_ left04:56
crabbedhaloablut left04:56
AnAverageHuman left04:56
adanwan_ left04:56
ano left04:56
TheJollyRoger left04:56
ninjin left04:56
onizu joined05:03
ninjin joined05:04
ghost43 joined05:04
chexum joined05:05
crabbedhaloablut joined05:05
ChmEarl left05:05
tejr joined05:06
gnoo joined05:07
gxt_ joined05:07
TheJollyRoger joined05:07
cmc joined05:07
ano joined05:07
w0ng left05:13
christall joined05:14
w0ng joined05:16
austin987 left05:18
Vallenciana left05:19
Vallenciana joined05:20
srinidhi joined05:28
Xaldafax left05:30
austin987 joined05:32
thiago left05:35
agowa338 joined05:39
theoceaniscool joined05:40
aniruddha joined05:47
codebam left05:47
codebam joined05:48
christall left05:50
makara joined05:51
codebam left05:54
Vallenciana left05:59
Vallenciana joined06:00
roadie left06:00
roadie joined06:02
roadie left06:07
cbreak left06:07
ishutin_ joined06:07
cbreak joined06:07
ishutin left06:11
EvilDMP left06:18
roadie joined06:25
vysn joined06:26
tmz_ joined06:26
tmz left06:28
roadie left06:30
Peng left06:32
Peng joined06:32
fef joined06:32
EvilDMP joined06:36
Vallenciana left06:39
Vallenciana joined06:40
meator joined06:42
roadie joined06:45
aidalgol joined06:51
aidalgol This is probably a really bad idea, but is it even possible to create a disjoint change history in an existing repository?06:52
jazzy2 left06:52
palasso joined06:53
aidalgol Ah, git-checkout --orphan06:55
furrymcgee joined06:55
OnkelTem joined06:56
rfuentess joined07:03
unluckyshrubbery left07:04
arunkumar413 joined07:14
arunkumar413 Hi All07:14
My feature branch and dev branch are even but some of the commits are not available in dev. I'm trying to get the commit into dev. Can you help?07:15
ttree left07:18
Vallenciana left07:19
enoq joined07:19
Vallenciana joined07:20
furrymcgee at some point the dev branch hould be deleted07:20
nobody_ joined07:22
mfiano left07:24
mfiano joined07:28
roadie left07:29
ikke arunkumar413: they cannot be even and not having the same commits at the same time07:33
arunkumar413 furrymcgee No it's not deleted.07:33
ikke merge conflicts were resolved and made even,07:34
ikke Ok, so you merged one into the other07:34
!situation07:34
gitinfo Please post the url returned by `git log -n 20 --all --graph --format="%h %p %d %s" | curl -F text=@- https://upaste.de/` to give us an idea about what your situation is (increase the -n argument if your problem is more complex than 20 commits can explain)07:34
christall joined07:35
arunkumar413 ikke shows some error in the command07:36
ikke what error?07:36
arunkumar413 A parameter cannot be found that matches parameter name 'F'.07:36
I'm on a windows machine07:37
ikke ah, then that does not work07:37
run `git log -n 20 --all --graph --format="%h %p %d %s` and paste the output on https://upaste.de07:38
christall left07:40
arunkumar413 This shows an empty command prompt07:40
okay got it07:41
ikke here is the output https://upaste.de/nhg07:43
ikke Ok, now which branches are you interested in?07:43
arunkumar413 Here is the more detailed one https://upaste.de/k4o07:45
ikke this one bc8025cb f21fc963 (tag: tryingtoRestore) search table working as expected07:46
I'm not sure which branch is this in07:47
betelgeuse2 left07:47
wender joined07:47
ikke In all branches that I can see here07:47
It was first merged in 2b812557, and then in e29f8d8007:48
betelgeuse joined07:48
ano left07:49
ano joined07:49
computeiro left07:50
elf_fortrez joined07:51
fef left07:52
christall joined07:52
ano left07:53
ano joined07:55
ano left07:57
sudoforge left07:57
ano joined07:58
Gurkenglas joined07:59
Vallenciana left07:59
Vallenciana joined08:00
arunkumar413 ikke I'd like to restore this f9dbdbcc state for a specific file.08:00
ano left08:00
ikke git restore --source=f9dbdbcc path/to/file08:02
fef joined08:02
epolanski joined08:06
arunkumar413 ikke I'd like to restore this f9dbdbcc state for a specific file.08:08
ikke I'd like to restore that on top of a new branch created from the dev branch\08:09
ikke Then create + checkout that new branch08:09
crabbedhaloablut left08:10
crabbedhaloablut joined08:10
arunkumar413 is path to file relative?08:12
ikke yes08:13
mfiano left08:16
ppang joined08:16
Betal left08:18
eduardas joined08:18
hnOsmium0001 left08:19
christall left08:22
remyabel joined08:25
mfiano joined08:26
ano joined08:27
meator left08:28
mfiano left08:32
daoudr joined08:33
pretty_dumm_guy joined08:36
pretty_dumm_guy left08:36
pretty_dumm_guy joined08:36
pretty_dumm_guy left08:37
Vallenciana left08:39
rkta left08:39
rkta joined08:39
Vallenciana joined08:40
meator joined08:40
Vonter left08:42
xx joined08:44
milahu joined08:45
milahu left08:47
arunkumar413 ikke Thanks a lot08:47
ikke yw08:48
AbleBacon left08:49
pretty_dumm_guy joined08:51
mfiano joined09:07
jrofd left09:08
jrofd joined09:08
unluckyshrubbery joined09:08
Vonter joined09:08
jrofd left09:09
jrofd joined09:09
fef left09:15
fef joined09:16
R2robot joined09:17
pulse joined09:17
Vallenciana left09:19
Vallenciana joined09:20
vysn left09:27
crabbedhaloablut left09:27
crabbedhaloablut joined09:27
zulutango left09:29
zulutango joined09:30
jazzy joined09:32
arunkumar413 why is the switching branch command named as 'checkout'?09:35
Literal meaning of checkout is paying cash at the counter.09:36
ikke There are more definitions for checking out things09:37
rsx joined09:42
chexum_ joined09:43
chexum left09:43
[twisti] if im checking out a girl, im definitely not paying for it09:45
oxymoron93 joined09:49
tristan__ left09:49
zulutango left09:53
OnkelTem left09:54
OnkelTem joined09:55
nedbat arunkumar413: books are checked out of libraries09:55
[twisti]: that is clearly not the meaning intended09:56
arunkumar413 left09:56
PinealGlandOptic joined09:56
[twisti] i would argue that its literally and exactly the meaning of checkout in the context of git09:57
youre not taking something out, your looking closely at something09:57
PinealGlandOptic left09:57
Vallenciana left09:59
chexum_chexum09:59
natrys joined09:59
Vallenciana joined10:00
selckin joined10:01
shailangsa_ left10:04
makara left10:04
ikke If you look at earlier vcs', it matches more closely with checking out books10:06
You checked out a file, made changes, and checked it in again10:06
otisolsen70 joined10:09
forgotmynick joined10:10
Crispy left10:10
Crispy joined10:10
nedbat [twisti]: if you want that meaning, at least use "check out a detail" rather than "check out a girl"10:12
[twisti] i didnt want to get crude in my example :D10:13
ekathva joined10:14
ByteHackr left10:15
ByteHackr joined10:17
ackyshake left10:18
oxymoron93 left10:18
christall joined10:19
keypusher joined10:20
elf_fortrez left10:20
pretty_dumm_guy left10:21
bn_work left10:22
shailangsa joined10:22
oxymoron93 joined10:24
keypusher left10:24
keypushe- joined10:24
keypushe-keypusher10:27
Vallenciana left10:39
Vallenciana joined10:40
christall left10:46
eduardas left10:47
TheJollyRoger left10:49
TheJollyRoger joined10:49
eduardas joined10:54
nobody_ left10:57
pulse left10:57
crabbedhaloablut left11:02
crabbedhaloablut joined11:02
rewrit3 joined11:10
oxymoron93 left11:11
oxymoron93 joined11:12
oxymoron9325 joined11:13
Dotz0cat_ joined11:16
Dotz0cat left11:16
gnoo_ joined11:16
Dotz0cat_Dotz0cat11:16
oxymoron93 left11:17
oxymoron9325 left11:17
Vallenciana left11:19
Vallenciana joined11:20
gnoo left11:20
furrymcgee left11:26
nik joined11:28
Crispy left11:29
Crispy joined11:29
igemnace left11:32
Pistahh joined11:32
Pistahh hello, does anyone know a tool or an easy way to visualize the relationship of a few particular commits? Focusing on how the related branches they are in were created/merged, showing only the commits I'm interested in, but not the many 100 other commits within the related branches?11:33
pretty_dumm_guy joined11:35
gnoo_ left11:36
gnoo_ joined11:36
ikke Pistahh: not sure if it's what you are looking for, but maybe: git log --graph --oneline --simplify-by-decoration branch1 branch211:36
Pistahh ikke: not really, my issue is that there is a convoluted history with many branches / merges, all branches containing many commits I'm not interested in, so I'd like to see some really simplified graph that would show me how 3-4 commits relate to each other wrt. branches and merges11:38
i.e. "show me the graph between commits with sha aaaaaaaaaa, bbbbbbbbb, cccccccc, ddddddddd, eeeeeeee"11:40
stkrdknmibalz left11:41
Samian joined11:44
tristan__ joined11:57
lpapp_ joined11:58
Vallenciana left11:59
Vallenciana joined12:00
madewokherd` joined12:10
gh34 joined12:12
madewokherd left12:13
drogas left12:15
lpapp_ left12:17
nyah joined12:18
ninjin left12:19
sudoforge joined12:19
nobody_ joined12:22
ninjin joined12:25
drew left12:28
odoood joined12:29
pulse joined12:29
dsrt^ left12:29
christall joined12:30
FH_thecat joined12:35
furrymcgee joined12:37
jrofd left12:37
Bayes joined12:37
Bayes left12:37
Bayes joined12:37
Vallenciana left12:39
Vallenciana joined12:40
forgotmynick left12:42
mdk left12:43
mdk joined12:43
mdk left12:46
mdk joined12:47
jrofd joined12:50
christall left12:53
christall joined12:54
mdk left12:54
mdk joined12:55
mdk left12:55
mdk joined12:55
osse Pistahh: maybe something like: base=$(git merge-base --octopus aaa bbb ccc ddd...); git log --graph --oneline --ancestry-path ^$base aaa bbb ccc ddd...12:56
jrofd left12:57
Xenguy left12:59
skapata joined13:01
skapata left13:01
skapata joined13:01
xx I want to interactively change things in a past commit. So I do `git rebase -i <hash of commit before the commit I want to change>` and then mark it as 'edit'13:01
and then I thought I'd do `git reset -p` but it doesn't do anything13:02
I essentially want to undo hunks in some files13:02
anakimluke joined13:02
osse git checkout -p HEAD~113:02
then commit --amend13:02
xx I see the HEAD^ is what I was missing13:04
but what's the difference between `git reset -p` and `git checkout -p` in this case?13:04
linguist joined13:04
osse reset will only update the index13:05
jrofd joined13:10
odoood left13:11
Vallenciana left13:19
xx I don't think I want to use `checkout` because it doesn't let me do a git diff afterwards to see what has been unstaged13:19
incidentally, `git reset -p` doesn't work that way either - it doesn't show me the difference between staged files and unstaged files afterwards13:20
Vallenciana joined13:20
drogas joined13:21
xx I think I get it, the wording is wrong. Where it says "Apply this hunk to index" it *actually* means *Un-apply*13:22
very counterintuitive13:23
do I get it right that "Apply this hunk to index" means "Unstage this hunk"?13:24
roadie joined13:26
Dotz0cat left13:28
cousteau joined13:29
cousteau left13:29
osse xx: isn't the hunk reversed?13:30
xx osse: honestly I'm struggling with terminology now13:31
cousteau joined13:31
xx because 'reverse' has a different meaning13:31
cousteau Sup13:31
xx I'm testing to see if I understand it properly13:31
jimklimov joined13:31
osse xx: The usecase is that you have *for example* changed a line from AAAA to BBBB in a commit, and you want to remove that change from the commit, right?13:32
xx correct13:32
osse and you're rebasing and marked that commit as 'edit' right?13:32
xx correct13:32
osse did you run checkout or reset?13:33
xx I tried both, didn't like checkout because it didn't allow me to see afterwards what exactly was unstaged13:33
I use `git diff` a lot13:33
jwillikers joined13:34
cousteau I think I asked this before, but is there a documented flow for how to work when a git repository is not the "main repository" hosting code, but a copy (a "git version") of a non-git repository?13:34
osse xx: either way this changes the index, so to see the change you have to git diff --staged13:35
cousteau Example: boss gives me a bunch of code, I create a git repo from that, add some changes, eventually boss will grab the files from my last commit and put them back into the non-git repo, and then modify some of them (possibly reverting some changes)13:37
And I'm somehow able to convince them to tell me which commit exactly they got the code from (which is another issue...)13:38
gnoo_ left13:39
pulse left13:39
cousteau In an ideal world, they would do the merge using git rather than manually, making both their job and mine easier, but well...13:39
jwillikers left13:40
tristan__ left13:41
cousteau I was thinking on something involving the use of `git merge -s ours` that will replace all of my files with their edited version (so that all of their post-grab changes look like actual modifications to the eyes of git)13:42
anakimluke left13:49
meator left13:49
mackerman Some bridges for git to integrate with non-git version control systems exist. But limitations apply.13:49
Chapter in Pro Git !book is Git and Other Systems13:49
gitinfo There are several good books available about git; 'Pro Git' is probably the best: https://git-scm.com/book but also look at !bottomup !cs !gcs !designers !gitt !vcbe and !parable13:49
cousteau Basically I have a loose idea in mind of what needs to be done, but that idea is s*** and very unclear to me so I'd rather use a guide for what I'm doing, which I bet someone has already had to fight with, rather than reinventing the wheel (which will probably end up being rectangular or something)13:50
Thanks, I'll check the book13:51
gnoo_ joined13:51
ASDX___ joined13:51
cousteau There is `git p4`, but I don't know how easy it is to use (nor if I can use it at all)13:51
mackerman You haven't said what the other system is, which makes it hard to find guides even if one existed.13:52
thiago joined13:52
ppang left13:52
cousteau Well, the fact that I mentioned git p4 should be a hint that it was Perforce :P but yeah, I didn't mention it because I was thinking more of a general solution13:53
Atlassian does have a git p4 guide, which also explains how the whole process works13:53
ASDXXXXX left13:55
nik left13:55
Murr left13:56
Murr joined13:56
cousteau Problem with integration tools is that they imply the use of git by the person integrating code TO the non-git repo, but I don't see that happening any time soon. Instead, I'll likely have to be integrating code FROM the non-git repo to the git one13:57
hexology joined13:58
cousteau Hm, maybe I'm misinterpreting what git p4 does13:59
Vallenciana left13:59
mackerman man git p413:59
gitinfo the git manpage is available at https://gitirc.eu/git.html13:59
mackerman Hmm.13:59
man git-p413:59
jimklimov left14:00
mackerman https://git-scm.com/docs/git-p414:00
Vallenciana joined14:00
cousteau I tried that in windows BTW, it told me that I don't have python :( Will try in Linux to see if it works better14:00
axisys left14:00
jimklimov joined14:01
mackerman Python for Windows exists, but I don't know how portable git-p4 is.14:02
fling left14:03
FH_thecat left14:03
cousteau Anyway, from what I can see in the Atlassian tutorial, the only thing git p4 does is fetch the changes from p4, not fix the mess that the p4 maintainers created by copying my files manually14:04
So the difference between using git p4 and copying the files manually from the p4 repository is small. The problem is still to fix the commit mess. Guess I can use the Atlassian guide for that, regardless of the type of the non-git repo14:05
reset left14:06
CSWookie joined14:06
meator joined14:08
meator left14:10
archie joined14:10
cousteau The Atlassian tutorial is horrible :( Not horribly done, just a painful experience in general14:10
jimklimov left14:10
archie hello14:10
cousteau Sup14:11
archie currently the default git init branch is master14:11
afaik there's an ongoing discussion about that14:11
cousteau I think there are plans to call it "main"14:11
archie how it's going? It's likely it will be replaced, or master will remain?14:12
meator joined14:12
cousteau (I wanted it to be called "trunk", for historical reasons)14:12
There might be a thread in some mailing list14:13
Vonter left14:16
archie saw that iirc, forgot the link though14:17
wanted to know how is going14:17
wonder if there'll be a switch14:18
hnOsmium0001 joined14:18
mackerman Since 2.28, the default name for the initial first branch can be configured with init.defaultBranch14:18
archie mackerman I know that14:18
Crispy left14:18
Crispy joined14:19
cousteau There seem to be plans to rename it to "main" indeed14:20
meator Hello, is there some git way to send signed commits via email?14:21
Arsen no, those would need to get signed by the committer, not the author14:22
(you're the author, whoever runs git-am is the committer)14:22
cousteau archie: https://sfconservancy.org/news/2020/jun/23/gitbranchname/14:23
meator Ok, thanks!14:24
cousteau That mentions the change to not-master being discussed "on our mailing list"14:24
pretty_dumm_guy left14:24
Arsen say I have repo A and repo B, and I want to extract a subdir from A into B using git subtrees, is this possible?14:25
I want to make it possible for me to merge later into the same subtree, but I don't need the entirety of repo A in B, just a component14:25
this should be possible, technically, as far as I understand14:26
axisys joined14:26
Vonter joined14:27
cousteau I am not the expert in subtrees here, but have you considered submodules instead? (at least if you foresee that you're going to use that subdir often in the future)14:28
Arsen that subdir would be quite active14:29
I'm basically trying to strip out many unneeded components out of an upstream14:29
xterm_ joined14:33
Xaldafax joined14:34
archie cousteau it says there are discussions in progress, nothing else14:35
cousteau Yes, they don't point to any discussion in the mailing list14:35
Arsen what are you interested in specifically?14:36
cousteau Just mention such discussions exist14:36
Arsen https://github.com/git/git/blob/daab8a564f8bbac55f70f8bf86c070e001a9b006/refs.c#L565-L576 does this answer questions?14:36
cousteau Wow, they do mention "trunk" as an alternative!14:37
But, uh... shouldn't "development" be the devel/unstable branch, not the primary/stable one? (Maybe they meant "default", hg style?)14:38
Arsen many projects consider master an unstable branch14:38
there's nothing wrong with that14:38
tags exist, after all14:39
daoudr_ joined14:39
Vallenciana left14:39
cousteau Arsen: but no, those lines only mention that it's subject to change, nothing about whether they're going to change it14:39
Vonter left14:40
Arsen usually, that means that it's yet to be decided :P14:40
Vallenciana joined14:40
Vonter joined14:40
cousteau Indeed, but what archie wanted to knos was how the discussion was going14:40
pulse joined14:40
daoudr left14:42
Arsen right14:44
I don't have a link to the thread anymore14:45
sorry :/14:45
regardless, if you prefer a name, git config --global init.defaultBranch <whatever>14:45
cousteau personally thinks of "master" as a positive word, like "teacher" or "expert", and doesn't immediately think of its more offensive meanings when reading it... but I suppose that could be different for people more personally affected by it14:45
Vallenciana left14:47
brunodOut joined14:48
Vallenciana joined14:49
linguist left14:52
axisys left14:53
fef left14:54
Vallenciana left14:55
fef joined14:55
cbreak whether master is stable or not depends on workflow obviously. But trunk is a dumb name.14:58
it implies that history is tree-like, which it is not.14:58
unlike subversion, git actually does support proper merging, so history is not a tree, it's a DAG.14:59
drew joined14:59
subopt joined14:59
Bayes left15:00
austin987 left15:02
pyeverything joined15:03
zebrag joined15:04
cousteau cbreak: it looks an awful lot like a tree though... but I guess you're right15:06
cbreak it looks like a tree until you merge :)15:06
cousteau If it were a pure tree it would defeat the purpose of making "branches", which is to merge them later15:06
lpapp_ joined15:06
cbreak also, git supports orphan branches15:07
cousteau But then again, if "trunk" is a stupid name, then so is "branch"15:07
cbreak yeah.15:07
cousteau And, using this tree-inspired nomenclature, it makes a lot of sense to refer to the "main branch" as the "trunk"15:09
And, for some reason, "The Rattling Bog" song is now stuck in my head15:11
Arsen master( copy) still makes sense to me, and so does development/unstable15:12
ByteHackr left15:12
cousteau Yeah, that's what "master" probably meant. The "golden reference", not the "thing that rules over other branches". If anything, it's the other way around: branches innovate, master learns from them and follows them15:15
Unless you're one of those evil people who commit to master15:15
Arsen I must be a supervillan then15:15
cousteau >:( You monster!15:16
Vonter left15:16
austin987 joined15:16
daoudr_ left15:16
Arsen it makes sense in my workflows15:17
tags are releases15:18
cousteau Well if there's a single branch then I guess15:18
Arsen either that or there's no release and the repo is "rolling": master is the version intended for use15:18
lpapp_ left15:19
cousteau Yeah that'd be the SVN approach, where branches were so awful they'd hardly ever be used, leading to a perfectly linear history with sequential commit numbers15:19
And for a one-person project, unless you have the (not officially diagnosed) level of ADHD I have, you'd probably be working in one thing at a time, and thus not need branches15:21
Arsen linear histories have various advantages15:21
I only branch when I have reason to conflict with current work, or when merging other peoples concurrent work, and I rarely merge in favor of rebase15:22
cousteau I'm easily distracted so I'm likely to move "side quests" to separate branches and then merge them, for the sake of cleanliness. Still makes for a mostly linear history.15:23
But having the possibility (but not the requirement) to have branches that can be merged painlessly is what makes git and the like great tools. I didn't really appreciate this until I had to use SVN15:25
I've also seen projects that force --no-ff merges as a way to group multiple commits into a single one (without squashing them)15:27
SuperLag joined15:27
cousteau So, to each their own approach15:27
What is truly evil is to commit to master when you're on a shared repository with other collaborators15:28
Vonter joined15:32
clime joined15:32
brunodOut left15:33
Ram-Z What's so evil about that?15:39
AbleBacon joined15:44
roadie left15:47
roadie joined15:49
jazzy left15:51
roadie left15:54
anakim joined15:54
archie left15:55
elf_fortrez joined15:56
Murr left15:56
Murr joined15:56
cousteau Ram-Z: well, it can create a confusing mess if everyone commits to master instead of committing to their own branch, push, and then merge those into master15:58
xterm_ left15:58
Wuzzy joined16:04
clime left16:05
eduardas left16:08
Ram-Z So creating merge commits is less messy than non-merge commits? I will wholeheartedly disagree to that.16:08
anakim left16:08
Ram-Z Committing patches on the main branch is just as much a valid approach as any other.16:09
imMute Ram-Z: let me introduce you to git log --graph --oneline --first-parent16:09
SuperLag left16:09
ChmEarl joined16:09
SuperLag joined16:11
roadie joined16:12
joo left16:12
codebam joined16:27
computeiro joined16:28
Drek45 joined16:29
vysn joined16:29
wender left16:30
OnkelTem left16:36
christall left16:40
christall joined16:41
cousteau Ram-Z: two people simultaneously committing to master will not avoid a merge commit16:41
christall left16:41
christall joined16:42
cousteau It will create a surprise merge, which is typically an unpleasant surprise because it means you have to do more work than you expected16:42
Typically when you push a branch you expect that no one else has pushed to that branch since you last pushed/fetched16:44
Which won't be the case if everyone is pushing to master without control (if you manage to sync all your team members so that that never happens, then good for you, but that's hard to achieve)16:45
furrymcgee typically you pull first16:45
supastupid joined16:46
rsx left16:47
cousteau If you pull it's because you intend to merge, and if you merge then the branch you merge into becomes your responsibility, and master is too big a responsibility to be taken lightly (unless it was decided beforehand that you were going to be the one responsible of master)16:47
supastupid github makes this weird "main" branch that for some odd reason git does not see??16:47
cousteau I may be wrong though; but my impression/what I heard is that it's usually bad practice to have everyone pushing to master16:48
cousteau left16:48
skapata left16:51
Narrat joined16:51
skapata joined16:51
skapata left16:51
skapata joined16:51
lpapp_ joined16:51
Betal joined16:52
lpapp_ left16:56
vodkra_vodkra16:56
gabin supastupid: i guess you should be able to see all remote branches from git16:57
codebam left16:58
fdan joined16:59
anakim1 joined17:00
christall left17:02
fdan Hi there17:10
linguist joined17:10
fdan i know an awesome tool i worked 3 years back with github integration on mac17:11
all i need to do is type some command inside my local repo and that will open a github repo in my chrome17:11
any one know what's the name of that utility17:11
mexen left17:12
elf_fortrez left17:13
brunodOut joined17:13
christall joined17:16
ekathva left17:17
linguist left17:17
teddyc fdan: firefox $(git config --get remote.origin.url)17:17
brunodOutlinguist17:17
fdan teddyc i think its hub17:17
teddyc in your terminal, might work. If that is the behaviour you want17:17
schmillin__ joined17:18
teddyc fdan: github has their own CLI-tool, https://cli.github.com/ it might be that17:18
christall left17:18
christall joined17:18
fdan ok let me try but i got what i wanted17:19
its hub17:19
teddyc nice 👍17:19
codebam joined17:20
schmillin_ left17:21
furrymcgee your terminal should provide some general functions to open links17:21
Drek45 left17:22
fdan left17:33
gnoo_ left17:35
supastupid left17:36
Drek45 joined17:36
rfuentess left17:37
anakim joined17:44
Drek45 left17:49
Hax0r joined17:49
fdan joined17:50
hbautista_ joined17:52
lgc joined17:54
lpapp_ joined18:01
anakim fsadlkfjlsadkfjsaldkfjasl;fkd asldkf jas;ld#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CF#D3D7CFj18:02
alsdkjf18:02
asdjf18:02
laksdf18:02
laksdfj18:02
aldskfj18:02
anakim_18:02
anakim18:02
Drek45 joined18:02
anakim nono sory18:02
I'm testing some IRC client settings18:03
and flooded on the wrong window hahah18:03
sorry :s18:03
tchan1 joined18:05
tchan1 left18:05
tchan1 joined18:06
tchan left18:06
tchan1tchan18:07
orbyt joined18:09
Bayes joined18:11
zer0bitz joined18:12
sniperwolf joined18:18
Gustavo6046 left18:24
thiago anakim: thought it was the cat18:24
lessless left18:26
lessless joined18:29
Arsen I wanna create a merge commit that entirely replaces my branch with theirs, is that possible?18:30
I see that -s ours exists, but I can't see -s theirs, or anything like it18:30
imMute Arsen: why not just delete your branch and re-creating starting from where you want?18:31
fef left18:31
Gustavo6046 joined18:31
imMute Arsen: or, another way to do that, git reset --hard SHA_YOU_WANT that will remove all the history of your branch and all modifications and put you at that SHA18:31
fdan left18:32
Arsen imMute: I specifically want to be trace the history to the old branch too18:33
be able to trace*18:33
imMute why though? that history would have no effect on the code after that merge.18:33
I'd be mighty surprised if I came across a merge like that...18:33
Arsen because it's already pushed :P18:34
think of it like a full rewrite scenario18:34
imMute I would still personally restart the branch or start a new one entirely and leave the old one alone.18:35
matheustavares joined18:35
Arsen hm18:35
yeah, you're right, it probably doesn't make sense to keep it, since it's not the same history at that point18:36
bn_work joined18:44
fdan joined18:57
sudomann joined19:00
sudomann I added a pre-commit hook to lint some code. Wen I commit, it first commits the unlinted code, then shows me the linted code as changes and I have to commit again.19:01
How can I get it to lint and commit in one step19:01
wender joined19:02
Arsen to abort a commit in pre-commit, you need to exit to abort creating a commit19:02
need to exit as nonzero*19:02
osse I think it's possible to run git add again from the pre-commit hook19:02
so that's an option19:02
Arsen it should be AFAIU19:03
I'd personally not change anything in the working tree in commit hooks, though, just run a check and fail if there's an error19:03
lower risk of data loss, remember, there's nothing to go back to if you edit the index and working tree without a commit in the meanwhile19:03
osse agreed19:03
imMute aye, some people commit parts of a file instead of the ewhole thing, which modifying in a hook would destroy19:04
Arsen that too19:04
sudomann ooohh thats wise. I think at this point it would be best to just move the linting to our CI servers19:04
computeiro left19:04
imMute sudomann: both are nice.19:05
Arsen I like to check in both places, CI/gh actions/sr.ht builds/whatever, in case someone pushes without pre-commit, and pre-commit so that I'm not that someone19:05
https://pre-commit.com/ this also exists19:05
fling joined19:05
osse at my previous job we ran clang-format server-side and denied pushes if it failed. it worked pretty well. a bit annoying when clang-format itself was upgraded and some defaults changed, but other than that... :p19:05
Arsen that sounds somewhat slow ngl19:06
otisolsen70 left19:06
Arsen but that's a decent approach too, yeah19:06
sudomann Unfortunately we use github to host our code and I'm not sure linting alone is a suitable argument to move off it19:06
Arsen gh actions can do it too, fwiw19:07
sudomann I wouldve loved to set this up as a server side hook instead19:07
schmillin__ left19:07
sudomann I'll checkout out GH actions19:07
Arsen if you protect master/main/trunk/$(git config --get init.defaultBranch) and require that actions pass before being able to merge PRs19:07
AnapodoPsalidaki left19:07
schmillin joined19:07
sniperwolf left19:08
junktext joined19:08
Milos left19:09
Milos joined19:09
ekathva joined19:11
brunodOut joined19:18
linguist left19:19
linguist joined19:19
brunodOut left19:22
schmillin left19:24
schmillin joined19:24
schmillin left19:29
schmillin joined19:30
ekathva left19:31
fdan left19:31
durham joined19:33
durham_ joined19:34
durham__ joined19:37
durham left19:37
durham joined19:39
durham_ left19:40
durham__ left19:41
DoofusCanadensis joined19:45
average left19:49
meator left19:52
christall left19:53
EvilDMP left19:54
stef204 joined19:54
EvilDMP joined19:55
christall joined19:58
CommunistWolfcw20:00
agowa joined20:00
agowa338 left20:01
rahl- left20:05
ano left20:06
ano joined20:06
rahl joined20:07
sudomann left20:08
m0viefreak joined20:14
roadie left20:14
Guest26 joined20:16
matheustavares left20:16
Guest26 This may be the incorrect place to ask this, but I'm still pretty new to all this and learning a lot. My questions is related to using Notepad++ as the text editor for Git. Is it still better to use the 32 bit version over the 64 bit version?20:19
dsrt^ joined20:19
imMute Guest26: likely doesn't matter at all.20:19
FLHerne left20:20
Guest26 Okay, I know the book that I am reading through was made with Git 2.8.0 so it's a little outdated now haha20:20
matheustavares joined20:21
FLHerne joined20:23
Codaraxis joined20:24
cwCommunistWolf20:24
Guest26 left20:25
shokohsc left20:29
EvilDMP left20:30
DoofusCanadensis left20:36
shokohsc joined20:38
roadie joined20:41
natrys left20:42
Bayes left20:47
Drek45 left20:52
Minall joined20:53
xkr47 left20:54
EvilDMP joined20:55
vikonen8 joined20:56
Gustavo6046 left20:56
xkr47 joined20:58
Gustavo6046 joined20:58
JayDoubleu_ joined20:58
Masklin_Gurder joined20:58
wagle_ joined20:59
DrowningElysium_ joined21:00
ksham joined21:00
robertparkerx_ joined21:00
LSD joined21:01
JayDoubleu left21:01
casaca left21:01
vikonen left21:01
wagle left21:01
DrowningElysium left21:01
acidsys left21:01
Masklin left21:01
Kays left21:01
robertparkerx left21:01
swistak left21:01
Manouchehri left21:01
JayDoubleu_JayDoubleu21:01
vikonen8vikonen21:01
DrowningElysium_DrowningElysium21:01
Manouchehri joined21:02
casaca joined21:02
swistak joined21:03
roadie left21:06
robertparkerx_ left21:07
robertparkerx joined21:07
lpapp_ left21:08
pyeverything left21:09
keypusher left21:12
keypusher joined21:13
pyeverything joined21:14
EvilDMP left21:14
bn_work is there any git command that can return true false if I am in a specific git branch or not? or do I need to | grep to test?21:15
ackyshake joined21:15
matheustavares left21:15
matheustavares joined21:16
durham_ joined21:16
codebam left21:16
durham left21:19
gh34 left21:19
starfarer left21:19
starfarer joined21:20
Wuzzy left21:24
canton7 bn_work, [ "$(git symbolic-ref HEAD)" == refs/heads/master ] is the closest I can think of21:25
Dragoon left21:27
LSDacidsys21:29
bn_work canton7: thanks, I came up with `if [[ $(git branch --list | grep '* develop') ]]` as the command to check, would that work?21:30
(assuming I want to check if I'm in develop21:30
)21:30
canton7 bn_work, it's normally better to use the plumbing commands -- the ones which git itself uses to extract info. The so-called porcelain commands -- the ones which pretty-print info for humans -- can change their output over time, and aren't supposed to be machine-parsed21:30
palasso left21:31
bn_work ok, makes sense21:33
Dragoon joined21:34
AnAverageHuman joined21:34
aniruddha left21:37
humanface joined21:37
CSWookie left21:37
zer0bitz left21:42
akimbo joined21:44
notABoxer joined21:47
remyabel left21:50
agowa left21:53
pyeverything left21:54
enoq left21:54
pyeveryt_ joined21:55
humanface left21:59
pyeveryt_ left21:59
britho left22:02
Vonter left22:05
Minall left22:05
wagle_wagle22:10
vysn left22:11
humanface joined22:11
hbautista_ left22:11
Narrat left22:16
BlessJah left22:17
Dotz0cat joined22:26
BlessJah joined22:27
skapate joined22:27
skapate left22:27
skapate joined22:27
christall left22:27
christall joined22:28
skapata left22:29
Vonter joined22:32
christall left22:32
jimklimov joined22:34
pyeveryt_ joined22:34
lpapp_ joined22:35
onizu left22:36
Vonter left22:36
lpapp_ left22:40
Xenguy joined22:44
pyeveryt_ left22:45
alex88 left22:47
alex88 joined22:47
odoood joined22:48
ash_worksi joined22:52
ash_worksi so, I checked `git status` and it showed a couple of files with changes; I ran `git diff` on the files and it shows me some added log lines I no longer care about; does that mean if I `git checkout <file>` those lines I don't care about go away?22:53
reset joined22:53
ash_worksi (I sorta get paranoid about screwing up sometimes)22:53
rewt `git status` should give you some commands you can do for those files and what will happen22:55
gast0n joined22:59
christall joined22:59
roadie joined23:03
roadie left23:07
matheustavares left23:07
Vonter joined23:08
matheustavares joined23:08
yuckey2d0 joined23:09
travaldo joined23:11
orbyt left23:13
christall left23:17
Muzer left23:17
bambanxx joined23:19
yuljk left23:21
yuljk joined23:22
brw joined23:23
ash_worksi rewt: right, and given those commands, I *think* what I said will happen will happen... I just get paranoid I guess... I could just check the current file to know for sure if reverting is putting in lines are taking them out23:24
matheustavares left23:26
m0viefreak left23:27
schmillin left23:28
bambanxx left23:28
remyabel joined23:29
christall joined23:29
odoood left23:29
schmillin joined23:31
bambanxx joined23:32
lpapp_ joined23:32
Arsen can I use git-rebase to take commits off of another branch and put them on top of my current one?23:33
christall left23:33
remyabel cherry-pick?23:33
or git-rebase onto23:33
Arsen hm, cherry-pick might also fit, though, I might need some other functionality of rebase; do you mean git rebase --onto mybranch otherbranch?23:35
Muzer joined23:35
lpapp_ left23:37
Drek45 joined23:41
DoofusCanadensis joined23:43
optimant left23:43
optimant joined23:43
splud left23:45
brunodOut joined23:45
hbautista joined23:45
Gurkenglas left23:45
Zaliek joined23:46
ash_worksi left23:46
linguist left23:49
igemnace joined23:49
schmillin_ joined23:51
christall joined23:52
schmillin left23:54
stef204 left23:55
linguist joined23:56
splud joined23:57
humanface left23:59
brunodOut left23:59

Logs Search ←Prev date Next date→ Channels Documentation