IRCloggy #git 2023-06-28

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.

2023-06-28

adanwan joined00:00
jklfds_ left00:01
nyah left00:03
dvanloon3 left00:04
EvgenyK joined00:07
dvanloon3 joined00:07
so-offish left00:07
gsi_ joined00:08
dvanloon3 left00:10
dvanloon3 joined00:12
gsi left00:12
EvgenyK left00:13
ThorMojito joined00:20
osse left00:23
dostoyevsky2 left00:25
dostoyevsky2 joined00:26
osse joined00:26
Nokurn joined00:29
drbeco joined00:29
liefer396 left00:34
Xenguy left00:36
stewie925 left00:36
EvgenyK joined00:43
peas left00:45
Nokurn left00:46
peas joined00:47
EvgenyK left00:48
omero left00:51
omero joined00:53
junyx joined00:55
dvanloon3 left00:57
bodiccea left00:58
bodiccea joined00:58
EvgenyK joined00:58
dvanloon3 joined00:59
cousteau_ left01:01
bodiccea left01:02
bodiccea joined01:03
EvgenyK left01:03
ChmEarl left01:05
joek joined01:07
clime left01:10
joek left01:11
ThorMojito left01:11
ThorMojito joined01:13
bambanxx left01:20
nate2 joined01:23
ThorMojito left01:25
Guest83 left01:25
jacobk left01:26
nate2 left01:27
ThorMojito joined01:29
EvgenyK joined01:29
jacobk joined01:30
EvgenyK left01:33
derpydoo left01:36
EvgenyK joined01:36
Xenguy joined01:40
EvgenyK left01:41
EvgenyK joined01:43
causasui left01:43
EvgenyK left01:50
EvgenyK joined01:52
EvgenyK left01:56
dvanloon3 left01:57
dvanloon3 joined01:58
bambanxx joined02:10
knolle left02:12
dsrt^ joined02:15
bambanxx left02:16
nate2 joined02:17
gas51627 left02:17
FinnElija left02:22
finn_elija joined02:22
finn_elijaFinnElija02:22
hoochmonger left02:23
ThorMojito left02:24
EvgenyK joined02:25
jlc left02:32
jlc joined02:33
nsaunders joined02:34
EvgenyK left02:41
JeffH joined02:47
bloody left02:48
JeffH Can someone help me with a rebase I need to do? I have the following sequence of commits on main. A -> B -> C. Off of C I made a feature branch and have C -> D -> E -> F. I need to move C and D to the main branch and leave E and F on the feature branch.02:49
oops.. I need to move D and E to main and keep F on the feature branch.02:50
EvgenyK joined02:55
dvanloon3 left02:57
dvanloon3 joined02:58
nsaunders left02:58
EvgenyK left02:59
EvgenyK joined03:00
lucasta left03:01
mud JeffH: You should be able to just, on main do `git merge --ff-only E` and I think you're done?03:02
lucasta joined03:03
EvgenyK left03:05
joek joined03:06
myme left03:06
joek left03:10
dvanloon3 left03:12
nate2 left03:19
EvgenyK joined03:30
falafel joined03:32
EvgenyK left03:35
Gary_Sinise joined03:35
PageNotFound joined03:39
cafkafk left03:41
cafkafk joined03:44
lucasta left03:47
EvgenyK joined03:48
tirnanog left03:48
EvgenyK left03:53
starfarer left04:01
bywaterloo joined04:03
warthog9 left04:04
peas left04:05
hoochmonger joined04:07
PageNotFound left04:10
falafel left04:18
EvgenyK joined04:22
JeffH mud: yeah, I figured that out. Thanks for responding though. Futzing with rebasing and merging. I think I'm starting to get the gist of it.04:22
EvgenyK left04:34
iokill left04:40
EvgenyK joined04:40
Gary_Sinise left04:43
EvgenyK left04:44
Gary_Sinise1 joined04:45
iokill joined04:46
Gary_Sinise1Gary_Sinise04:47
jmd joined04:47
Geronimo left04:49
JeffH left04:55
clime joined04:56
EvgenyK joined04:57
joek joined04:59
EvgenyK left05:01
joek left05:03
JeffH joined05:04
coot joined05:07
hoochmonger left05:11
nate2 joined05:15
c0dehu1k joined05:16
memset left05:16
coot left05:17
nate2 left05:20
theobjectivedad left05:21
coot joined05:21
theobjectivedad joined05:22
EvgenyK joined05:23
Geronimo joined05:24
falafel joined05:24
memset joined05:28
SomeAB joined05:31
c0dehu1k left05:31
cafkafk left05:40
SuperLag left05:40
EvgenyK left05:41
Wuzzy joined05:42
SuperLag joined05:45
SuperLag left05:45
SuperLag joined05:45
falafel left05:45
carl--- joined05:48
carl-- joined05:50
EvgenyK joined05:52
carl--- left05:53
thiago left05:55
carl--- joined05:59
han-solo joined06:00
carl-- left06:02
junyx left06:07
weedmic joined06:07
carl--- left06:08
clime left06:10
coot left06:11
kostkon_ left06:14
kostkon joined06:14
coot joined06:25
coot left06:29
coot joined06:31
vysn joined06:41
rfuentess joined06:45
jmd left06:47
hans_ joined06:49
cafkafk joined06:52
joek joined06:53
xFFC joined06:54
joek left06:56
memset left07:05
bywaterloo left07:06
memset joined07:07
stenno joined07:10
Gary_Sinise left07:16
EvgenyK left07:16
theoceaniscool joined07:20
nsaunders joined07:24
jklfds_ joined07:26
mobidrop joined07:27
igemnace joined07:28
samiamsam left07:30
EvgenyK joined07:31
KnoP joined07:32
f_ joined07:32
igemnace left07:35
igemnace joined07:35
EvgenyK left07:36
jfsimon1981 left07:40
cafkafk left07:41
roadie joined07:41
cafkafk joined07:41
EvgenyK joined07:42
EvgenyK left07:47
skapata left07:48
EvgenyK joined07:51
gareppa joined07:52
roadie` joined07:54
roadie left07:55
EvgenyK left07:56
warthog9 joined07:57
yetoo joined08:03
Echoz left08:03
Echoz joined08:04
yetoo I clone a repo, I do unstaged and uncommited work. I checkout to make another branch with those same unstaged and uncommited work. I checkout master to switch to it. I do git reset --hard. Why do uncommited and unnstaged changes from both branches are lost? Is there a way to do git reset --hard on just one branch so the rest of the branches dont lose unstaged and uncommited work?08:06
Echoz left08:06
Echoz joined08:08
EvgenyK joined08:08
roadie` left08:12
EvgenyK left08:13
yetoo Additionally why when I git apply a patch it applies to all branches and not the currently seelcted branch08:14
this is stupid and not documented properly08:14
git restore . resets all the branches08:14
ch uncommitted changes are not attached to a branch08:15
KnoP left08:15
nsaunders left08:17
igemnace left08:17
igemnace joined08:18
kostkon left08:19
troyt left08:21
ccapndave joined08:21
yetoo ch: and there is no way to get them to attach to a branch?08:22
ch commit08:23
w4 left08:25
yetoo ch: in my testing I touched a file. git restore . and git reset --hard is not removing it. Why?08:25
kostkon joined08:25
EvgenyK joined08:25
ch a new file git did not yet know about?08:25
knolle joined08:27
yetoo ch: I guess08:27
ch: command was touch a08:27
I mean I can manually rm it, but annoying that none of the ways thats supposed to remove it dont remove it08:28
ch git only cares about "tracked" files. if you never told git about it, it leaves it alone08:28
https://git-scm.com/docs/git-reset#Documentation/git-reset.txt---hard states this in a careful way08:28
git clean can delete untracked files08:29
w4 joined08:29
igemnace left08:29
igemnace joined08:30
troyt joined08:32
igemnace left08:32
igemnace joined08:32
igemnace left08:33
igemnace joined08:33
circle joined08:37
roadie joined08:38
igemnace left08:39
igemnace joined08:39
circle Hello, I have a repository on github (and can use the git CLI). A file was started with content A and then toggled back and forth between A and B finally ending back at A. Is it possible to undo all but the first correct change and then purge all the noise from the history?08:41
Betal left08:43
Traneptora_ joined08:49
Traneptora left08:49
joek joined08:51
mobidrop circle, you can use git interactive rebase to squash consecutive commits into a single change08:54
joek left08:55
circle mobidrop: if I do that locally and then 'git push', the old history will be removed from remote (github)?08:57
yetoo ch: I never told git when I edited the different files but git --reset deleted them but not the created empty file08:58
mobidrop circle, you'll have to use `git push --force` to overwrite the old history with multiple changes08:58
before you do that make sure to use `git diff origin/<branch-name>` to make sure you changed the commits, not the content08:59
circle Thank you that is helpful. Is there a way to say, "forget all commits after commit X" ?09:01
ccapndave left09:01
EvgenyK left09:02
EvgenyK joined09:03
ccapndave joined09:06
nyah joined09:10
m5zs7k left09:10
circle does reset accomplish that? or reset followed by interactive rebase ?09:11
Rashad joined09:11
ikke A reset --hard would do that for the branch you are on09:12
mobidrop reset would work too, but a soft reset and then commit after09:12
m5zs7k joined09:12
ccapndave left09:16
nate2 joined09:16
jorgenpt left09:17
hans_ left09:19
ccapndave joined09:19
Lord_of_Life_ joined09:20
Lord_of_Life left09:20
jorgenpt joined09:20
jorgenpt left09:20
jorgenpt joined09:20
jklfds_ left09:21
ikke That would be a revert09:21
nate2 left09:21
Lord_of_Life_Lord_of_Life09:22
ccapndave left09:24
vladoski joined09:25
prime left09:26
EvgenyK left09:26
englishm left09:28
englishm joined09:28
prime joined09:29
OnkelTem left09:29
JeffH left09:31
cafkafk left09:38
ch yetoo: if you edit a file that is already tracked by git, obviously its already tracked by git and changes are reset09:39
yetoo ch: how is it tracked by git in the first place09:40
ch with `git add`09:41
OnkelTem joined09:43
TomyWork joined09:43
circle left09:50
yetoo ch: I swear I didn't add them but now I do I test git repo and it looks like I did at some point so never mind09:56
thanks09:56
OnkelTem left09:56
EvgenyK joined09:56
ashnur joined09:56
cafkafk joined09:57
Argorok left10:03
feriman joined10:04
Rashad left10:05
feriman left10:06
Traneptora_ left10:08
Traneptora joined10:08
joek joined10:09
OnkelTem joined10:11
joek left10:13
EvgenyK left10:13
EvgenyK joined10:14
rustyshackleford left10:18
Vaelatern left10:37
Vaelatern joined10:37
Vaelatern left10:37
Vaelatern joined10:37
Ingvix left10:44
OnkelTem left10:46
DreamweaverN joined10:48
Ingvix joined10:51
paperino42[m] Hello, given a repo that looks like a tree (no cross-merges for example), how can I detect from where a feature branch has been branched from a given set of branches?10:52
I have created a dummy repo with10:52
git init;git ci --allow-empty -m m-1;git ci --allow-empty -m m-2;git ci --allow-empty -m m-3;git ci --allow-empty -m m-4;git ci --allow-empty -m m-5;git ci --allow-empty -m m-6;git ci --allow-empty -m m-7;git sw -d HEAD~4;git sw -c b2;git ci --allow-empty -m b2-1;git ci --allow-empty -m b2-2;git ci --allow-empty -m b2-3;git sw -d HEAD~2;git sw -c feat;git ci --allow-empty -m f-1;git ci --allow-empty -m f-2;git ci --allow-empty -m f-3;git sw10:52
-d HEAD~5;git sw -c b1;git ci --allow-empty -m b1-1;git ci --allow-empty -m b1-2;git ci --allow-empty -m b1-3;10:52
(ci shorthand for commit)10:52
and now I would like to find out the "nearest" branch between master b1 and b2 (the desired answer is b2)10:52
I can query manually the ancestors10:53
mrb1=$(git merge-base feat b1);mrb2=$(git merge-base feat b2);mrmaster=$(git merge-base feat master)10:53
This gives me a set of commits that have a defined order, but how can I find the child between them?10:53
ikke paperino42[m]: to make it easier to follow, can you provide !situation?10:53
gitinfo paperino42[m]: 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)10:53
flower_ joined10:53
OnkelTem joined10:55
paperino42[m] https://upaste.de/gYG10:58
The situation is I would like to know where a branch originated from (from a given set of branches), in order to use some cache mechanisms (for example ccache)10:59
if my branch comes from b1, the ccache should use the folder ccache_b1, if the branch originates from b2, then ccache should use ccache_b210:59
As the branches have big differences, using the same cache folder is not as productive as it could be11:00
think about pipelines like in github/gitlab with merge requests11:00
vishal left11:05
OnkelTem left11:09
weedmic paperino42[m]: did you try anything like this - to help you figure it out "git log --graph --decorate --all --pretty=oneline"11:09
OnkelTem joined11:09
bket left11:10
Furai left11:10
weedmic your paste seems to be pretty good, what is the question again?11:10
offby1_ joined11:11
vishal joined11:11
roadie` joined11:11
roadie left11:12
strudl- joined11:12
bket joined11:12
makara1 left11:12
makara left11:12
makara_ joined11:12
makara joined11:13
strudl left11:13
paperino42[m] Graphically it is easy, or should I give to this command the output of merge-base?11:14
enimaloc98 joined11:14
enimaloc9 left11:15
enimaloc98enimaloc911:15
OnkelTem left11:16
gryffus left11:17
feriman joined11:17
OnkelTem joined11:18
Rashad joined11:20
Furai joined11:22
weko left11:31
xFFC left11:31
Koeniz joined11:31
axsuul left11:33
axsuul joined11:34
paperino42[m] with or without parameters the output seems the same, so it does not seem to help me, is the graphical representation in https://upaste.de/gYG wrong?11:38
weedmic how can it be wrong? i do not understand the meaning in this context. to me they are the same.11:40
mweckbecker left11:40
jfsimon1981 joined11:41
ceoltb^ left11:42
ceoltb^ joined11:43
jklfds joined11:45
shailangsa joined11:48
jklfds left11:49
EvgenyK left11:50
jklfds joined11:52
mncheck-m left11:53
bambanxx joined11:54
EvgenyK joined11:55
weko joined11:56
Shinzon left11:59
aspirin joined12:01
Shinzon joined12:01
randm left12:02
randm joined12:03
c0dehu1k joined12:03
countach202020 joined12:06
paperino42[m] git rev-list --topo-order <shd-id> | tail -1 seems to give me which of the commits is the last one (topologically)12:06
weedmic: I mean wrong as in I've provided the commands to create a test repo, and if the graphical representation does not match12:06
konsolebox joined12:06
paperino42[m] as you suggested to use git log --graph12:06
imme-emosol left12:07
imme-emosol joined12:07
corelax joined12:09
mweckbecker joined12:12
germ left12:12
germ joined12:14
osse merge-base can output all merge-bases if there is more than one with --all. and merge-base --is-ancestor can be used to determine if one commit is an ancestor of another12:18
OnkelTem left12:19
paperino42[m] ok, I've summarized it in https://upaste.de/raw/iM3 is it more clear? There is also the handcrafted solution, I think there should be a better way...12:19
gtkgtkgtk left12:19
osse The upaste link doesn't work12:19
Ah, that one does12:19
EvgenyK left12:19
paperino42[m] osse: --is-ancestor did not help me mutcht/got too complicated12:19
OnkelTem joined12:21
osse Can we assume that feat is ahead of master?12:23
EvgenyK joined12:25
Xaldafax joined12:25
osse I'm gonna assume yes. In that case the answer is that the merge-base of feat and bX must be in the range master..feat. That is only true for b212:25
gtkgtkgtk joined12:26
SilentGhost left12:26
osse g rev-list master..feat | grep "$(g merge-base feat bX)"12:27
SilentGhost joined12:28
paperino42[m] osse: actually no, because someone else might have updated master, and in my example feat is not ahead of master12:34
nvmd left12:35
paperino42[m] (I assume ahead means that topologically comes after)12:35
YuGiOhJCJ left12:37
paperino42[m] but your command gives me the same answer of git rev-list --topo-order --max-count=1 $mrb1 $mrb2 $mrmaster for git rev-list master..feat | grep "$(git merge-base feat b2)" (empty for all others), so I might have not understood your statement12:37
rom1v left12:38
rom1v joined12:38
EvgenyK left12:38
osse paperino42[m]: Technically true, it is not strictly ahead.12:39
Traneptora left12:39
gryffus joined12:40
osse But there are a bunch of commits on feat not on master, while there are only a few on master that are not on feat. And the assumption is that b2 was based on one of those.12:40
But with my solution you can just flip master..feat into feat..master and it will work for the opposite case12:41
EvgenyK joined12:44
paperino42[m] yes... I'm thinking about it... and try to see if it breaks in some cases...12:45
as the branches I'm interested in (b1, b2, ...) are made from master, it should not be an issue12:46
bloody joined12:47
paperino42[m] as in I'll always have only one match12:47
vlado_ joined12:47
paperino42[m] While the solution described by me, as long as there is a tree structure, should work even if the interesting branches are not necessarily created from master (which is not something I'm currently interested in)12:49
vladoski left12:50
EvgenyK left12:52
EvgenyK joined12:53
gnomesort joined12:55
gnomesort_ left12:55
joek joined12:58
joek left13:00
ThorMojito joined13:06
m4r35n357 joined13:06
duxsco joined13:07
duxsco left13:07
Xenguy left13:15
iffraff left13:17
feriman left13:17
nate2 joined13:18
nate2 left13:23
Lord_of_Life left13:23
Lord_of_Life joined13:23
weko left13:24
weko joined13:24
rfuentess left13:26
tharkun left13:26
tharkun joined13:27
warthog9 left13:29
warthog9 joined13:31
OolonColluphid joined13:31
astlep55047443 joined13:32
astlep5504744 left13:32
han-solo left13:32
OolonColluphid2 left13:33
ElGatoPanzon left13:38
totemizer joined13:41
cbreak left13:41
ElGatoPanzon joined13:41
enimaloc95 joined13:43
ashnur left13:43
totemizerashnur13:43
cbreak joined13:44
enimaloc9 left13:44
enimaloc95enimaloc913:44
g2anj left13:44
g2anj joined13:47
rfuentess joined13:47
hoochmonger joined13:49
vysn left13:50
vlado_ left13:51
samiamsam joined13:51
acetakwas left13:52
acetakwas joined13:52
f__ joined13:52
skapata joined13:53
f_ left13:53
zulutango left13:54
han-solo joined13:54
feriman joined13:56
SuperLag left13:58
SuperLag joined13:59
SuperLag left13:59
SuperLag joined13:59
inovas joined14:00
vladoski joined14:00
haritz left14:00
inovas_ left14:00
haritz joined14:00
haritz left14:00
haritz joined14:00
andreas303 left14:05
andreas303 joined14:05
subopt joined14:07
thiago joined14:08
vladoski left14:15
Rashad left14:16
YoungFrog left14:16
YoungFrog joined14:17
vladoski joined14:17
vladoski left14:18
geirha left14:18
jklfds left14:19
tirnanog joined14:28
rsx joined14:28
Nei left14:32
Andrew joined14:34
GoldLeader87 joined14:35
AndrewYu left14:35
thiago left14:36
drbeco left14:37
tofohty3 joined14:38
crb_ left14:38
tofohty left14:39
tofohty3tofohty14:39
Nei joined14:40
rom1v left14:42
rom1v joined14:43
theoceaniscool left14:44
iffraff joined14:47
f__f_14:50
Millicent left14:51
Millicent joined14:52
axsuul left14:56
axsuul_ joined14:56
Traneptora joined15:04
EdFletcher left15:10
GoldLeader87 left15:12
ferdna joined15:14
bambanxx left15:15
jklfds joined15:15
thiago joined15:15
ThorMojito left15:17
_sa0sin_ joined15:18
nate2 joined15:19
humanface joined15:21
astlep550474433 joined15:21
astlep55047443 left15:21
sa0 left15:21
Gary_Sinise joined15:21
gh34 joined15:21
Millicent left15:22
nate2 left15:24
jklfds left15:26
Nexilva[m] Hi. I just was notified that a directory is untracked, but it was always being tracked. How can a directory magically become untracked?15:27
selckin directories are never tracked only files15:27
hamburgler2 joined15:28
szkl joined15:28
ikke and things don't magically become untracked, someone needs to explicitly tell git to stop tracking things15:28
Nexilva[m] Ok, then I never did. I'm extremely surprised why this happened.15:28
This directory was always tracked for months. Today I am told it isn't tracked.15:29
selckin told how15:29
Nexilva[m] git status says this entire directory is untracked.15:29
mobidrop left15:29
Nexilva[m] However, in git history, in repo, I can see that directory going back ages/months15:29
So how did it magically become untracked, I'm so confused.15:29
I can literally see it on the repo/gitlab and it's there going back at least 1-2 years15:30
hamburgler left15:30
Nexilva[m] However, git status tells me it's untracked. I've no idea how or why15:30
ikke Nexilva[m]: then check where it stopped being tracked15:30
Nexilva[m] I would have to explicitly remove it and that I did not do.15:30
How can I check?15:30
ikke git log --all --full-history --diff-filter=R -- path/to/dir/file15:31
sorry, --diff-filter=D15:31
Nexilva[m] Np15:31
I already added it via git add and commit it but didn't push it.15:32
I need to undo this commit so I can run your command.15:32
ikke should not matter15:32
Nexilva[m] How can I undo this last commit which hasn't been pushed.15:32
Oh ok15:32
jklfds joined15:32
selckin git reset HEAD^15:33
Nexilva[m] I don't see anything useful in the git log15:34
ikke Do you get any commits?15:34
ferdna left15:34
ikke because those commits would have removed that file15:34
Nexilva[m] I get a list of commits going back 2 yeasr15:35
D == deleted filter I assume.15:35
ikke yes15:35
add --name-status to see what files were modified15:35
ThorMojito joined15:36
Nexilva[m] Even if it says they are untracked in my git console, the files are still there in the latest branch/commit on gitlab.15:36
ikke So it has been removed in one of the commits you didn't push yet15:36
Nexilva[m] I'm not sure. It doesn't seem removed anywhere, files are there, last commit shows files have been there for 2 years and never removed15:37
https://gitlab.com/hashborgir/ironman15:37
here is the repository15:37
https://gitlab.com/hashborgir/ironman/-/tree/testing-skills-cleanup15:37
Lastest branch15:37
hoochmonger left15:37
Nexilva[m] https://gitlab.com/hashborgir/ironman/-/tree/testing-skills-cleanup/data/global/items <- it shows all the files are there15:37
If you wish, you can clone the repo and see things if that helps15:38
ikke It does not matter what's on gitlab15:38
It's in your local repository15:38
selckin you need to show git status and git log then15:38
Nexilva[m] Why is my local says this is untracked? I still haven't understood that.15:38
Ok hang on15:38
ikke git rm --cached -r <directory>'; git commit -m "oops"15:39
gas51627 joined15:39
rfuentess left15:40
jklfds left15:41
Nexilva[m] Not sure how, git status is too large to patse in to a site15:41
selckin then you have bigger problems heh15:42
Nexilva[m] Heh15:43
Well, the git log command, outputted some commits. I checked the repo at those commits and the items folder exists there.15:44
ikke git log --name-status15:44
Nexilva[m] It doesn't seem to be deleted/removed in any of the commits.15:44
pac1 joined15:45
Nexilva[m] I am very confused.15:46
From your command, e53f208137da63879775b06056e8bc76e67c9bc4 this is the commit that shows the files15:47
Files have been in repo since then.15:47
Why did my local side turn into this?15:48
selckin you keep thinking we can see your screen15:48
to only way the "directory" bcomes untracked if every file in it was removed from the repo, hence the log commands to look for that15:48
Nexilva[m] I see15:49
selckin if status is too big to paste then its too big to read15:49
so wtf did you do that cause that15:49
inovas left15:49
Nexilva[m] Well it's big because that directory contains thousands o files.15:49
That directory is magically untracked somehow. Not sure why15:49
git status says all those thousand of files are untracked15:50
Hence the large size of paste.15:50
selckin if the directory is untracked it won't show the content15:50
mweckbecker left15:50
inovas joined15:50
selckin so you lied15:50
so some files in it are tracked15:50
Nexilva[m] Correct, not all files15:51
Some files in there are tracked15:51
mweckbecker joined15:52
selckin so now we can't believe anything you said, caue how can that mean directory is untracked15:53
jklfds joined15:53
sam113102 joined15:54
ikke Nexilva[m]: what does git ls-tree -r HEAD path/to/dir return?15:54
sam113101 left15:55
sam113102sam11310115:55
Nexilva[m] so now we can't believe anything you said, caue how can that mean directory is untracked <- do you instantly assume people for some reason are lying to you?15:55
sengygahidore15:55
Nexilva[m] Many times, people just don't know enough to know how to use something to the fullest and that's why they come here for support15:55
They don't come here to feed you incorrect information and waste both our times.15:55
gahidoresangy15:56
selckin well if you're gonna restate "magically diaspeared" every 5 seconds like an ass i'm gonna reply in kind15:56
Nexilva[m] Perhaps realize that, and help us to get you the right information so we can troubleshoot something.15:56
Why would you say that you can't believe anything I said? What does this accomplish other than just rub people the wrong way?15:56
Someone is already frustrated with an issue and you think it is appropriate to add insult to injury?15:56
selckin why do you talk the way you do?15:56
how is that helpful15:56
Nexilva[m] \o/15:56
Look if you think I'm lying to you, you don't have to talk to me.15:57
It's that simple.15:57
selckin missed the point15:57
gnomesort_ joined15:57
Nexilva[m] I'm autistic, severely, as you can probably already tell. I'm just trying to solve a problem. I don't need people yelling at me and telilng me I'm lying.15:58
I also don't speak English as a first language.15:58
gnomesort left15:58
Nexilva[m] I cann't handle this well and I get mentally shut down. Please stop the conflict.15:58
One of the reasons I rarely come to IRC to ask for help is because of this reason. I actually do need help and you're causing me a lot of mental grief with your unncessary comments.15:59
jklfds left15:59
Nexilva[m] I may not be able to understand many things, but that doesn't mean I'm lying to you and you can't believe what I say.15:59
ikke Nexilva[m]: We're trying to help you find the reason, but we do not get the information that we ask for, only vague descriptions of what you see16:00
tirnanog 0x0.st supports pastes up to 512 MiB, by the way. I would hope that is enough.16:00
zmt00 joined16:00
Nexilva[m] The sign of a good supporter is that they realize the difficulty others are having instead of yelling at them for not being able to do something in the first place. Your one comment about that has caused me this level of mental anguish. I felt like I had to tell you so you wouldn't do it anymore. We're all here to help one another.16:00
Ok thanks, I can try that site16:01
tirnanog git ... | curl -F'file=@-' https://0x0.st16:01
Nexilva[m] ikke: I understand. I'm just not sure how to use git in any advanced way, and my ignorance is getting the best of me16:01
ikke Nexilva[m]: imagine you are driving and we need to nagivate you. You need to be very precise in the information you give us for us to be able to help16:01
tirnanog or, better, so that people know the command you ran:16:01
( set -v; git ... ) | curl ...16:01
zmt01 left16:02
Nexilva[m] Sigh.16:02
I'm in the verge of crying rightnow.16:02
ikke We do not necesarily need to know each file that is untracked16:02
Nexilva[m] A grown 42 year old man about to break down crying16:02
Sigh.16:02
ikke but I gave several commands that you can execute16:02
Nexilva[m] Yes, that's all fine. Why did that man yell at me and say you can't believe what I say?16:03
ikke Nexilva[m]: we help lots of people here with various levels of skills16:03
Nexilva[m] Why can't you believe what I say?16:03
I am so confused right now16:03
I have no idea why this is happening.16:03
ikke Nexilva[m]: See it from our point, it can sometimes be frustrating if you try to help but don't get the information. That does not warant any yelling though16:03
Nexilva[m] I understand. Thanks for saying that. I felt like I am being told I can't be helped because no matter what I say you won't believe me16:04
osse Some people just assume the worst.16:04
Nexilva[m] I understand.16:04
jkl left16:04
ikke Nexilva[m]: There are people who barely know git, but we can help them with pretty advanced problems, because they give us precisely the information we ask for, even if they do not understand what is being returned16:04
bywaterloo joined16:05
Nexilva[m] Now I don't know where I was or what I was doing.16:05
Sigh.16:05
osse Also sometimes "lying" is used to describe when people unintentionally say something false. It's not helpful or precise.16:05
ikke Nexilva[m]: also, keep in mind it's probably impossible for us to tell why exactly those files are shown to be untracked16:06
Nexilva[m] I can't handle conflict well with other people. Even a bit of it and it makes me shut down and I can't function. I feel the same thing has happened just now.16:06
tirnanog what was the command to be issued, anyway?16:06
jlc left16:06
Nexilva[m] I'm sorry, I need a few minutes. I am very upset.16:06
ikke Nexilva[m]: does it help to take a small break and try again later?16:06
LDericher joined16:06
jlc joined16:06
Nexilva[m] That's what I'm doing. Go away for a bit and then try again later.16:06
LDericher_ left16:06
jklfds joined16:08
ikke Nexilva[m]: for when you are back, you could push your local branch to a temporary branch on gitlab so that we can look at that (assuming you have commits that you haven't pushed yet)16:08
Nexilva[m] On Matrix when you block someone, their entire chat history goes away, unlike IRC. That's very nice feature!16:09
Ok. I was thinking to do that. Push all changes to a new temp branch.16:09
rudi_s joined16:10
themill_ left16:10
Nexilva[m] I will be back later when my mind is at rest. Thanks for your help and support.16:10
___nick___ joined16:10
themill joined16:10
___nick___ left16:12
daru left16:12
causa_sui left16:12
daru joined16:12
___nick___ joined16:14
___nick___ left16:14
___nick___ joined16:16
sfenik left16:16
sfenik1 joined16:16
f451 left16:19
ThorMojito left16:21
f451 joined16:21
konsolebox left16:22
Nexilva[m] I took a walk, and back now. I have more to say16:24
I use VMs for dev and I regularly take snapshots of the VMs16:24
I took a snapshot of this VM a couple of days ago. I just fired up that VM snapshot and did git status, and there, it's fine. It doesn't tell me that anything is untracked.16:25
Something must have happened since that VM snapshot. I also saved the current state.16:25
jiffe left16:26
Nexilva[m] What I am thinking now is, commit all my latest changes to each file, properly one by one, as I always do, once done committing, push up to temp branch. Then go back to the previous VM snapshot. And then pull the changes there and see what's up.16:26
ikke fine with me16:26
Nexilva[m] I absolutely never told git to untrack any files in that directory, so it seems like it won't even be in the logs as I couldn't find anything16:26
Perhaps the snapshot somehow became corrupted? Power did go out a few days ago and my entire system shut down as I don't have battery backup.16:27
ikke There must be one commit where the files are tracked, and a following commit where they are no longer there16:27
jiffe joined16:28
Nexilva[m] I can't find that in the commit history. I went through all commits and I see those files everywhere int he repo, up to the last commit a few days ago.16:28
m4r35n357 left16:28
Nexilva[m] I don't want to bother you guys with needless troubleshooting if it is not necessary to do16:28
ikke Just to be sure, how do you confirm whether the commit has those files?16:29
Nexilva[m] So I will try what I said earlier. See what's up16:29
agd85 left16:29
ThorMojito joined16:29
Nexilva[m] I go look at them in each commit in gitlab manually16:30
ThorMojito1 joined16:30
ikke several things would need the same kind of corruption for it to be in that state16:30
Nexilva[m] Files are never gone. They are always there until the latest commit16:30
ikke for files to show up as untracked, they need to be both missing in the index as in the commit pointed to by HEAD16:30
dskull left16:30
so-offish joined16:30
dskull joined16:31
ThorMojito1 left16:31
ikke if they are just missing in the index, they would show up as 'staged for removal'16:31
if they are only missing in a commit, they would show as staged for commit16:31
ThorMojito left16:34
ChmEarl joined16:35
g2anj left16:35
g2anj joined16:38
EdFletcher joined16:38
Yorick- left16:39
Yorick_ joined16:39
gryffus_ joined16:40
gryffus left16:40
vdamewood joined16:42
stenno left16:43
agd85 joined16:44
roadie` left16:45
roadie joined16:46
so-offishul joined16:49
Avaflow left16:51
so-offish left16:51
dostoyevsky2 left16:52
vdamewood left16:52
EvgenyK left16:53
dostoyevsky2 joined16:53
astlep5504744330 joined16:55
astlep550474433 left16:55
axsuul_ left16:58
axsuul joined16:58
subopt left16:59
Milos left17:01
Milos joined17:01
Nexilva[m] I see17:09
[mct] left17:09
Nexilva[m] I commited all my changes. Then I went back to the VM snapshot from a few days ago. I did git pull, and I get this: https://bpa.st/PGRHU17:09
I guess I have to specify origin and branch17:11
I did that, and now it pulled in the latest commits/changes17:11
Now when I do git status, those thousands of files are fine, they do not show up as untracked anymore.17:12
So, I am assuming something must have corrupted since that snapshot17:12
Now I have a bug to resolve, and I have to learn to use git bisect or manually bisect myself like a binary search. Try to find out where the bug happened.17:13
So I am reading this: https://git-scm.com/docs/git-bisect17:14
leon left17:14
Nexilva[m] For this I need to find the last good commit, I think, so I would have to look manually until I find a good commit where the bug isn't happening. That plus latest commit and then run bisect I guess?17:15
EvgenyK joined17:15
ikke yes17:15
Nexilva[m] Thanks17:15
jkl joined17:16
rsx left17:17
leon joined17:18
roadie left17:18
gsi_ or pick any commit that you are confident about (be generous, err on the safe side), because binary search still is quite efficient over larger ranges17:24
like start from the most recent release if you know that the issue was not in there yet17:24
masber joined17:25
[mct] joined17:25
gsi_ even if that'd be 10k commits, this still is "just" 14 iterations to narrow down17:25
probably quicker done than manually searching for a "good start value"17:26
f_ left17:31
bret left17:33
lembron joined17:33
cafkafk left17:34
lembron hu, can i get git to ignore a ".git" folder in one of its subfolders? -- so, technically i want to "double-commit" you could say - but realistically i just want to git smth where the author keeps a .git in the download (or so..)17:34
so, explicitly NOT a subrepo or anything of that sort17:35
celphi left17:36
celphi joined17:36
lembron imagine an alias git="mv /repo/some/other/.git /bak/.git && git $* && mv /bak/.git /repo/some/other/.git" but in functional17:37
cafkafk joined17:37
bywaterloo left17:46
Gary_Sinise left17:47
Nexilva[m] Thanks guys17:47
Gary_Sinise joined17:47
Nexilva[m] I have an issue with a diff project. I have committed two commits to a branch and I need to remove those two commits from the remote, but not local.17:47
Koeniz left17:48
ikke last 2 commits?17:48
magic_ninja left17:50
Nexilva[m] I was on VM 1. I developed, and locally committed half a dozen commits, but did not push to remote. Then I was in VM 2, and I pushed some latest changes, but somehow I only pushed two commits today which are fine, but none of those last week's commits show up in remote as I didn't commit them. When I try to push those to the remote, I get merge conflict.17:53
I'm sure I'm not even asking correctly or relaying my problem correctly.17:54
In one VM, I have say 10 commits that need to be pushed to remote. Those commits are from last week. Today from a different VM, I pushed two commits to remote, which are from today. When I got to last week's VM, and try to push all those changes/commits, I get merge conflict.17:55
It makes sense why it does that, but I'm trying to figure out how to delete those two commits, then I'll be able to push last weeks dozen commits, then I can go tot he latest VM and push the two changes again so they're the latest.17:56
I'm not sure if I'm making sense.17:56
ThiefMaster left17:56
ikke Yes, I'm following you, though, the merge conflicts would happen when you pull, not push17:56
Nexilva[m] Right now I get a conflict because these two commits got pushed up out of order when they shouldn't have.17:56
ThiefMaster joined17:56
ikke You probably get a message that the push is rejected when you try to push17:56
nsaunders joined17:57
Nexilva[m] Yes, I try to pull the latest two commits I pushed on the VM with the dozen commits to push, and I get the merge conflict17:57
That too, push is also rejected.17:57
so I'm thinking, if I take out these two commits, I should be able to push last weeks dozen commits up, then go to the new VM and push these two up, and that should work fine17:58
Let me show some visuals17:58
ikke No, you'd run in the same issue17:58
You need to merge or rebase them locally, and resolve any conflicts17:58
there is no way around it17:58
Nexilva[m] https://i.imgur.com/SWSxwvP.png This is what shows up on remote17:59
https://i.imgur.com/FSNawvy.png here's what I have locally17:59
Remote shows 17th, then 25th of this month. Local has many commits between those two dates which I can't seem to push up18:00
ikke You need to check what those conflicts are and solve them (possibly using a merge tool)18:00
JeffH joined18:00
ikke Do you know what a merge conflict is and why it happens?18:01
vysn joined18:01
Nexilva[m] Yes. I looked at the code and the conflicts are because of the file was changed later. I'm actually wanting to discard the latest changes to that file18:02
Which is why I don't want to manually resolve the conflict. I am with with going back to the previous version without the edits.18:02
I am ok with*18:02
ikke You can do that while solving the conflicts when merging18:03
You can't do that by reseting the remote branch, pushing from the other machine and then trying to push from the first machine18:04
Nexilva[m] I actually don't want to merge. I just want the latest copy of the file18:04
I think.18:04
ikke Nexilva[m]: there is a difference between merging history and merging files18:04
Nexilva[m] I see.18:04
ikke But if you want to completely discard the 2 commits, then that's possible18:04
but if you want to keep the changes, you need to merge it somehow18:04
Nexilva[m] The reason why I can't push/pull and have conflict is because this file was edited and pushed, and it shouldn't have been pushed.18:05
How can I remove the last two commits on remote only18:05
I have their commit hashes18:06
ikke Nexilva[m]: if you want to push those 10 commits instead, it's easier to do that immediately18:06
Nexilva[m] 8463d70d6c8318f61cc809c678553a9901094c45 and 6f5b779114108b44ef6098b7b77a2771338e7468 are the two commits I'd like to remove from remote.18:06
ikke But just for the sake of answering your question:18:06
Nexilva[m] I won't do it, but just to know18:07
ikke git push --force origin HEAD~2:refs/heads/<branch-name>18:07
Nexilva[m] I will listen to your full advice before I try to attempt anything18:07
I see.18:07
Ok, so if I wanted to retain those two commits, yet push these rest of the last week's commits up, how might I do that?18:07
ikke On the other machine with the 10 commits, you can directly do: git push --force origin <branchname>18:07
causasui joined18:07
FinnElija left18:09
Nexilva[m] I did not remove the two commits18:10
Instead I force pushed as you suggested.18:10
JeffH left18:10
EvgenyK_ joined18:10
Nexilva[m] https://i.imgur.com/I86hP1a.png Here's what that did to the 25th of this month compared to the pervious screenshot18:11
Essentially now the two erroneous commits no longer show up.18:11
FinnElija joined18:11
Nexilva[m] I apologize18:12
JeffH joined18:12
Nexilva[m] https://i.imgur.com/SWSxwvP.png Here is the previous screnshot, which has today's two commits on the 28th18:12
zumba_addict joined18:13
Nexilva[m] After I force pushed, the new screenshot https://i.imgur.com/I86hP1a.png here no longer shows those two commits from today on 28th18:13
Is this okay18:13
EvgenyK left18:13
Nexilva[m] I have the code for those two commits in a different machine18:13
If I should commit those now, they should show up on top of this on 28th18:13
ikke something like !situation would be a lot more clear to me18:17
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)18:17
Nexilva[m] So, when I force pushed, what happened to the two commits from today on remote? They disappeared from reote.18:19
remote*18:19
ikke they were discarded (from the perspective of the branch you pushed it to)18:20
Nexilva[m] Oh darn. I think I might have lost them. But they were testing changes, which didn't work anyway, so I'd have to recode it and see if that works. Nothing important lost I think.18:20
ikke The other repo should still have them18:20
git show 8463d70d6c8318:21
git show 6f5b77911418:21
clime joined18:23
ikke Nexilva[m]: note that in git, commits are not immediately removed, even if they are no longer reachable18:24
coot left18:24
GingerGeek left18:24
GingerGeek joined18:25
nsaunders left18:25
Nexilva[m] Those commits don't show up anywhere, but I have the code/files. Peculiar18:27
arescorpio joined18:28
han-solo left18:28
Inline joined18:29
Nexilva[m] The commits are actually gone from everywhere, but like I said, since those two were the latest, and last week's I didn't push, when I force pushed today, all those changes (the ones in the two commits which got discarded) are actually in the latest commit.18:30
ikke Nexilva[m]: that makes no sense18:30
Nexilva[m] so the code is actually there, from those two commits, but those two actual commits are gone from all history, logs, etc. etc.18:30
\o/18:30
I am reporting my findings. I could be relaying incorrect info18:31
But so far, the code is there from those commits. The files are there from those two commits. When I force pushed, all that was in the latest code anyway, so it got pushed.18:31
Just that those two commit hashes don't show up.18:33
ikke show up where?18:33
Nexilva[m] $ git show 6f5b77911418:33
fatal: ambiguous argument '6f5b779114': unknown revision or path not in the working tree.18:33
ikke did you try that on your other vm, where you pushed those commits from?18:34
Nexilva[m] I tried it on each VM18:34
flower_ left18:35
Nexilva[m] Machine A's force push discarded the two commits from Machine B. Does this mean, that those two commits are now only in the local repository of the machine who committed them?18:36
I fired up that VM and checked. It does not show up. Perhaps because the VM was ephemeral and didn't save state and restored to 2 days ago VM18:36
samiamsam force pushing doesn't remove any commits ever18:37
ikke especially not on other machines that you didn't push to18:37
Nexilva[m] He said that they were essentially discarded18:37
ikke from that remote18:37
and from the perspective of the branch that you push to18:38
Nexilva[m] When I pushed those two commits, I didn't save machine state. I reverted back to old machine state. So those commits are no longer in the VM that pushed them up.18:38
Therefore they are forever gone.18:38
ikke Ok, that would explain18:38
technically they are still on gitlab, but it can be difficult to access them18:38
Nexilva[m] But that is fine. Those two commits were out of order anyway.18:38
I have all the code, all the files, all in remote gitlab, so it's fine.18:39
ikke Nexilva[m]: you can try to go directly to the commit hash on gitlab18:39
Nexilva[m] Let's fine out18:39
* Let's find out18:39
ikke /namespace/project/-/commit/<hash>18:39
Nexilva[m] Hey, there they are18:40
Thanks for all your help18:43
ikke no problem18:43
JeffH left18:45
magic_ninja joined18:48
gareppa left18:49
gryffus_ left18:49
gareppa joined18:50
SomeAB left18:51
SomaAB joined18:51
gareppa left19:00
liefer396 joined19:10
coot joined19:11
rustyshackleford joined19:12
so-offishul left19:14
node1 joined19:18
taupiqueur joined19:18
hans_ joined19:19
kostkon_ joined19:19
ingy left19:20
nate2 joined19:20
Sazhen86 joined19:21
EvgenyK_ left19:21
kostkon left19:22
nate2 left19:25
duxsco joined19:26
kostkon_kostkon19:28
masber left19:36
Gary_Sinise left19:43
dviola left19:56
diego joined19:58
diegoGuest828019:58
so-offish joined20:03
___nick___ left20:03
loulou joined20:07
loulou left20:07
loulou joined20:07
TomyWork left20:08
lemuria left20:11
lemuria joined20:12
ChmEarl left20:13
duxsco left20:14
remedan left20:18
konsolebox joined20:22
robobub left20:25
node1 left20:27
xandris left20:28
feriman left20:28
Sazhen86 left20:31
xandris joined20:31
gareppa joined20:31
gryffus joined20:32
geirha joined20:33
Sazhen86 joined20:35
duxsco joined20:36
remedan joined20:36
xandris left20:38
Sazhen86 left20:40
xandris joined20:41
zumba_addict left20:42
hbautista joined20:43
hbautista left20:45
Inline left20:47
duxsco left20:47
Kaedenn joined20:53
Kaedenn I merged qa into my feature branch by mistake. I want to roll back. How do I roll back that merge?20:53
igemnace if you haven't pushed, git reset --hard @^ would actually be enough if the merge commit was the last commit you did20:54
(if you have pushed, you'd deal with a public rewrite if you went down that route)20:54
jab416171 left20:54
squirrel joined20:58
jab416171 joined21:00
currenthandle joined21:00
loulou left21:02
coot left21:07
squealingcode joined21:07
foul_owl left21:08
thiago left21:10
aspirin left21:13
jab416171 left21:14
cafkafk left21:17
Kaedenn Apparently I had to `git revert -m 1 <the commit>`. That did the trick.21:20
jab416171 joined21:20
jab416171 left21:20
jab416171 joined21:20
cafkafk joined21:22
foul_owl joined21:22
ikke That creates an additional commit that reverts the changes the merge commit did21:22
mven left21:24
mven joined21:25
nickorta12 left21:25
Kaedenn Which is fine, this is a feature branch21:25
clime left21:26
Kaedenn I'm not too fond of actually changing commit history21:26
nickorta12 joined21:26
gh34 left21:26
Kaedenn especially not for code for my employer.21:26
Can I simulate a merge without doing it, to see what a merge would change if I were to do it?21:27
jab416171 left21:28
tchan left21:28
tchan joined21:28
gareppa left21:30
PocketKiller left21:31
PocketKiller joined21:32
jab416171 joined21:33
countach202020 left21:35
PocketKiller left21:35
PocketKiller joined21:36
Gary_Sinise joined21:36
Gary_Sinise left21:38
drbeco joined21:43
ThorMojito joined21:44
Traneptora left21:46
ThorMojito1 joined21:46
SleePy left21:47
ThorMojito left21:48
SleePy joined21:49
arescorpio left21:50
hans_ left21:56
causa_sui joined21:58
lgc joined22:00
sybariten left22:01
lgc left22:01
taupiqueur left22:03
konsolebox left22:07
igemnace left22:16
thiago joined22:21
causasui left22:23
vysn left22:24
gas51627 left22:26
Traneptora joined22:26
remedan left22:27
remedan joined22:28
humanface left22:28
ThorMojito joined22:32
Xenguy joined22:33
ThorMojito1 left22:35
ThorMojito1 joined22:36
ThorMojito left22:39
ThorMojito1 left22:41
dmenz joined22:47
zulutango joined22:52
jklfds left22:54
thorsten` joined22:55
kostkon left22:58
kostkon joined22:59
ZacSharp joined22:59
kostkon left23:00
kostkon joined23:01
cbreak left23:06
konsolebox joined23:06
cbreak joined23:07
cafkafk left23:10
cafkafk joined23:13
rapmoc joined23:16
gast0n joined23:18
pvxe left23:20
rapmoc left23:21
nate2 joined23:22
pvxe joined23:23
rapmoc joined23:24
liefer396 left23:24
jklfds joined23:25
OnkelTem left23:25
nate2 left23:27
jklfds left23:29
feriman joined23:30
cafkafk left23:31
cafkafk joined23:31
ChmEarl joined23:32
ThorMojito joined23:35
ThorMojito1 joined23:36
kostkon left23:37
kostkon joined23:37
ThorMojito1 left23:37
nsaunders joined23:38
feriman left23:39
ThorMojito left23:40
sunny930 joined23:41
sunny93 left23:42
sunny930sunny9323:42
reprazent left23:43
reprazent joined23:44
kostkon left23:45
Milos left23:46
kostkon joined23:46
Milos joined23:49
kostkon left23:50
kostkon joined23:51
kostkon left23:51
kostkon joined23:52
ikwyl6 joined23:53
enimaloc98 joined23:53
enimaloc9 left23:54
enimaloc98enimaloc923:54
Millicent joined23:57
Traneptora_ joined23:57
JeffH joined23:58
Traneptora left23:58
BrianBlaze left23:59

Logs Search ←Prev date Next date→ Channels Documentation