IRCloggy #git 2021-09-22

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-09-22

adlternative joined00:01
mrfhitz joined00:02
lgc left00:10
adlternative left00:11
computeiro left00:12
sarab left00:13
computeiro joined00:13
sarab joined00:19
magic_ninja left00:20
natrys left00:25
avarab joined00:33
avar left00:33
gioyik left00:36
igemnace joined00:37
bket left00:37
ash_worksi joined00:37
durham left00:40
bket joined00:49
computeiro left00:49
bket left00:57
ash_worksi left00:58
alzgh left00:59
magic_ninja joined01:06
jwillikers left01:07
bket joined01:09
hornhack left01:12
hackinghorn joined01:13
sarab left01:13
durham joined01:17
___nick___ left01:17
___nick___ joined01:19
m-atoms left01:23
greyrat joined01:27
thelounge6619 joined01:27
lucerne joined01:27
keypusher left01:29
magic_ninja left01:30
alkino left01:30
elkalamar left01:32
anton left01:32
magic_ninja joined01:32
nyah left01:33
gioyik joined01:35
nightstrike joined01:39
magic_ninja left01:41
magic_ninja joined01:42
sgn left01:43
anton joined01:44
gioyik left01:44
sgn joined01:45
adlternative joined01:50
a6a45081-2b83 joined01:59
causasui joined02:06
Dotz0cat joined02:14
Guest85 joined02:17
hoochmonger joined02:24
causasui left02:25
twb joined02:26
twb I keep forgetting this. If I want to start a completely new branch, not connected to anything, how do I do that?02:26
gioyik joined02:28
causasui joined02:32
mrfhitz left02:32
gioyik left02:33
jetchisel joined02:35
deltab left02:36
causasui left02:41
FinnElija left02:44
causasui joined02:44
FinnElija joined02:46
deltab joined02:46
christall left02:47
christall joined02:47
Guest17 left02:48
jonosterman left02:48
jonosterman joined02:50
gioyik joined02:53
christall left02:58
gioyik left02:59
hnOsmium0001 left03:07
ChmEarl left03:07
zebrag left03:17
sgn left03:19
sgn joined03:20
junktext left03:21
anton left03:22
zebrag joined03:22
austin987 left03:28
christall joined03:28
hnOsmium0001 joined03:31
AnAverageHuman left03:33
pulse left03:33
gioyik joined03:35
gioyik left03:40
lpapp_ joined03:40
austin987 joined03:43
lpapp_ left03:45
christall left03:49
Xaldafax left03:52
ferdna left03:52
aniruddha joined03:53
hoochmonger left04:00
cweiss left04:01
cweiss joined04:02
bradyt O.O04:03
if i knew the name of it, i could give a hint quickly04:03
what are those called? parentless commits?04:03
but you mean not even a commit?04:03
a new root commit?04:04
twb bradyt: no commits at all, exactly04:06
bradyt eww04:06
twb the same as if you did "git init"04:06
I ended up futzing it with filter-repo04:06
bradyt: you look funny with your work nick on04:06
bradyt why would you want _no_ commit?04:06
twb: yeah i mention my repos elsewhere and i don't feel a need to express myself elsewhere ;)04:07
twb bradyt: so that I can cherry-pick some other commits to be the start of a fresh branch04:07
bradyt oh, yeah, hard to manipulate the root commits i guess04:08
twb Basically I had a commit history with derp.c derp.c derp.c derp.c good.c good.c <delete derp.c>04:08
And I wanted to just go "actually pretend derp.c never existed, it can go in its own 'failed experiments' repo"04:08
zebrag left04:13
subopt left04:14
gast0n left04:15
christall joined04:17
pyeveryt_ left04:17
hbautista joined04:17
pyeverything joined04:17
fulljab joined04:18
ThomasD13 joined04:18
twb Is it possible to make tig colorize "fixup!" and "squash!" strings?04:19
pyeverything left04:22
vishal left04:35
christall left04:36
vishal joined04:39
bket left04:39
bket joined04:42
saroy joined04:44
fulljab left04:47
locrian9 left04:47
fulljab joined04:48
Brumaire joined04:50
pyeveryt_ joined04:52
gioyik joined04:52
k-man left04:54
a6a45081-2b83 left04:54
k-man joined04:55
hbautista left04:58
Guest85 left04:59
gnoo joined05:01
hbautista joined05:01
Mo joined05:12
durham left05:14
lavos left05:14
lavos joined05:15
squirrel left05:15
bradyt left05:15
lpapp_ joined05:15
bradyt joined05:15
hexology left05:17
blmt8 joined05:17
deepy left05:18
cluelessperson left05:18
deepy joined05:18
hexology joined05:18
cluelessperson joined05:18
jonosterman left05:18
blmt left05:19
blmt8blmt05:19
Brumaire left05:21
jonosterman joined05:21
LiENUS left05:27
LiENUS joined05:33
hbautista left05:41
dimi1947 joined05:46
dimi1947 left05:47
ash_worksi joined05:47
alkino joined05:49
beshr joined05:50
thiago left05:51
lpapp_ hi, what is the best way to show our QA engineers how branching works in git? What gets to where when we backport to a release branch, what commits are not their from main, etc? Is it gitk or something similar?05:52
or just a generic git branching model picture?05:52
pyeveryt_ left05:54
ash_worksi left05:54
thekingofbandit left05:54
ikke I think something generic would work better05:55
lpapp_ is there a stock git photo for this05:55
screenshot*05:55
but in general, what do you use for the branching05:55
I remember there was even a command line output similar to gitk05:55
but I cannot remember the exact command.05:55
thekingofbandit joined05:56
lpapp_ it was some "ascii chart" of the way branches happened to be.05:56
with | / and \ indicators.05:56
ikke !lol05:58
gitinfo A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all05:58
kenanmarasli joined05:58
kenanmarasli left05:58
kenanmarasli joined05:58
lpapp_ hmm, this is not what I have seen once.05:59
This does not seem to show graphs.05:59
it seems to show: * hash commit-title only.06:00
git log --oneline --graph --decorate --all06:00
bookworm that's what oneline does....06:00
lpapp_ ah, without --all, it is better06:00
bookworm without all you'll only see commits reachable from the current branch06:01
lpapp_ without all, I get | for the main flow, and then / | \ for branching off and then merging back to the main flow.06:01
without -all*06:01
without --all*06:01
should @gitinfo be corrected to remove --all? Or is it a Mac specific thing?06:03
R2robot left06:03
lpapp_ oh, I see, it actually works, just need to scroll up, it prints a lot more than just the graph itself!06:04
sorry then06:04
oh no, I am lost.06:05
ikke Normally a pager is opened06:06
lpapp_ is there a page that explains the output?06:06
|/| | | | | | | | | | |06:06
when I scroll down, I see a lot of that06:06
it feels overwhelming at first why so many |s06:06
ikke it means there are lots of parallel branches that were later merged06:07
lpapp_ but if I scroll down more, they seem to grow like anything06:07
the |s06:07
| | * | | | | | | | | | | | | | | | | | | | | | | | | |06:08
R2robot joined06:08
lpapp_ | | | | | | | | | | | |_|_|_|_|_|_|_|/ / / / / / / / / / / / / /06:08
this output is really heavy06:08
jonosterman left06:08
lpapp_ maybe not the best to show to QA, even I am confused myself as a dev.06:08
ikke yes, history can become quite complex over time06:09
that's why I mentioned a generic branching overview might be better06:09
lpapp_ I guess what would be useful to show them is that the release branches branched off at a certain point06:09
and after that, whatever goes to main, it does not go to them06:09
twb left06:09
lpapp_ it would be good to show this to them visually, maybe it is better than words06:09
and when we fix something, it goes into main, and if we backport a change, it goes to old release branches to as and when.06:09
ikke Something like https://nvie.com/posts/a-successful-git-branching-model/06:09
jonosterman joined06:10
ttree joined06:11
beencubed left06:13
lpapp_ thanks, I find this image complex: https://nvie.com/img/git-model@2x.png06:14
I was hoping to see a main, topic branches, and release branches, that is all06:14
ikke yes, git flow is a little bit more advanced06:14
lpapp_ is there a simple representation06:15
basically, we use main, release branches, and topic branches06:15
I think that is all to it.06:15
ikke https://githubflow.github.io/, but that does not have a diagram06:15
lpapp_ probably a standard way of working, I would imagine?06:15
yeah, a graphical presentation would probably be better perceived.06:15
"We consider origin/develop to be the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release. Some would call this the “integration branch”. "06:19
oh, okay, so it is the same as main for us06:19
that is why our flow is slightly simpler than git flow.06:19
or perhaps, this develop branch could be considered a long-lived topic branch in our workflow.06:20
but definitely not an overarching branch.06:20
wernerf joined06:21
wernerfwernerfred06:21
lpapp_ features branches and hotfix branches, not sure what the difference is06:22
fulljab left06:22
lpapp_ other than one is bug, other is feature06:22
but that is just semantics, mechanically, they are pretty much the same?06:22
it is a branch for a "topic"06:22
ikke how do you use release branches06:22
lpapp_: in git flow, hotfix branches are directly created on master, while topic branches are created on develop06:23
other than that, not a lot of difference06:23
lpapp_ oh, I see, that is why we do not have a difference... because we do not have develop.06:24
thanks06:24
what I found over the years working for different companies and on different projects, some prefer fixing bugs in main first, then backport the first to release branches, and some people prefer fixing a bug in a release branch first and then backport to main.06:25
ikke lpapp_: https://imgur.com/a/oeNjWih06:25
basis06:25
lpapp_ e.g. git-flow: Must merge back into:06:25
ikke Created with https://excalidraw.com/06:25
lpapp_ develop and master06:25
we do the opposite06:25
we fix in main and then backport, unless it is really only release specific and not applicable in main06:26
ikke: thanks, I usually use inkscape06:26
pyeverything joined06:26
ikke Ok, so you use release branches to continue support on released versions?06:27
lpapp_ yep!06:27
ikke right, makes sense06:27
lpapp_ because our customers do not often upgrade06:27
ikke in git-flow, releases branches happen before the actual release06:27
lpapp_ once they get a major release, they practically stick to it for a very long time06:27
and we want them to benefit from bugfixes we are doing for newer releases.06:27
yes, that is when they are branched off06:28
before RC106:28
but we do not fix bugs there first and then merge back to main06:28
christall joined06:34
alkino left06:36
lpapp_ ikke: when was the github flow written? It still refers to master.06:37
ikke long time ago06:37
lpapp_ "GitHub is 35 employees now"06:37
yes...06:37
ikke https://i.imgur.com/tHPVkOS.png06:38
srinidhi joined06:40
ikke Something like that/06:40
Betal left06:41
lpapp_ ikke: looks like what I described is closer to github flow06:42
ikke yes06:43
though they don't have release branches06:43
lpapp_ yes, looks good, so only need adding the backporting workflow to it and then it is more or less complete.06:43
right, so we are in-between.06:43
ikke a service like github mostly only needs to support one deployment06:43
lpapp_ yep06:44
is there a "standard flow" out there like ours?06:44
github flow + release branches?06:45
ikke Not aware of any fancy name for it06:45
jazzy left06:45
Furai left06:47
lpapp_ not just name, but like a description06:48
so that I do not need to describe it from scratch. I can refer QA to an existing description.06:48
ikke Not aware of anything written down06:48
lpapp_ ok, thanks.06:48
rsx joined06:48
lpapp_ so, these are the two main well-known flows documented in public?06:49
AbleBacon left06:49
ikke There are probably others, but I don't know / recollect them06:50
lpapp_ ok, thanks.06:50
Furai joined06:55
Furai left06:55
lpapp_ ikke: how about this? https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow06:55
Furai joined06:55
palasso joined06:57
ikke seems like they merge their release branches back06:57
ttree left06:57
ikke so sounds more like git flow without an intermediate develop branch06:58
jonosterman left06:58
lpapp_ ikke: https://www.endoflineblog.com/img/oneflow/feature-branch-rebase-final.png I do not get this. How do the 3 purple circles become two?07:00
ikke Maybe they squashed one commit when rebasing/07:01
jonosterman joined07:01
gnoo left07:01
lpapp_ ikke: yes, it looks like they remove the release branches, so they probably do not need to maintain old releases07:02
srinidhi left07:02
lpapp_ they also use hotfixes from the gitflow model07:02
hotfix branches, that is07:02
christall left07:03
ikke yes, but at this point there is very little difference between them and feature branches07:04
AnapodoPsalidaki joined07:06
unluckyshrubbery left07:09
gioyik left07:12
average joined07:21
jrofd left07:24
srinidhi joined07:24
dviola left07:27
dviola joined07:29
elkalamar joined07:31
jetchisel left07:34
christall joined07:35
tejr left07:39
tejr joined07:40
christall left07:40
Xenguy left07:43
Xenguy joined07:43
jonosterman left07:49
EvilDMP joined07:51
jonosterman joined07:51
Gustavo6046 left07:57
Gustavo6046 joined07:57
xiongxin8802 joined07:58
xiongxin8802 left07:58
xiongxin joined07:59
TomyWork joined08:00
sarab joined08:03
sarab left08:03
thekingofbandit left08:03
tejr left08:07
tejr joined08:07
john_johnk joined08:08
Tobbi_ left08:18
Tobbi_ joined08:18
nyah joined08:20
jimklimov1 left08:21
lpapp_ left08:23
virr joined08:25
virr hello08:25
rahl left08:25
virr I did a mistake, did the file changes in wrong branch (forget the checkout), is there a way to bring the changes to the right branch without do it manually?08:26
ikke virr: !float08:26
gitinfo virr: If you have made a change in your working directory and have NOT YET COMMITTED, you may "float" that change over to another (`git checkout existing_branch`) or new (`git checkout -b newbranch`) branch and commit it there. If the files you changed differ between branches, the checkout will fail. In that case, `git stash` then checkout, and `git stash apply` and go through normal conflict resolution.08:26
rahl joined08:27
virr I did the commit :(08:27
baltazar virr: you can git reset HEAD^ then I think08:28
virr but I lose the changes, right08:28
?08:28
mrfhitz joined08:28
ikke baltazar: they have not committed yet08:29
baltazar virr: by default it does --mixed, which only changes the index, not the worktree08:29
ikke: 10:27 < virr> I did the commit :(08:29
jimklimov joined08:29
ikke then checkout that branch you want it on08:29
git cherry-pick <first-branch>08:29
then reset the first branch a commit back08:30
virr ok, it seems to work08:31
now i can commit to the right branch08:31
lpapp_ joined08:31
virr thanks08:35
j`ey left08:36
gordonfish- joined08:36
baltazaar joined08:37
cweiss left08:37
Arokh left08:37
cweiss0 joined08:37
Arokh joined08:37
baltazar left08:37
baltazaarbaltazar08:37
xD- left08:37
gordonfish left08:38
sco1 left08:38
samuelbernardo left08:38
pieguy128 left08:38
sco1 joined08:38
samuelbernardo joined08:38
pieguy128 joined08:38
xD- joined08:39
jonosterman left08:39
theoceaniscool joined08:40
jonosterman joined08:41
cadmio joined08:41
cadmio Hello08:42
I want to update my repository via command line on github08:42
I've created an access token, but when logging in I get "remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead."08:43
xiongxin left08:43
ikke cadmio: did you use the access token as password?08:43
af joined08:43
mrfhitz left08:43
cadmio no I didn't08:45
ikke Then you should08:45
just creating the token is not sufficient08:45
jetchisel joined08:46
cadmio ok thanks08:47
cadmio left08:47
hnOsmium0001 left08:47
alkino joined08:49
mrfhitz joined08:51
xiongxin joined08:53
xx joined08:54
baltazar left08:54
skapata left08:54
mrfhitz left08:55
baltazar joined08:56
jinsun left08:57
hqdruxn08 joined08:58
adlternative left09:00
hqdruxn08_ left09:01
sudoforge left09:03
lavos left09:05
molt joined09:06
hornhack joined09:13
virr left09:14
unluckyshrubbery joined09:14
hackinghorn left09:16
mrfhitz joined09:17
mrfhitz left09:18
mrfhitz joined09:19
mrfhitz left09:19
R2robot left09:21
mrfhitz joined09:22
Murr left09:27
Murr joined09:28
jonosterman left09:28
jinsun joined09:28
jonosterman joined09:30
mrfhitz left09:33
mrfhitz joined09:33
christall joined09:38
robz joined09:45
natrys joined09:49
Mo left09:51
keypusher joined09:56
hackinghorn joined09:59
hornhack left10:00
jla joined10:01
saroy left10:01
saroy joined10:01
jla .. just cloned a fresh remote repo, and trying to checkout onto another branch (but master)10:01
jla would 'git fetch' download all branches to my hard disk so that i can happily 'git checkout otherBranch' from master ? That's not occuring... what am i missing ?10:03
keypushe- joined10:03
ikke jla: depending on the fetchspec10:04
jla ?10:04
ikke if you did git clone -b <branchname> <remote>10:04
keypusher left10:04
ikke then git gets setup to just fetch that single branch10:04
jla ah10:04
i just made standard 'git clone git@...reponame '10:05
ikke git config remote.origin.fetch10:05
keypushe-keypusher10:06
computeiro joined10:06
ConstantDesc joined10:06
jla when i do 'git branch --list' i just see 'master' branch... even after 'git fetch (--all )'10:06
ikke git branch --remote10:07
christall left10:08
wyre hi guys, could I do a rebase in a fork of a branch in the upstream that isn't present in the fork?10:08
I mean, guess I have an upstream with `master` and `branch1` and I do a fork of this and I create a branch like `branch2` in my fork, but people in the upstream keeps working on `branch1` ... could I do a rebase of my `branch2` in that `branch1`?10:10
ikke You can fetch from upstream and then rebase branch2 onto branch1, yes10:11
wyre ikke, so the commits in branch1 will be created in branch2, right?10:12
ikke wyre: commits don't belong to a single branch10:12
the commits in branch2 are appended to the commits in branch110:13
igemnace left10:14
jla thXs ikke , i solved it with 'for remote in `git branch -r`; do git branch --track $remote; done' prior to git fetch + pull (--all) ^^10:17
ikke just git fetch is enough10:18
jonosterman left10:18
ikke pull is fetch and merge into local branch10:18
jonosterman joined10:20
shalok left10:21
shalok joined10:21
hqdruxn08_ joined10:21
jla ah10:24
hqdruxn08 left10:25
dhch left10:30
wernerfred left10:38
cousteau joined10:38
ConstantDesc left10:38
jwillikers joined10:38
nightstrike left10:39
reset joined10:46
ConstantDesc joined10:51
xiongxin left10:54
gnoo joined10:54
momomo joined10:55
dhch joined10:55
wernerf joined10:57
wernerfwernerfred10:57
ConstantDesc left11:01
daoudr joined11:03
jla left11:04
ConstantDesc joined11:07
ConstantDesc left11:20
betelgeuse left11:20
betelgeuse joined11:21
lgc joined11:21
ConstantDesc joined11:21
causasui left11:22
Swahili joined11:29
mrfhitz left11:30
hoochmonger joined11:31
jla joined11:35
alkino left11:36
KaitoDaumoto joined11:36
KaitoDaumoto left11:37
KaitoDaumoto joined11:38
KaitoDaumoto left11:38
KaitoDaumoto joined11:38
KaitoDaumoto left11:38
alkino joined11:40
jla left11:44
LuKaRo left11:49
LuKaRo_ joined11:50
onizu joined12:01
christall joined12:05
alzgh joined12:11
alzgh hello, I'm relatively new to git. I use `git add --interactive` a lot and sometimes when I manually edit the hunk, I get errors that the patch couldn't be applied. I don't know the reason tho.12:11
Other times it works.12:12
I can show you an example if it helps to get to the bottom of the problem.12:12
computeiro left12:13
ikke alzgh: manipulating diffs is kind of tricy12:14
tricky*12:14
xiongxin8802 joined12:14
ikke things like context matter12:14
alzgh ikke: do you mean that nothing can be done about it?12:15
ikke It means you need to be familiar with the diff format and how patches are applied.12:16
There are other tools which make it easier to selectively stage changes12:17
for example, tig allows you to select per line to stage it12:17
alzgh my current problem concerns a hunk that contains the tail of my document. I want to add some lines from the beginning of that hunk and leave the rest of the tail untouched. This isn't surely very complicated, I assue?12:19
*assume12:19
momomo_ joined12:20
momomo left12:22
alzgh Also, if you know of a good read(s) about how I can overcome this problem by learning how diffs work, I'll be happy to educate myself :D ikke12:23
ikke alzgh: the format is called unified diff12:23
tirnanog joined12:24
ConstantDesc left12:27
christall left12:28
otisolsen70 joined12:29
osse alzgh: there's a guide at the bottom of the editor12:30
alzgh: fro mwhat you said it sounds like you want to delete the lines you don't want to add12:31
chexum left12:32
chexum joined12:35
ConstantDesc joined12:36
alzgh osse: I know that guide. I use it regularly. My problem is that git throws (in my ignorant view) random errors for some patches where I edit a hunk and does not do this in others.12:39
This should have been an easy edit.12:39
ikke yes, but sometimes you hit edge cases (literally and figuratively)12:39
alzgh Just remove the lines at the end or comment them out using `#`. But it throws an error and I can't understand why.12:40
ikke alzgh: can you show the diff?12:40
alzgh yes ikke, that must be it and me not knowing all the inner workings leads to not being able to debug.12:40
ikke: yes12:40
ikke alzgh: not sure if it matters, but one thing that git tries to help you with is to adjust the hunk header numbers12:42
@ -x,y +x,y @12:42
It could be failing there12:43
alzgh https://paste.centos.org/view/c60f8f0912:50
if you look at the last 4/5 hunk, I want only the first 2 lines of that hunk12:50
ikke:12:51
when I go into edit mode and delete the rest of the lines, it doesn't work12:51
when I comment out the rest of lines it also doesn't work12:51
R2robot joined12:52
alzgh It's actually the 5/5 hunk, the last12:52
christall joined12:52
ikke Do you remove '\ No newline at end of file'?12:52
alzgh should I or should I not?12:52
ikke I'm not certain. I don't think it's official part of the diff format12:53
alzgh I removed it know and it was accepted with a warning saying:12:54
alkino left12:57
alzgh warning: 1 line adds whitespace errors.12:58
sorry for the delay12:58
osse missing newline at the end of the file is concidered a whitespace error by git i think12:59
you can just ignore it12:59
alzgh nice12:59
In some previous projects, I would get a similar error when trying to edit hunks12:59
In those cases the hunks always involved `#`. They were MD files and I had to use `#` for H113:00
I can see why git would be confused, but I don't know what to do about it.13:01
gh34 joined13:02
jonosterman left13:04
jonosterman joined13:05
Swahili left13:05
dviola left13:08
dviola joined13:08
wernerfred left13:11
pulse joined13:14
Xenguy left13:17
chexum left13:22
chexum joined13:22
jonosterman left13:22
roxlu would it be possible to find/retrieve a file from a git repository which has been removed and all I know is the name of the file?13:23
jonosterman joined13:24
osse try git log -- '**/file.txt'13:25
the first listed commit should be the one that removed it13:25
zebrag joined13:25
ThomasD13 left13:27
Murr left13:27
roxlu hmm can't find it .. maybe wasn't part of the repos in the first place. I'm not sure how ffmpeg (which is the repos) handles this. https://ffmpeg-devel.ffmpeg.narkive.com/ZLifxdzv/patch-v2-examples-vaapi-dec-scaling-add-a-vaapi-decoding-scaling-sample13:27
Murr joined13:28
TJ- left13:28
TJ- joined13:29
lpapp_ left13:30
kek_ joined13:30
kek_ hi13:30
jonosterman left13:33
elibrokeit left13:33
jonosterman joined13:34
elibrokeit joined13:35
jonosterman left13:39
alzgh hi kek_13:41
wernerf joined13:41
jonosterman joined13:41
kek_ I made branch A. I checked out branch A. I commited stuff and pushed branch A and made a merge request. I now want to work on something else and make a branch B for it. But to work on B I need A. I thought I could just merge A into B and start working but then I basically already merged it, surpassing the merge request I just did. Now the reason I need A to work on B is simple: It won't compile without A but it does not depend on A. There's a13:42
dependency X of version 3.3 and I upgraded it locally to 3.4 and in A I solve some simple type issues which are backwards compatible. So I only need A in B because I can't compile it locally otherwise. Ofc the solution would be to have proper dependency management but that's not gonna happen (not in my power), I don't even think they fixed the version of the dependency. People just hope it works basically (and we get a lot of issues from it, but13:42
whatever). What should I do? Can I somehow "temporarily merge A into B, work on B, ditch A, and push B"? (that would not break anything).13:42
wernerfwernerfred13:45
Dotz0cat left13:45
kek_ I think I just downgrade the dependency and work on it and try to convince the "boss" to implement better dependency management.13:47
fulljab joined13:48
osse You can start B from the tip of A, and after A is accepted you can rebase B onto the main branch13:48
alzgh based and git pilled :D13:49
Brumaire joined13:49
ikke You could also try to merge updating the dependency firs, and then both A and B can be based on that13:49
(if it makes sense)13:49
Dotz0cat joined13:49
kek_ osse, thanks, might do that alzgh ikke didn't get what you were saying but I think what osse said makes sense and seems. At least to my limited git knowledge.13:53
Swahili joined13:56
Brumaire left13:58
Brumaire joined13:58
fulljab left13:58
deltab left14:03
AnAverageHuman joined14:04
deltab joined14:10
jwillikers left14:10
hnOsmium0001 joined14:12
fulljab joined14:14
geirha1 joined14:14
elkalamar left14:15
geirha1geirha14:15
hoochmonger left14:21
sadtaco joined14:26
arcatech joined14:26
natrys left14:28
Brumaire left14:29
jonosterman left14:29
sudoforge joined14:30
jonosterman joined14:31
jonosterman left14:31
jonosterman joined14:33
christall left14:34
thiago joined14:39
christall joined14:39
gast0n joined14:42
cousteau left14:43
wernerfred left14:43
Xaldafax joined14:53
AbleBacon joined14:57
fulljab left15:00
ChmEarl joined15:07
average left15:11
kenanmarasli left15:11
odoood joined15:11
gordonfish-gordonfish15:17
elkalamar joined15:18
jonosterman left15:18
jonosterman joined15:22
jonosterman left15:24
jonosterman joined15:25
thekingofbandit joined15:25
jonosterman left15:26
kek_ left15:26
jonosterman joined15:26
Murr left15:27
Murr joined15:28
jonosterman left15:31
jmartin joined15:32
jmartin left15:32
jonosterman joined15:32
jonosterman left15:34
jonosterman joined15:34
jonosterman left15:35
jonosterman joined15:35
madewokherd left15:36
Null_A joined15:37
jonosterman left15:38
jonosterman joined15:39
subopt joined15:43
subopt_subopt15:43
pulse left15:43
jazzy2 joined15:44
jazzy2jazzy15:46
Guest63 joined15:47
srinidhi left15:47
Guest63 Hello there. This is my first post. What would be the set of git commands any newbie should master?15:48
Brumaire joined15:49
average joined15:49
ikke clone, status, add, commit, log, diff, show, branch, fetch, push, merge, checkout (or switch + restore). A bit further rebase and pull15:51
cbreak Guest63: man git-xxx is a great command to start with for any xxx subcommand :)15:55
git has very good man pages in my opinion15:55
tang^ !book15:56
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 !parable15:56
tang^ lots of good reading material, too15:57
Guest63 thanks guys!15:57
_suboptsubopt16:00
mokulus joined16:01
cyberpear left16:01
fulljab joined16:02
fulljab left16:03
madewokherd joined16:04
dionys joined16:04
tejr left16:04
tejr joined16:05
Guest17 joined16:05
rsx left16:05
jimklimov1 joined16:07
durham joined16:07
m0viefreak joined16:08
jimklimov left16:08
jonosterman left16:08
xiongxin8802 left16:08
jonosterman joined16:10
meator joined16:12
kenanmarasli joined16:14
junktext joined16:15
axisys left16:16
axisys joined16:17
austin987 left16:19
maroloccio joined16:22
jonosterman left16:22
Null_A left16:23
Null_A joined16:23
jonosterman joined16:23
Null_A_ joined16:26
Null_A__ joined16:28
alzgh left16:29
Null_A left16:29
Null_A joined16:30
austin987 joined16:30
Null_A_ left16:31
perrierjouet joined16:32
perrierjouet hi all16:32
can we do this git submodule add --recursive ?16:32
Null_A__ left16:33
Guest63 left16:33
cbreak perrierjouet: you can git clone --recursive and then submodule add16:35
TomyWork left16:35
odoood left16:36
Null_A left16:36
meator left16:38
Null_A joined16:41
LuxuryMode joined16:51
john_johnk left16:52
z3r0 joined16:52
Brumaire left16:53
meator joined16:53
AnAverageHuman left16:55
natrys joined16:55
Null_A_ joined16:55
Null_A left16:58
jonosterman left16:58
jonosterman joined17:00
meator left17:00
gnoo left17:01
Null_A joined17:01
cousteau joined17:04
Null_A_ left17:04
cousteau Hi17:04
ash_worksi joined17:05
odoood joined17:05
christall left17:05
christall joined17:06
cek joined17:06
cousteau Is it possible to make git worktree use relative paths? I just `cat ../the_worktree/.git` and it says `gitdir: /home/cousteau/the_project/the_git_repo/.git/worktrees/the_worktree` instead of the more convenient `gitdir: ../the_git_repo/.git/worktrees/the_worktree`17:07
Like, why isn't this the default behavior? Or at least the default behavior when I add the worktree using a relative path (which I did)17:08
...Or is it the default behavior on newer versions?17:09
christall left17:11
Swahili left17:11
AnAverageHuman joined17:14
cousteau In fact, do .git files (gitdir: ...) always use absolute paths (e.g. on submodules)? If so, shouldn't they default to relative paths? I remember having trouble or uncertainty when moving projects around because of absolute paths being used somewhere17:17
OK, submodules are smart enough to use relative paths17:22
srinidhi joined17:22
christall joined17:22
cousteau Both in the submodule's folder .git and in the .gitmodules file17:23
AnAverageHuman left17:24
fulljab joined17:25
cousteau BUT, the config option submodule.the_submodule.url uses absolute paths17:25
Weird17:25
fulljab left17:26
cousteau Why would .git/config and .gitmodules use different values for the url field?17:27
fulljab joined17:27
Murr left17:27
christall left17:27
Murr joined17:27
fulljab left17:28
christall joined17:29
AnAverageHuman joined17:34
cousteau I guess I'll write to the mailing list to complain :)17:35
sudoforge left17:38
pulse joined17:38
AnAverageHuman left17:40
ash_worksi left17:41
whytwulf joined17:44
whytwulf left17:45
ConstantDesc left17:45
whytwulf joined17:46
fulljab joined17:46
whytwulf left17:46
Brumaire joined17:47
fulljab left17:48
fulljab joined17:48
jonosterman left17:48
ash_worksi joined17:51
jonosterman joined17:51
imMute cousteau: I think config URLs need to be absolute so that git can actually use them. and .gitmodules URLs can be absolute or relative depending on your needs.17:53
clime joined17:53
durham left17:54
skapata joined17:54
skapata left17:54
skapata joined17:54
whytwulf joined17:56
whytwulf left17:56
cousteau imMute: I don't think they NEED to be absolute. They could be "relative to the project's top dir", and let git do the relativification17:57
imMute cousteau: URLs refer to remotes, not the local path...17:57
ikke I think the difference is that worktrees are more external to the git repository17:57
z3r0 left17:57
ikke If they were relative, and you moved the git repository, the worktrees would break17:57
cousteau Otherwise you get errors when moving projects around. One should be able to move entire projects to other paths without fear of errors due to absolute paths17:58
hornhack joined17:58
cousteau ikke: true, but if they're in the same super-directory, and you move the whole super-directory, they wouldn't break (if they were relative)17:59
sudoforge joined17:59
hackinghorn left18:00
cousteau And if you specified the path of the worktree as a relative path, chances are that it is in the same super-directory as the git project. That's why I was thinking on making it absolute or relative depending on how you specified it when creating the worktree18:00
imMute that would make sense to me. let the user decide which mode to use.18:01
cousteau Alternatively, an --absolute-path/--relative-path switch (which may default to whichever style the user used when specifying the path)18:04
s/may/probably should/18:05
con3 joined18:05
durham joined18:05
cousteau Gotta go, bye! I'll see if I can send an email to the mailing list later18:06
cousteau left18:06
nvmd left18:08
ash_worksi left18:10
sudoforge left18:11
elkalamar left18:11
odoood left18:13
Gustavo6046 How do I changelog?18:13
imMute Gustavo6046: nano CHANGELOG18:13
Gustavo6046 :<18:13
how do I changelog with git?18:14
cyberpear joined18:14
ikke Gustavo6046: if you have good commit hygene, you could use git shortlog18:14
imMute you mean how do you ask git for a change log? 'git log ...' with appropriate options for the commit ranges and data you want.18:14
mrfhitz joined18:14
Gustavo6046 ikke: My commit hygiene is mehh, but I can try tags18:14
nvmd joined18:15
Gustavo6046 can I sign and annotate a tag at the same time?18:15
just -as?18:16
-a's description almost implies that it doesn't like -s18:16
ikke Gustavo6046: A signed tag is annotated by default18:17
so it's implied18:17
Gustavo6046 Ah18:17
ikke Well, not only by default, it must be annotated18:17
unluckyshrubbery left18:17
Gustavo6046 ahhh, I see18:17
unluckyshrubbery joined18:17
durham left18:18
durham joined18:19
Gustavo6046 and how do I one-time view a specific file from another commit?18:21
ikke git show <commit>:<path/to/file>18:22
Gustavo6046 oh, ooh18:22
sudoforge joined18:22
Gustavo6046 thank you!18:24
nvmd left18:26
ferr_fercell18:27
saroy left18:27
average left18:31
koolazer left18:35
snedd joined18:35
jonosterman left18:38
imMute left18:38
imMute joined18:38
imMute left18:41
imMute joined18:41
jonosterman joined18:41
Guest17 left18:42
Guest17 joined18:42
voltron joined18:43
irrgit joined18:44
vdamewood left18:44
fulljab left18:49
sadako joined18:52
kenanmarasli left18:53
sadtaco left18:53
meator joined18:57
shailangsa left19:01
vdamewood joined19:11
lantech19446 I created a second branch on github to avoid my changes going to production prematurely, it's populated, making the branch on my local repo and pushing from it were no problem but i can't seem to figure out how to pull from it19:20
osse lantech19446: how did you push to it?19:22
lantech19446 first I did git push --set-upstream origin changes19:23
then I just did git push19:23
osse then git pull should work out of the box19:23
lantech19446 from a different computer?19:23
osse no19:23
from a different computer you can git pull origin changes19:24
lantech19446 because when I try git pull --set-upstream origin changes it tells me it's not valid19:24
ikke lantech19446: you want to use git fetch for new branches19:24
and then checkout19:24
lantech19446: git pull = fetch + merge19:24
I assume you don't want to immediately merge that branch in your currently checked out branch?19:25
lantech19446 it's ok to do that on this computer i just can't do it on the production server19:25
nvmd joined19:25
lantech19446 at some point i'll need to merge the two branches on github and then just pull from my master branch19:25
pizdets left19:25
osse what is the error message19:26
lantech19446 I'm not getting one now I apparently just can't set my upstream to that branch19:26
EvilDMP left19:26
osse set-upstream is not a valid git pull flag19:26
it is for push, though19:26
lantech19446 ok19:26
EvilDMP joined19:27
pizdets joined19:28
jonosterman left19:28
yates left19:29
jonosterman joined19:30
ash_worksi joined19:31
LuxuryMode left19:31
lantech19446 well that's working now, now i just gotta figure out what on earth this person was thinking when they coded this19:32
Gustavo6046_ joined19:32
Gustavo6046 left19:33
mokulus left19:33
Gustavo6046_Gustavo604619:35
hackinghorn joined19:37
hornhack left19:39
Betal joined19:40
sniperwolf joined19:46
alzgh joined19:48
alzgh good bot gitinfo19:48
I can only recommend 'Pro Git'19:48
Gustavo6046 Is it common practice to have code reformatters (like Python's black) run by a "CI" tool with results auto-amended to your commit and pushed upstream?19:50
imMute Gustavo6046: I'd rather it run locally, so I can decide when to run it and when to commit the results.19:50
Gustavo6046 Ah.19:51
Good point.19:51
ikke yeah, running these things locally is a lot better19:51
imMute Gustavo6046: at most, a CI-run formatter should simply block PRs until the formatter doesn't change anything (ie, you've run it locally)19:51
Gustavo6046 Yeah19:51
ikke CI could warn when things are not according to style19:51
Gustavo6046 Yah19:51
Ohhh, that19:51
that's what flake8 does, not reformatting. I'm stupid19:51
Thanks!19:51
teut joined19:54
cousteau joined19:54
cousteau Sup19:54
meator left19:54
teut so I pushed some changes on origin/master . now on local I reset head to head~4 --hard . now I did git pull origin master. With a fix of little 4 line conflict , it merged but all those commits I got back19:55
cousteau Is there a way to see the complete diff3 of a merge commit? `git diff HEAD HEAD^1 HEAD^2` only seems to show the conflict resolution changes19:55
teut I did not want that but to push local to origin but pulled origin to resolve cnonflicts19:56
what should I have used?19:56
osse i don't follow completely, but it sounds like you wanted to push --force19:57
teut I should ve done just a force push I think in this situation19:57
ya, ok so I will do it next time19:58
ikke yes19:58
You can still undo the merge and still force push19:58
teut how?19:58
git revert ??19:58
or reflog?19:58
ikke reset --hard HEAD~ if the merge (pull) is the last thing you did19:58
cousteau teut: I'm a bit confused. You pushed master to origin/master, now master = origin/master, then rewinded master 4 commits, now origin/master is ahead of master by 4 commits, then you pulled origin/master, which fast-forwarded master those 4 commits so that master = origin/master19:59
teut ya you are correct19:59
I got merge conflicts though because I merged my collegue's branch20:00
cousteau So pulling origin/master pretty much undoes the rewinding20:00
travaldo joined20:00
cousteau Oh20:00
teut he has 1 little change20:00
had*20:00
1 commit I guess so20:00
but it was a merge so shouldnt matter20:00
clime left20:01
cousteau You can avoid guessing by opening `gitk --all&` and seeing the commit graph in all its glory :)20:01
Null_A left20:01
cousteau I find gitk very helpful20:02
odoood joined20:02
teut https://dpaste.org/Qn7g20:02
The ampersand (&) character is not allowed. The & operator is reserved for future use;20:03
cousteau Huh?20:03
ikke I think they use windows / powershell20:03
teut ikke I created a commit after git add instead of git merge --continue by mistake20:03
ya20:03
I m on windows20:04
cousteau Oh20:04
teut I used git bash now20:04
it worked20:04
elkalamar joined20:04
cousteau Then gitk --all with whatever powershell uses to open programs in the background20:04
teut ya there is a tree now in the git gui20:04
jonosterman left20:05
pizdets left20:05
teut I already have extensions in vscode20:05
but both are tough to understand20:05
pizdets joined20:05
teut yukk, the tree looks horrible20:05
I did too much merging20:05
cousteau Not really. Each ball is a commit. It descends from another commit just below it, so that whenever you commit you add a ball on top of another.20:06
teut ikke so what can I do to revert it seeing the reflog?20:06
ya thats fine cousteau20:06
ikke You don't need to use the reflog to undo a merge20:06
teut I showed reflog so that you can understand better what I did20:07
I forgot what I did, often I do20:07
srinidhi left20:07
jonosterman joined20:08
teut I think reset to 2c8b05f should do it20:08
shailangsa joined20:08
Null_A joined20:08
ikke Yes, most likely20:08
arcatech left20:10
cousteau Re: three-way diff. Apparently `git diff HEAD HEAD^1 HEAD^2` (merge diff) isn't supported in 2.18, which is the newest version I could get my hands on20:11
Which explains why I didn't understand why I was getting the output I was getting20:11
teut thanks that fixed it20:11
cousteau Oh wait, I found a git 2.30 installed in a random place. (Who the hell maintains this machine?)20:13
teut if I force pull a colleague's master , will my master become exactly like his?20:13
ikke there is no force pull20:14
teut: What you want to use is fetch20:14
and then potentially reset --hard20:14
teut oh ok20:14
that would be dangerous to have20:14
yes got it thanks20:15
ZacSharp joined20:15
voltron left20:16
teut left20:16
fulljab joined20:16
fulljab left20:16
snedd left20:16
cousteau OK nope, using git 2.30.0 won't do it either20:17
ikke cousteau: I've never heard of a 3-way diff20:17
At least, not by specifying 3 commits20:18
to git diff20:18
sudoforge left20:18
jonosterman left20:18
Null_A left20:18
jonosterman joined20:21
Null_A joined20:22
junktext_ joined20:23
cousteau -c. I wanted git diff -c.20:24
ikke: 3-way as in the merge and the two parents.20:24
junktext left20:25
sudoforge joined20:25
cek left20:25
jimklimov1 left20:26
lessless left20:27
cousteau Why is -c not mentioned in the git diff synopsis nor options sections?20:28
ash_worksi left20:29
ash_worksi joined20:29
unluckyshrubbery left20:30
unluckyshrubbery joined20:30
cousteau git show -c HEAD also does what I wanted. But what's this mysterious undocumented -c feature?20:30
Null_A left20:32
cousteau And why does it generate lines saying "diff --combined" on the output but there is no `--combined` option to either diff or git diff? (it's -c, not --combined)20:33
unluckyshrubbery left20:33
unluckyshrubbery joined20:33
ZacSharp I think -c is the short name of --combined20:34
but I remember two options with a c, so maybe it's the other one20:35
cousteau Yeah but --combined doesn't work20:35
There's -c and --cc20:35
jimklimov joined20:35
sudoforge left20:36
osse man git-diff-tree mentions it20:36
gitinfo the git-diff-tree manpage is available at https://gitirc.eu/git-diff-tree.html20:36
cousteau -c generates lines saying "diff --combined", and --cc generates lines saying "diff --cc". One is consistent but the other isn't20:36
osse: OK, but why not git-diff?20:36
osse --cc is already a long flag :p20:36
I don't know20:36
Null_A joined20:38
odoood left20:39
cousteau It's a rather short long flag20:39
osse I think git diff is sort of a wrapper around diff-files and diff-tree and friends20:39
at least in its implementation20:39
cousteau OK, so -c will only print "interesting" files (those with changes from BOTH parents), and --cc will only print "interesting" hunks20:40
Brumaire left20:40
cousteau But none will print the complete three-way diff20:40
osse try -m20:41
cousteau In any case, I guess the interesting files are interesting enough. I just wanted to see if the merge did what I expected it to do20:41
tejr left20:42
tejr_ joined20:42
cousteau osse: that doesn't seem to do anything in git diff20:43
Anyway, I guess I have the info I was looking for after all20:44
And now I'm going to have... dinner! Bye :D20:44
cousteau left20:45
Null_A left20:46
Null_A_ joined20:53
ZacSharp Any diff-generating command can take the -c or --cc option to produce a combined diff when showing a merge. This is the default format when showing merges with git-diff(1) or git-20:54
show(1). Note also that you can give the -m option to any of these commands to force generation of diffs with individual parents of a merge.20:54
from man git diff20:54
gitinfo the git-diff manpage is available at https://gitirc.eu/git-diff.html20:54
Null_A_ left20:59
terrorjack left21:00
terrorjack joined21:01
aniruddha left21:02
madewokherd left21:03
otisolsen70 left21:07
Lord_of_Life_ joined21:07
jonosterman left21:08
ash_worksi left21:08
Lord_of_Life left21:09
sniperwolf left21:09
jonosterman joined21:10
ash_worksi joined21:10
Lord_of_Life_Lord_of_Life21:10
Null_A joined21:12
Brumaire joined21:17
Null_A left21:19
Null_A joined21:20
lemontree joined21:20
theoceaniscool left21:25
Null_A left21:26
Murr left21:27
Murr joined21:27
keypushe- joined21:28
ZacSharp3 joined21:28
keypusher left21:28
lemontree after i have successfully pulled, is there a way to show me all new commits which were introduced in this pull?21:28
Null_A joined21:28
osse git log HEAD@{1}..HEAD for example21:29
perrierjouet left21:30
lemontree but this is only the last commit21:30
what if i have more commits pulled?21:30
gh34 left21:30
osse no it isn't21:30
lemontree oh21:30
osse i often copy and paste the range that is printed21:31
e.g. abcd1234...def454 master or whatever21:31
keypushe-keypusher21:31
lemontree ah yes i was on the wrong repo21:31
ZacSharp left21:31
lemontree thanks. :)21:31
m0viefreak left21:32
ZacSharp3ZacSharp21:32
madewokherd joined21:36
vdamewood left21:36
ash_worksi left21:38
junktext_ left21:44
junktext joined21:44
ash_worksi joined21:45
tejr_tejr21:54
Samian left21:58
jonosterman left21:58
jsmooth left21:58
natrys left21:59
jonosterman joined22:01
odoood joined22:04
Null_A left22:16
jwillikers joined22:17
Null_A joined22:19
nuala left22:19
christall left22:19
jwillikers left22:22
nuala joined22:23
maroloccio left22:27
mrfhitz left22:27
jwillikers joined22:28
odoood left22:28
Null_A left22:28
junktext left22:28
palasso left22:34
Xenguy joined22:34
stkrdknmibalz joined22:36
Null_A joined22:36
nuala left22:37
wgrant left22:41
Brumaire left22:43
christall joined22:50
wgrant joined22:54
ash_worksi left23:00
unluckyshrubbery left23:02
pizdets left23:03
pizdets_ joined23:04
unluckyshrubbery joined23:05
christall left23:07
unluckyshrubbery left23:09
Swahili joined23:11
elkalamar left23:15
odoood joined23:30
ZacSharp left23:37
Moult joined23:44
Moult if branch foo has extra commits x y z compared to branch bar, what is the cleanest way to merge x and y (but not z) from foo to bar without creating duplicate commits? keep in mind there are quite a few more than just x and y.23:45
nedbat Moult: is z later than x and y?23:50
ash_worksi joined23:51
Moult nedbat: hmm some will, some will not. basically i have a list of commits a b c d e, and i will want a b c, not d, and e23:51
nedbat Moult: you could merge c and then cherry-pick e23:51
Moult nedbat: one solution which works is git merge x, git merge y, but that creates lots of commits. i'm not sure how to select a range of commits. i've tried git merge x..y but it says "x..y not something we can merge"23:51
nedbat Moult: you merge a commit, not a range of commits. you can pick the latest commit that has only wanted commits in its history23:52
christall joined23:52
Moult nedbat: sorry, i am simplifying, there are about 100 commits i'm choosing from. most i want, except for a few scattered here and there23:53
nedbat: ah pity i can't merge a range.23:53
nedbat Moult: the answer doesn't change. you merge a commit, and you get all of its history23:53
odoood left23:54
Moult nedbat: right, hence your recommendation if i want a b c, i can just merge c23:56
nedbat right23:56
Moult nedbat: i guess i could simply cherry pick ranges of commits that i want. what is the downside of doing a cherry pick?23:58
nedbat Moult: do you mind if i ask you about these branches? Are they meant to live for a long time? why do you need the same commits on two different branches?23:59

Logs Search ←Prev date Next date→ Channels Documentation