IRCloggy #git 2022-02-16

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.

2022-02-16

evanextreme joined00:00
evanextremeevanextreme[away00:00
evanextreme[away left00:01
feriman left00:01
evanextreme joined00:04
gast0n joined00:06
DoofusCanadensis left00:07
_9pfs left00:09
_9pfs joined00:09
duxsco joined00:10
Null_A left00:11
duxsco left00:12
evanextreme left00:12
evanextreme joined00:14
sudomann joined00:20
Betal left00:21
ferdna joined00:22
Null_A joined00:27
duxsco joined00:29
duxsco left00:31
Null_A left00:32
_9pfshello-smile4800:33
hello-smile48_9pfs00:33
duxsco joined00:33
wonty joined00:35
Tangent-Man joined00:36
worky left00:37
evanextremeevanextreme[away00:38
evanextreme[away left00:38
mexen joined00:42
kaiseisei joined00:43
szkl left00:48
Shashin left00:52
Shashin joined00:54
donofrio joined00:55
tyson2 joined00:55
va5c0 joined00:55
Kohe left00:59
LuxuryMode left00:59
Null_A joined01:02
szkl joined01:04
Null_A left01:06
va5c0 left01:08
crashrep joined01:15
worky joined01:18
thebombzen joined01:20
wonty left01:21
kaiseisei left01:24
kaiseisei joined01:25
_9pfs left01:27
_9pfs joined01:27
pyevery__ left01:32
chenqisu1 joined01:35
Null_A joined01:36
very_sneaky left01:36
geowiesnot left01:37
XV9 left01:37
very_sneaky joined01:37
Null_A left01:40
pretty_dumm_guy left01:42
Betal joined01:43
skapate joined01:47
skapate left01:47
skapate joined01:47
skapata left01:48
cousteau_ joined01:50
rgrinberg joined01:51
ChmEarl left01:53
causa_sui left02:00
vysn joined02:00
donofrio left02:01
Shashin left02:02
nyah left02:06
causasui joined02:07
jinsun__ joined02:09
xx left02:09
Nintenuendo left02:09
emf left02:09
Nintenuendo joined02:11
Nintenuendo left02:11
Nintenuendo joined02:11
jinsun left02:11
x_kuru left02:14
cousteau_ left02:15
lukedashjr joined02:20
luke-jr left02:21
xx joined02:21
kaiseisei left02:22
lukedashjrluke-jr02:22
kaiseisei joined02:22
Yruama left02:24
dviola left02:34
kaiseisei left02:35
bindu left02:35
bindu_ joined02:35
Crispy left02:36
kaiseisei joined02:36
bindu_bindu02:37
thiago left02:39
Sulky left02:39
durham joined02:40
hbautista joined02:40
kaiseisei left02:41
kaiseisei1 joined02:41
kaiseisei1kaiseisei02:44
chexum left02:45
durham left02:47
Gustavo6046 left02:47
Crispy joined02:49
a6a45081-2b83 joined02:50
ycon joined02:53
ycon Hi, so I'd like to revert to an old commit and then apply (progressively) the latest commit on top02:54
How can I do that? I'm on the "good" commit now with `git checkout commitHash`02:54
a6a45081-2b83 left02:55
f33f046c-a02e joined02:55
Betal ycon: if it is all on your branch, you can do an interactive rebase02:56
odoood joined02:56
ycon Betal: I tried that, using `git rebase -i main` (main is the name of my branch)02:56
Betal ycon: don't it show a list of commits for you? where you can pick/remove or change order of commits?02:57
adanwan left02:57
adanwan joined02:58
ycon Betal: that's not exactly what I want, I want to progressively decide which changes to add02:59
eg `git add -p latest`03:00
odoood left03:05
ycon Any ideas @Betal?03:09
chexum joined03:16
f33f046c-a02e left03:17
ackyshake ycon: I would start on the latest commit and then git rebase -i <good_commit>~ and then select the commits to edit.03:17
ycon ackyshake:But how do I select the individual changes I want to add from the "good" commit03:19
ackyshake if you check out to the "good commit" hash, you'd have to copy and paste the commit hashes to cherry-pick and edit (using git cherry-pick --no-commit), and then perform the regular edits03:19
thekingofbandit joined03:21
ycon ackyshake: is there a way to 1. Checkout "good commit" 2. Apply the "latest" commit on top progressively (like doing `git add -p`)03:21
?03:22
thekingofbandit left03:22
ackyshake ycon: If you have the commit of the latest hash, then yes, with git cherry-pick as I mentioned above.03:22
ycon so `git checkout goodCommit` then `git cherry-pick latestCommt` will give me options of what specific code changes to add/commit?03:23
ackyshake:03:23
ackyshake You want git cherry-pick --no-commit <hash> specifically, that will allow you to do so. It stages the changes by default, but you can use `git reset -p` to unstage hunks you don't want in the commit.03:24
ycon buti how do I find all the changes I don't want? Just git diff? ackyshake03:25
lgc joined03:25
ackyshake git diff --cached in your case.03:25
Swahili left03:25
ycon can it do the "progressive" mode so I can just yes/no individually? as what happens with `git add -p`?03:26
ackyshake but essentially yeah, 1. git cherry-pick --no-commit <hash> and then if you want: (git reset && git add -p) OR (git reset -p) Finally, you can then commit what's in the index.03:26
lgc left03:27
emf joined03:27
ackyshake ycon: yes.03:27
but all of this is much more complicated than the interactive rebase method IMO.03:28
ycon git cherry-pick --no-commit didnt work because a file was deleted, is there a way to "force" it or something?03:28
But interactive rebasing won't let me progressively see all the changes being added03:29
gast0n left03:30
mexen left03:31
ackyshake ycon: What do you mean the file was deleted? Was the file deleted on the "good commit" or the commit you're cherry-picking?03:32
And yes interactive rebasing will allow you to do whatever you want essentially.03:32
ycon SO rather than cherry-picking how cna I do the interactive rebase only adding selected changes? EG from a single directoryonly03:32
_9pfs left03:34
ackyshake just pick the commits you want to edit?03:34
ycon But there are several03:35
All good, I thought git would have a smart/clean way to do this03:35
ackyshake It does. Interactive se is that way.03:36
ycon: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History (read the whole thing, especially the "Splitting a Commit" part)03:36
s/Interactive se/Interactive rebase03:37
Azem joined03:37
_9pfs joined03:37
Emet-Selch left03:40
ycon left03:41
causasui left03:43
emf left03:47
rgrinberg left03:49
bloody left03:50
adanwan left04:02
adanwan joined04:02
drbeco left04:03
durham joined04:05
durham left04:09
cdown left04:13
crashrep left04:19
tyson2 left04:22
saroy joined04:27
va5c0 joined04:29
va5c0 left04:34
tchan left04:42
Tangent-Man left04:44
cbreak left04:47
zebrag left04:47
tchan joined04:48
cbreak joined04:50
hbautista left04:54
Vonter left04:55
ferdna left04:56
Null_A joined05:00
Null_A left05:04
srinidhi joined05:05
thiago joined05:09
Vonter joined05:10
OnkelTem joined05:19
Nintenuendo left05:25
pyevery__ joined05:28
_9pfs left05:32
pyevery__ left05:33
Nintenuendo joined05:33
Nintenuendo left05:33
Nintenuendo joined05:33
_9pfs joined05:34
oscurochu left05:34
karabaja4 joined05:37
skapate left05:38
duxco joined05:39
duxsco left05:41
duxcoduxsco05:41
mexen joined05:45
dviola joined05:50
masoudd joined06:01
sudomann left06:07
Zaliek left06:07
tchan left06:07
Zaliek joined06:07
lungaro left06:07
lungaro joined06:08
thebombzen_ joined06:08
tchan joined06:08
sudomann joined06:08
travisghansen6 joined06:08
fercell left06:08
fercell joined06:09
travisghansen left06:10
travisghansen6travisghansen06:10
thebombzen left06:11
cliluw left06:11
cliluw joined06:12
madewokherd` joined06:12
silas left06:13
silas joined06:14
foul_owl left06:14
madewokherd left06:15
humanBird joined06:16
dtux joined06:22
thebombzen_ left06:25
thebombzen joined06:25
karabaja4 left06:31
vdamewood left06:35
durham joined06:36
vdamewood joined06:36
great_taste left06:38
Thanatermesis left06:39
durham left06:39
_9pfs left06:40
sudomann left06:40
thiago left06:41
karabaja4 joined06:44
otisolsen70 joined06:44
foul_owl joined06:44
vysn left06:45
anaveragehuman left06:47
Shashin joined06:55
coot joined06:57
Shashin left07:00
samuelbernardo left07:02
samuelbernardo joined07:03
mat001 left07:09
mat001 joined07:10
dtux left07:10
sudoforge left07:14
jusski joined07:20
iomari891 joined07:20
Shashin joined07:26
Shashin left07:29
hornbill joined07:30
bkircher joined07:37
dcpc007 joined07:40
kenanmarasli joined07:41
dcpc007 left07:41
Kohe joined07:46
spare joined07:47
l4s8g_ joined07:48
PocketKiller left07:51
PocketKiller joined07:53
Sulky joined07:56
palasso joined08:02
l4s8g_ left08:02
spare left08:03
spare joined08:03
steam left08:05
steam joined08:06
wonty joined08:06
whatsupdoc left08:06
unluckyshrubbery left08:06
gnoo left08:07
szkl left08:08
worky left08:08
adgtl What are your most productive git commands you use everyday?08:12
zeenk joined08:15
ackyshake 'git blame': so I can blame someone else for issues people report and be productive (free) for the rest of the day.08:15
unfortunately, most of the time that someone else ends up being me :(08:16
Guest1 joined08:16
ackyshake all joking aside, 'status' is most likely my most used git command.08:17
osse status and diff (and commit) are the obvious ones, I suppose. Apart from that I use commit --fixup a lot and git rebase --keep-root @{u} both of which I've aliased08:17
l4s8g_ joined08:17
rfuentess joined08:17
jinsun__ --fixup is same as --amend?08:18
osse jinsun__: no, it creates a new08:18
ehh08:18
jinsun__: no, it creates a new commit to be squashed into another using rebase -i08:19
Kartagis these days I use diff a lot, because I have to patch the incompatible modules (Drupal)08:19
ackyshake osse: I can tell you've aliased git rebase --keep-root because "keep-root" is actually "--keep-base" :P08:20
osse lol08:20
gnoo joined08:20
Guest1sufinameh08:21
jinsun__ osse: okay, I got confused by the help text, I've used --amend only, I used to manually rebase -i when I needed to fixup08:21
l4s8g___ joined08:21
sufinameh left08:21
l4s8g___ left08:21
osse jinsun__: you reorder the list of commits and change "pick" to "fixup" right? If you use --fixup and rebase --autosquash then that happens automatically08:21
l4s8g_ left08:23
feriman joined08:23
jinsun__ yeah I did the thing in the text editor, gotta try the --autosquash and --fixup now08:23
l4s8g joined08:29
va5c0 joined08:30
nivag left08:30
jinsun__ osse: so I still need to do interactive rebase? just git rebase --autosquash <commit> did nothing (or nothing that I noticed)08:33
osse jinsun__: yes08:33
it just saves you the manual ordering and editing08:33
jinsun__ okay, so it just does the text editing part automatically for you08:33
va5c0 left08:35
jinsun__ I was expecting more "auto" :D, like reorder and then accept it and finish the rebase too08:35
reset left08:36
osse jinsun__: that's easy: GIT_EDITOR=cat git rebase :p08:37
john_johnk joined08:37
osse I use that a lot08:37
https://github.com/Osse/git-scripts/blob/master/git-rewrite08:37
ackyshake you could always skip the --autosquash option. This allows you to edit the commit ordering if needed, and the fixup commits will still be auto-squashed.08:38
l4s8g left08:38
jinsun__ osse: oh, nice08:38
[twisti] left08:39
nivag joined08:43
l4s8g_ joined08:43
masoudd_ joined08:43
l4s8g_ left08:43
Haohmaru joined08:45
Haohmaru what was the way to just discard my local "unstaged changes" ? (git gui)08:46
masoudd left08:46
osse ackyshake: no it's the --autosquash that does the reordering08:47
dminuoso Hi I have a plumbing question. Is git able to tell me the top-most directory (where the .git directory resides in)?08:48
ackyshake osse: I meant for the non-fixup commits.08:48
dminuoso: git rev-parse --show-toplevel08:49
osse ah08:49
dminuoso ackyshake: Oh that's perfect! Thanks08:49
va5c0 joined08:51
Shashin joined08:52
Shashin left08:57
Haohmaru ..it seems "Branch > Reset" does it08:58
zer0bitz joined08:58
rfuentess left09:00
iomari891 left09:00
wootehfoot joined09:05
Vonter left09:07
vimal left09:10
Vonter joined09:14
iomari891 joined09:16
john_johnk left09:17
va5c0 left09:19
makara1 hi. Im trying to use annotated tags for managing the project version number. But if I add a tag on one branch then when I switch to another branch (which doesn't include the commit that was tagged) the lastest tag is given as the one I just made09:20
how can I show the latest tag that applies to commits on the current branch only?09:22
ackyshake how are you finding the "latest tag"? You probably want to use 'git describe' to find the closest tag from HEAD.09:23
va5c0 joined09:23
ikke Note that tags don't belong to branches, they are global.09:24
Shashin joined09:24
Shashin left09:26
cliluw left09:28
cliluw joined09:29
TheCatBehemoth joined09:29
john_johnk joined09:31
makara1 i know that I "tag a commit". So if the commit I tagged isn't in the branch Im on, then I don't want to see it09:33
ackyshake: I know that I can do `git describe --abbrev=0`09:35
Luther joined09:36
Luther hello, I download a repo to my local PC from github09:37
MajorBiscuit joined09:37
Luther after I reset to a init commit, but the code don't change09:38
makara1 ok I see what's happening. How can I prune tags that point to commits that are no longer referenced by any branches?09:39
vimal joined09:41
selckin you want to remove the tags, or just not list them? the whole point of tags is to not remove them09:42
else its called a branch09:42
ackyshake Luther: it depends on what you really want to do, but you probably want to checkout to that commit rather than reset. 'git reset <commit>' re-writes your local history.09:44
carl- joined09:45
Ilyu joined09:46
Luther https://pastebin.ubuntu.com/p/Z9FzDH6yNw/09:46
vimal left09:46
humanBird left09:46
Luther please check my pastbin.09:47
selckin what does 'git status' say09:47
makara1 ok i get that09:48
Luther https://pastebin.ubuntu.com/p/R799864fhV/09:49
this is the git status09:49
Tangent-Man joined09:49
selckin 'git checkout -- .', will restore tracked files as the output says, to remove the untracked files you can do like 'git clean -df' (careful if there are files you want to keep)09:50
Luther it works, thank you, selckin.09:51
jazzy2 left09:51
dmvrtx left09:51
Betal left09:52
dmvrtx joined09:53
dcpc007 joined09:54
roadie joined09:55
vysn joined09:58
vimal joined09:59
unluckyshrubbery joined10:01
john_johnk left10:10
Akiva left10:12
suss joined10:13
worky joined10:15
Walex2 one of the huge annoyances (for me) of 'git' "porcelain" is that the commands don't make clear on which stuff (working tree, draft commit, "branch", commit) they work...10:16
too bad that ship sailed long ago.10:16
s/draft commit/index/ in common parlance :-)10:17
vicecea left10:17
Walex2 likes "object oriented" command interfaces10:17
dimi1947 joined10:17
wonty left10:17
vicecea joined10:18
selckin yes common problem, it grew quick & organically, git-stage etc are some attempts to clean thing upa bit more for the user commands, but when down in the low level you need to know whats up10:18
dmvrtx left10:19
dmvrtx joined10:19
roadie left10:20
pretty_dumm_guy joined10:24
roadie joined10:25
dmvrtx left10:26
dmvrtx joined10:26
foul_owl left10:27
xayto_ left10:28
dos_ joined10:30
xayto joined10:30
roadie left10:35
kaiseisei1 joined10:37
kaiseisei1 left10:37
ishutin left10:37
kaiseisei left10:37
ishutin joined10:39
benni joined10:41
roadie joined10:42
Vonter left10:43
foul_owl joined10:43
oscurochu joined10:44
vladoski joined10:44
Nicklificent joined10:46
Millicent left10:46
NicklificentMillicent10:46
Ilyu left10:48
jstein joined10:57
otisolsen70_ joined10:58
otisolsen70 left11:02
otisolsen70_ left11:02
otisolsen70 joined11:02
AbleBacon left11:03
roadie left11:04
vitali64 joined11:05
very_sneaky left11:07
wyre hi guys, I gues this answer https://stackoverflow.com/a/19705736/6723042 is a little outdated as I cannot use git branch in the way it points11:08
I guess I should use `git checkout -b ....`, am I right?11:08
ackyshake left11:08
selckin it should still work11:09
wyre selckin, where is supposed to be run that `git branch rebased-A hotfix/A` command from?11:11
very_sneaky joined11:11
wyre I mean, you could run that command while being in master branch?11:11
selckin anywhere11:11
ackyshake joined11:12
selckin create branch named rebased-1 from hotfix/A branch or tag, current branch has no effect11:12
wyre selckin, oh, sure, I've not noticed that hotfix was actually a remote ref 😆11:13
I thought from the beginning this was just a branch called hotfix/A11:13
suss left11:18
spare left11:19
masoudd_masoudd11:19
vitali64 left11:20
spare joined11:21
Jong left11:22
vitali64 joined11:23
OnkelTem left11:24
OnkelTem joined11:26
vishal left11:28
jmcb joined11:30
jmcb left11:30
vishal joined11:31
very_sneaky left11:32
l4s8g joined11:33
l4s8g left11:33
Rashad joined11:33
l4s8g_ joined11:34
otisolsen70 left11:34
l4s8g_ left11:37
l4s8g_ joined11:38
OnkelTem left11:44
OnkelTem joined11:46
Vonter joined11:50
tgummerer left11:51
romesrf joined11:52
OnkelTem left11:55
duxsco left11:56
vimal left11:59
very_sneaky joined11:59
otisolsen70 joined12:00
duxsco joined12:02
GoldLeader87 joined12:02
jusski left12:04
cdown joined12:10
vitali64 left12:11
vitali64 joined12:11
brw left12:12
brw joined12:13
GoldLeader87 left12:15
lgc joined12:19
lgc left12:20
GoldLeader87 joined12:26
drogas joined12:28
txtsd left12:29
jusski joined12:33
tolarz left12:34
spare left12:38
Misotauros left12:40
DrowningElysium joined12:40
nyah joined12:44
jnnnnnnnnn joined12:45
Shashin joined12:47
Shashin left12:47
cvmn joined12:52
tsujp joined12:54
humanface joined13:03
durham joined13:07
dos_ left13:08
astipasta joined13:08
donofrio joined13:08
dos_ joined13:09
john_johnk joined13:09
tsujp left13:09
astipasta Hello - I have a problem where git pull and push both say up to date, but the remote has files which i cannot see in my file system, but git ls-files shows the files - what could be the reason for this?13:10
frost-core joined13:10
frost-core hello13:10
selckin astipasta: what does 'git status' say13:10
frost-core how do i git clone a specific folder?13:11
selckin frost-core: you can't13:11
hseg joined13:11
frost-core selckin : in github, what can i do then?13:11
astipasta selckin: on branch develop up to date with origin/develop some changes not staged for commit, and some untracked files, none of them are related to the missing files.13:11
selckin frost-core: clone the entire repo13:11
frost-core ok then13:12
durham left13:12
frost-core but i dont want to wait very long, and thats the only option13:12
selckin you can clone only the latest version of the entire repo13:12
mackerman git clone --filter=blob:none # or don't download blobs right now13:13
selckin --depth13:13
frost-core oh its very tiny as a zip13:13
mackerman GitHub releases aren't the full repo, but maybe you only care about one tree.13:13
frost-core mackerman : this is what im downloading https://github.com/lubuntu-team/calamares-settings-ubuntu and i want the lubuntu folder only13:14
but nvm, the zip is tiny13:14
Kohe left13:14
mackerman Correction, that repo doesn't do real releases, that's just GitHub's zip a tree feature.13:15
bkircherbkircher_afk13:15
structoha joined13:15
hseg Looking for regressions a formatter introduced into my code, unsure how to invoke git grep appropriately for this13:15
frost-core left13:16
tyson2 joined13:17
mackerman hseg: man git bisect # if you have a test case13:17
gitinfo hseg: the git-bisect manpage is available at https://gitirc.eu/git-bisect.html13:17
hseg the regressions look likehttp://ix.io/3PKQ13:17
http://ix.io/3PKQ13:17
astipasta selckin: in a recent commit, i moved some files, when looking in gitk at that commit - most files are marked as renamed but - it seems like the problem files are marked as "new files" when though they were moved.13:17
hseg it's not a matter of bisecting -- I know what the bug looks like, but I suspect I've inserted it multiple times over13:18
and am looking for all the edits I made that introduce it13:18
selckin astipasta: git doesn't track moved files, it only tries to detect it in some views13:18
structoha left13:19
john_johnk left13:20
ikke hseg: git log -S or -G13:22
hseg ok, will try that, thanks13:24
jnnnnnnnnn left13:26
KeeperoftheKeys left13:32
otisolsen70 left13:32
bloody joined13:35
john_johnk joined13:35
vitali64 left13:45
vitali64 joined13:45
Null_A joined13:45
cvmn left13:46
atrigent left13:46
hseg ikke: that doesn't seem to work with multiline patterns, though?13:51
like, I'm looking for changes of the form '= new Foo();' -> '= new Foo\n{' which also match 'x.A = x.B' -> 'A = x.B'13:53
atrigent joined13:53
osse hseg: git log -S$'Foo\n{' (or some other way of actually injecting a newline into the argument)13:55
skapata joined13:56
skapata left13:56
skapata joined13:56
alt-romes joined13:56
vysn left13:56
hseg Foo isn't a fixed string, and the amount of whitespace between the \n and { varies as well13:56
so I need -G I think13:56
osse in that case you're fucked13:56
dos_ left13:57
Common-Lisp joined13:57
osse no wait a minute13:57
-S --pickaxe-regex13:58
rsx joined13:58
osse but I guess that is limited to lines too13:58
no wait a minute again13:58
it works!13:58
romesrf left13:59
hseg what's the invocation for that?13:59
osse (with the literal newline thing) git log -S$'Foo\n *{' --pickaxe-regex13:59
or use [[:space:]] I guess13:59
kenanmarasli_ joined14:00
hseg ah, ok -S$'= new.*\n *\{' --pickaxe-regex14:00
thanks14:01
osse in a shell that supports $'' which almost all do14:01
Null_A left14:01
hseg now need to figure out how A) to limit the outut to matching hunks and B) run the 'x.A = x.B' -> 'A = x.B' match14:01
selckin probably need \\{14:02
hseg that \{ is inside the quote14:03
selckin { has meaning in regex, need to escape the $'' and the regex14:03
kenanmarasli left14:03
kenanmarasli_kenanmarasli14:03
selckin to end up with "-S\{" you need -S$'\\{'14:04
hseg nope, because \{ is an invalid c escape and therefore is passed as-is14:04
aehu6ce8 joined14:04
hseg though it's good advice in general14:05
(ie \{ will try and fail to escape {, and return \{, whereas \\{ will escape \ and return \{)14:05
AzemEmet-Selch14:05
hseg hrm, seems https://gist.github.com/phil-blain/2a1cf81a0030001d33158e44a35ceda6 has a way of doing both the "limit output" and "secondary match" parts14:08
dimi1947 left14:08
pyeveryt_ joined14:09
sudoforge joined14:11
Gustavo6046 joined14:12
Gustavo6046 left14:13
Gustavo6046 joined14:14
otisolsen70 joined14:17
cdown_ joined14:18
txtsd joined14:18
gh34 joined14:19
cdown left14:20
cdown_cdown14:20
john_johnk left14:22
xkuru joined14:23
Xenguy left14:23
Gustavo6046 left14:29
Gustavo6046 joined14:29
R2robot_ joined14:35
alt-romes left14:35
zmt01 joined14:35
romesrf joined14:36
PocketKiller left14:36
txtsd left14:37
R2robot left14:37
asdflkj_sh left14:37
kmt_ joined14:38
Luther left14:38
hornbill left14:38
vdamewood left14:38
TonyStone left14:38
elastic_dog left14:38
magic_ninja left14:38
zmt00 left14:38
vdamewood joined14:38
humanface left14:39
PocketKiller joined14:39
kaisyu joined14:39
txtsd joined14:40
asdflkj_sh joined14:40
Luther joined14:40
Null_A joined14:46
chenqisu1 left14:48
l4s8g_ left14:48
l4s8g joined14:49
Null_A left14:50
TonyStone joined14:50
Swahili joined14:52
magic_ninja joined14:53
R2robot_ left14:53
kmt_ left14:55
zulutango left14:56
zulutango joined14:57
l4s8g___ joined14:57
l4s8g left14:58
kenanmarasli left14:59
vimal joined15:03
vimal left15:04
Shashin joined15:05
R2robot joined15:05
vimal joined15:05
l4s8g___ left15:06
spare joined15:06
furrymcgee joined15:08
mannequin left15:09
vimal left15:09
vimal joined15:11
m0viefreak joined15:15
l4s8g_ joined15:16
reset joined15:17
Oblomov left15:17
Null_A joined15:19
vdamewood left15:23
vdamewood joined15:24
Null_A left15:24
CarloWood left15:25
astipasta left15:25
vitali64 left15:26
Torr joined15:28
Torr Hey15:28
How do I specify the object from which <git show> creates the diff?15:29
By default is uses <HEAD>.15:29
The two objects btw.15:30
Vonter left15:30
Torr Something like: git show <obj1> --diff-from=<obj2>15:30
OnkelTem joined15:31
rewt git show is for a single object; if you want a diff between 2 arbitrary commits, use git diff15:31
Torr rewt: But it already does a diff of two objects.15:32
rewt no, it shows a single object, which itself is the "diff" contained in that single object15:33
Vonter joined15:33
Torr Perhaps object is not the correct word. Lemme explain from another angle.15:34
Common-Lisp left15:34
va5c0 left15:34
ikke A commit is a snapshot, not a diff15:34
Torr If u run: git show <commit>, it'll create a diff from the staging area and the last commit, right?15:34
ikke No, that commit against its parent15:35
Torr Oh yes, that's what I wanted to say.15:35
donofrio left15:36
va5c0 joined15:36
Torr But if don't specificy the commit, it'll compare with the staging area, right?15:36
Like just: git show15:36
ikke It shows HEAD15:37
Torr <HEAD> against the staging area, right?15:37
ikke no15:37
rewt HEAD against HEAD^ (the prev commit)15:37
ikke against its parent15:37
git diff would compare against the working tree15:38
rewt man git show15:38
gitinfo the git-show manpage is available at https://gitirc.eu/git-show.html15:38
rewt man git diff15:38
gitinfo the git-diff manpage is available at https://gitirc.eu/git-diff.html15:38
benni left15:40
Luther left15:41
aehu6ce8 left15:42
hseg left15:43
mat001 left15:47
vitali64 joined15:47
duxsco left15:48
gevreeen left15:50
Oblomov joined15:50
Torr Right, found the commit.15:51
Thank you15:51
jamiejackson joined15:53
vitali64 left15:53
vitali64 joined15:54
Null_A joined15:55
zebrag joined15:55
jamiejackson hi folks, there's no way to automatically enforce a pre-commit hook for a repository, is there? the solutions i've seen require each developer to proactively do something in order to get on board.15:56
john_johnk joined15:56
thiago joined15:56
causasui joined15:56
mat001 joined15:56
gast0n joined15:56
ljharb jamiejackson: that's by design; it'd be a huge security vulnerability to allow hooks to be auto-installed15:57
causasui is there some way to set max depth on the status and diff commands?15:57
nrg left15:57
odoood joined15:57
Torr left15:57
ljharb jamiejackson: but also, clientside hooks are trivially bypassable; the only enforcement that matters is on the server15:57
txtsd left15:58
duxsco joined15:58
jamiejackson okay, got it, ljharb. i'd like to restrict file size in my repos. i'm still looking for a server side hook that doesn't have holes in it.15:59
Null_A left15:59
causasui jamiejackson: this is gonna be controversial but the rather unfortunately named tool 'pre-commit' has a hook that will block big files. we run it in CI. the supply chain vulnerability is too much for the linux project but depending on your threat model it might be fine for you16:00
vitali64 left16:01
jnnnnnnnnn joined16:01
vaio left16:02
john_johnk left16:03
GoldLeader87 left16:03
vaio joined16:03
skapata left16:05
jnnnnnnnnn left16:06
jnnnnnnnnn joined16:07
coot left16:10
nrg joined16:12
crashrep joined16:13
m0viefreak left16:15
SuperLag left16:16
dtux joined16:16
Shashin left16:19
Misotauros joined16:19
Shashin joined16:20
terminalpusher joined16:20
Thanatermesis joined16:20
suss joined16:25
durham joined16:28
Betal joined16:29
benni joined16:29
jamiejackson causasui, i'm missing a piece of your explanation. how does the CI hook prevent a *developer* from pushing problematic commits to the central repo?16:30
GNUmoon left16:31
SuperLag joined16:31
jusski left16:32
spare left16:33
carl- left16:34
mackerman Server hooks and CI can apply to developers as well.16:34
vitali64 joined16:35
terminalpusher left16:35
ikke jamiejackson: it cannot prevent it from pushing it to a repo, it can preventing it from being merged in the main branch16:36
If you want to prevent pushing, you need server-side hooks16:36
But that means you need to control the server16:36
madewokherd joined16:36
jamiejackson okay, gotcha. my concern is not only preventing master from getting polluted but from the whole repo getting permanently bloated with an errant, giant file. i'm going to pursue server-side hooks, thanks.16:38
madewokherd` left16:38
ikke Note that that's also what the likes of github are using to prevent you from push too large files16:38
Guest38 joined16:39
Guest38 left16:40
roadie joined16:40
jamiejackson yeah, i think the limits are too high for my needs, though, ikke16:43
ikke If you want to host it on github, you do not really have the opportunity to specify server-side hooks though16:44
frm joined16:47
GNUmoon joined16:47
kaisyu left16:49
frm left16:49
odoood left16:49
tyson2 left16:50
Betal left16:51
ChmEarl joined16:53
rgrinberg joined16:54
txtsd joined16:55
___nick___ joined16:55
txtsd left16:59
txtsd joined16:59
txtsd left17:01
txtsd joined17:02
Null_A joined17:02
txtsd left17:05
mexen left17:05
txtsd joined17:05
isolier joined17:06
isolier Hello. I have a code base under git revision control, however, I want to split it into client code and API code. I have one branch with API code removed, and one branch with the client code removed. How do I go about essentially creating a new repo for those two respective branches. Do I just checkout a specific branch in a new directory, and17:11
proceed as if I pulled a repo? What is the best practice for this?17:11
benni left17:12
wonty joined17:14
madewokherd left17:15
phrix joined17:16
mackerman !split_repository17:16
gitinfo [!filter_subdirectory] You can use filter-branch's subdirectory filter to split a directory from an existing repository into a new repository, keeping all history. https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/17:16
spare joined17:16
worky left17:16
mackerman Branches in one repo with only some of the tree may not be easy to maintain.17:18
Akiva joined17:19
stewie925 joined17:20
vdamewood left17:20
vdamewood joined17:21
Haohmaru left17:23
Shashin left17:25
jnnnnnnnnn left17:26
___nick___ left17:26
Shashin joined17:27
___nick___ joined17:28
jnnnnnnnnn joined17:30
durham left17:30
isolier Okay, thank you.17:30
___nick___ left17:31
saroy left17:32
___nick___ joined17:33
Misotauros left17:35
stewie925 left17:36
Shashin left17:38
Null_A left17:38
KeeperoftheKeys joined17:41
dirigible left17:41
dirigible joined17:41
stewie925 joined17:43
drogas left17:45
l4s8g_ left17:48
crashrep left17:49
fdan joined17:50
fdan Hi there, i had forked a repo and created a PR. the PR was in review for a long time and as a result the main repo got updated17:51
how to get the latest changes to my forked repo17:51
odoood joined17:52
ikke add the upstream repo as a remote17:53
fetch the branches17:53
rebase your feature branch on the upstream main branch17:53
force push to your fork17:53
fdan ikke i did a git remote add upstream17:54
then git fetch upstream17:54
can i do a git merge upstream/master master17:54
tsdh joined17:54
Null_A joined17:54
ikke fdan: usually projects don't like it when you add merges to pull requests17:55
tyson2 joined17:55
fdan aah i just did that17:55
humanBird joined17:58
Null_A left17:59
ozoned joined17:59
odoood left18:00
mat001 left18:01
mat001 joined18:01
vicfred joined18:02
DoofusCanadensis joined18:02
iomari891 left18:03
fdan ikke i had a merge conflict, i fixed it and then did a git add18:04
when i do a git states18:04
vicfred_ joined18:04
fdan it says lot of changes to be committed on files which i have not worked18:04
roadie left18:04
ikke fdan: did you do a rebase or a merge?18:05
fdan i did a merge18:05
i did git merge upstream/master master18:05
then resolved the conflict18:05
and did a git add <file>18:06
vicfred left18:07
ikke git commit to finish the merge18:08
or git merge --continue18:08
fdan when i would do a git merge --continue18:09
vicfred_ left18:09
Maxattax left18:11
zeenk left18:11
PCatinean joined18:13
menace joined18:16
menace left18:16
menace joined18:16
menaceDeknos18:16
ozoned left18:17
Vonter left18:19
crashrep joined18:21
Misotauros joined18:21
madewokherd joined18:23
Maxattax joined18:25
crashrep left18:25
Deknos left18:29
john_johnk joined18:33
crashrep joined18:35
great_taste joined18:36
Jong joined18:37
vysn joined18:38
Vonter joined18:42
Betal joined18:44
fdan Hi there, i tried to do a rebase and the git push origin master18:44
the push didnt happen as i was getting hint: Updates were rejected because the tip of your current branch is behind18:45
hint: its remote counterpart. Integrate the remote changes (e.g.18:45
hint: 'git pull ...') before pushing again.18:45
i did a git pull18:45
and i got this message https://dpaste.org/we8P18:45
can any one help?18:47
rewt with which part?18:48
ikke fdan: after you do a rebase, you should not run git pull18:51
You need to force push, like I mentioned earlier18:51
suss` joined18:52
rgrinberg left18:53
dflick joined18:53
MajorBiscuit left18:54
suss left18:54
fdan got it18:56
oscurochu left18:59
l4s8g joined19:05
olbat__olbat19:07
l4s8g left19:09
The_Blode_ joined19:11
The_Blode left19:12
rektide left19:14
emf joined19:15
l4s8g joined19:15
kenanmarasli joined19:20
igemnace left19:21
rgrinberg joined19:24
john_johnk left19:26
pyeveryt_ left19:28
vysn left19:29
romesrf left19:30
quesker is there some way to force git to follow .gitignore symlinks? I don't want to maintain 100 .gitignores19:31
there is some new thing that it is complaining about it being a symlink19:31
DoofusCanadensis 100 .gitignores?19:33
oh same one for every project19:33
quesker yep19:33
mannequin joined19:34
igemnace joined19:34
quesker I might be exaggerating by like 94 or so but still19:34
rsx left19:34
DoofusCanadensis and if you delete those repos and reclone? what is your expected behaviour for that file?19:34
Vonter left19:35
quesker yes my git is dumb but I like it that way. I have symlinks to other repos19:35
rgrinberg left19:35
menace joined19:36
menace left19:36
menace joined19:36
quesker it worked like this for many years before they "fixed" it19:36
Timvde quesker: you can set a global .gitigore on your system, but well, that wouldn't be checked in19:37
fdan left19:37
DoofusCanadensis sounds like quesker is the sole user so a user or global .gitignore should be fine19:38
quesker I guess it never changes so I might as well make the 6 copies. just never understand why they fix things that don't need fixed.19:38
Timvde Yea, sorry, with "global" I meant "for your user"19:38
quesker: or you just don't know the reason why it needed to be fixed :)19:39
DoofusCanadensis probably security19:39
quesker it was like that for many years, couldn't have been that broken19:39
jazzy joined19:40
DoofusCanadensis log4j was like that for many years too. turns out it *was* that broken19:40
quesker heh yeah19:40
Vonter joined19:40
phrix left19:41
DoofusCanadensis anyway, git looks in several locations for gitignore configurations at a global, user, project, and directories inside a project.19:41
quesker next thing they won't allow symlinks anywhere19:41
Lord_of_Life left19:41
Lord_of_Life_ joined19:41
quesker for "security"19:41
DoofusCanadensis symlinks aren't available on all supported platforms19:41
menace left19:42
quesker well fix those platforms19:42
Timvde I have `git config --global core.excludesfile ~/.gitignore_global`19:42
quesker they sound broken19:42
DoofusCanadensis probably, but they're among the most numerous19:42
quesker thanks I will try that I guess since I am too lazy to copy 6 files19:42
DoofusCanadensis for me, everybody else who uses my project repos need to be using the same .gitignore configuration so in the project repo they go19:43
vladoski left19:43
DoofusCanadensis and since I have a fish function `getignores` to fetch from the gitignore project it's part of a project setup anyway19:43
Timvde DoofusCanadensis: mostly, yes. I put project-specific things in there, not a bunch of IDE-specific things. People should put those in their personal .gitignore.19:43
Lord_of_Life_Lord_of_Life19:44
DoofusCanadensis Timvde: generally, true, but I'm in control of a corporate repository and get to keep devs from stomping all over each other so IDE settings go in the project19:44
Timvde DoofusCanadensis: I'd say "train the devs"19:45
DoofusCanadensis they won't let me use my training stick19:45
Timvde but I guess that may be a tough battle :P19:45
DoofusCanadensis that said, we are starting to get some traction on the whole train the devs idea19:46
Timvde I'm happy to be in a company with a "we want to do it right" culture19:46
quesker they tried to force a corporate repo with ridiculous settings so I just made my own repo under my user. I am the only dev on this so nobody notices19:46
crabbedhaloablut left19:48
crabbedhaloablut joined19:48
emf left19:54
coot joined19:55
Null_A joined19:56
cvmn joined20:06
john_johnk joined20:11
lukedashjr joined20:14
mat001 left20:15
mat001_ joined20:15
Vonter left20:15
luke-jr left20:17
lukedashjrluke-jr20:17
Null_A left20:19
duxsco left20:20
TheCatBehemoth left20:23
mat001_ left20:26
cvmn left20:26
mat001 joined20:26
Betal left20:27
OnlineCop We're just now getting around to adding `* text=auto` to our repo's .gitattributes file. 10k changed files.20:28
crashrep left20:31
evanextreme joined20:31
whatsupdoc joined20:31
PCatinean left20:35
Null_A joined20:37
frm joined20:38
duxsco joined20:40
Vonter joined20:40
humanBird left20:42
otisolsen70 left20:45
___nick___ left20:48
romesrf joined20:48
malmalmal joined20:53
emf joined20:58
pyevery__ joined20:59
zulutango left21:01
Vonter left21:02
tyson2 left21:02
Yruama joined21:02
DK3 left21:05
tyson2 joined21:05
zulutango joined21:05
GNUmoon left21:06
rgrinberg joined21:09
Vonter joined21:11
furrymcgee left21:11
l4s8g left21:13
zeenk joined21:15
quesker I have 10 changes to be committed (stuff already git added). is there some way to commit just one of those changes for now?21:18
I just want that commit to have a different message than the rest21:18
worky joined21:18
quesker without unstaging the others would be nice21:18
mackerman git rm --cached # will unstage paths21:20
Vonter left21:20
wonty left21:21
rudi_s quesker: git commit can take a path spec, but that only works if one of these changes is the only change in a single file.21:24
quesker hmm not sure what that means but I will try it21:25
rudi_s quesker: It commits all the changes of a single file.21:27
So it only helps you if the single change you've added to the index is in a file and there are no other changes you don't want to commit in that file.21:27
quesker yeah I think that is what I wanted thanks21:27
oh I see, my question was vague. I get it21:30
sudoforge is there any particular reason that git-diff always exits 0 when using a `-G` pickaxe search along with `--quiet`, which _should_ imply `--exit-code`?21:31
seems like a bug21:32
feriman left21:32
sudoforge interesting... i can recreate it when supplying a regex, e.g. '^foo' as the argument to -G21:36
m0viefreak joined21:37
sudoforge but not without the start-of-line marker21:37
duxsco left21:37
sudoforge e.g. `git diff --cached -G '^foo' --quiet -- some/path` _always_ returns 0, whether or not the line matching ^foo has been modified21:38
masoudd_ joined21:44
evanextremeevanextreme[away21:45
stewie925 left21:45
jstein left21:47
kenanmarasli left21:47
masoudd left21:47
yuljk left21:49
wonty joined21:50
yuljk joined21:50
worky left21:53
donofrio joined21:55
ackyshake left21:56
AbleBacon joined21:56
donofrio left21:57
Betal joined21:57
xx left21:57
s1b1 left21:59
DrowningElysium left22:00
malmalmal left22:00
madewokherd left22:03
vancz left22:08
vitali64 left22:13
GNUmoon joined22:14
ackyshake joined22:15
Null_A left22:16
pyevery__ left22:16
Rashad left22:24
Null_A joined22:24
Null_A left22:24
Null_A joined22:24
terminalpusher joined22:24
wolfshappen left22:25
Betal left22:27
vancz joined22:30
Vaelatern left22:30
ackyshake left22:31
rgrinberg left22:33
rgrinberg joined22:35
Vaelatern joined22:35
Vaelatern left22:35
Vaelatern joined22:35
spare left22:36
s1b1 joined22:37
madewokherd joined22:39
vicfred joined22:42
frm left22:44
evanextreme[away left22:44
k8yun joined22:44
Betal joined22:45
john_johnk left22:46
XV8 joined22:47
emf left22:48
cliluw left22:50
terminalpusher left22:52
emf joined22:55
gh34 left22:58
junebug joined22:58
Null_A left22:59
rgrinberg left22:59
stewie925 joined23:01
Yruama_ joined23:02
Yruama left23:02
pizdets left23:02
pizdets joined23:03
romesrf left23:09
cliluw joined23:13
leah2 left23:15
Null_A joined23:16
coot left23:19
Null_A left23:20
DoofusCanadensis I just got handed some code that does a `git checkout` followed by a `git reset --hard`. that seems duplicative23:23
Xenguy joined23:23
Xenguy_ joined23:26
leah2 joined23:27
Xenguy left23:29
Shashin joined23:32
braxas left23:35
sa left23:35
Illya left23:35
cozycactus left23:35
manveru left23:35
Manouchehri left23:35
zeenk left23:35
Illya joined23:35
relipse left23:35
offby1 left23:35
mannequin left23:35
nightstrike left23:35
kenyon left23:35
offby1 joined23:35
^3^ left23:35
Baughn left23:35
LadyLioness left23:35
gajus left23:35
peac left23:36
bn_work left23:36
sunarch left23:36
Sario left23:36
whatsupdoc left23:36
merpnderp left23:36
fdv left23:36
ross left23:36
sharpertool left23:36
Darkfoe left23:36
englishm left23:36
derfj left23:36
redrambles left23:36
neoweb left23:36
jakesyl__ left23:36
manveru joined23:36
Manouchehri joined23:36
relipse joined23:36
^3^ joined23:36
braxas joined23:36
manveru left23:36
manveru joined23:36
gajus joined23:36
^3^ left23:36
^3^ joined23:36
redrambles joined23:36
ross joined23:36
ross left23:36
ross joined23:36
sunarch joined23:36
fdv joined23:36
peac joined23:36
jakesyl__ joined23:36
Baughn joined23:36
LadyLioness joined23:36
merpnderp joined23:36
Sario joined23:36
mannequin joined23:36
Darkfoe joined23:36
sharpertool joined23:36
neoweb joined23:36
englishm joined23:36
sa joined23:36
whatsupdoc joined23:36
cozycactus joined23:36
kenyon joined23:37
nightstrike joined23:37
derfj joined23:37
bn_work joined23:37
n-st left23:38
n-st joined23:38
palasso left23:39
sudoforge DoofusCanadensis: yes, that makes no sense whatsoever23:40
you can delete the `git reset --hard` call23:40
DoofusCanadensis that's what I was thinking23:42
ackyshake joined23:42
rewt what happens with git checkout if there are modified files?23:43
causasui left23:43
BtbN nothing, if what you're checking out doesn't touch them23:44
crashrep joined23:44
BtbN it fails if it does23:44
rgrinberg joined23:45
Shashin left23:45
DoofusCanadensis oh thanks. need to add --force to these checkouts23:46
XV8 left23:46
rgrinberg left23:47
Null_A joined23:48
jjakob left23:52
jjakob joined23:52
Null_A left23:53
dimi1947 joined23:53
causasui joined23:55
mat001 left23:56
causa_sui joined23:57

Logs Search ←Prev date Next date→ Channels Documentation