| 2023-06-28 |
| → adanwan joined | 00:00 |
| ← jklfds_ left | 00:01 |
| ← nyah left | 00:03 |
| ← dvanloon3 left | 00:04 |
| → EvgenyK joined | 00:07 |
| → dvanloon3 joined | 00:07 |
| ← so-offish left | 00:07 |
| → gsi_ joined | 00:08 |
| ← dvanloon3 left | 00:10 |
| → dvanloon3 joined | 00:12 |
| ← gsi left | 00:12 |
| ← EvgenyK left | 00:13 |
| → ThorMojito joined | 00:20 |
| ← osse left | 00:23 |
| ← dostoyevsky2 left | 00:25 |
| → dostoyevsky2 joined | 00:26 |
| → osse joined | 00:26 |
| → Nokurn joined | 00:29 |
| → drbeco joined | 00:29 |
| ← liefer396 left | 00:34 |
| ← Xenguy left | 00:36 |
| ← stewie925 left | 00:36 |
| → EvgenyK joined | 00:43 |
| ← peas left | 00:45 |
| ← Nokurn left | 00:46 |
| → peas joined | 00:47 |
| ← EvgenyK left | 00:48 |
| ← omero left | 00:51 |
| → omero joined | 00:53 |
| → junyx joined | 00:55 |
| ← dvanloon3 left | 00:57 |
| ← bodiccea left | 00:58 |
| → bodiccea joined | 00:58 |
| → EvgenyK joined | 00:58 |
| → dvanloon3 joined | 00:59 |
| ← cousteau_ left | 01:01 |
| ← bodiccea left | 01:02 |
| → bodiccea joined | 01:03 |
| ← EvgenyK left | 01:03 |
| ← ChmEarl left | 01:05 |
| → joek joined | 01:07 |
| ← clime left | 01:10 |
| ← joek left | 01:11 |
| ← ThorMojito left | 01:11 |
| → ThorMojito joined | 01:13 |
| ← bambanxx left | 01:20 |
| → nate2 joined | 01:23 |
| ← ThorMojito left | 01:25 |
| ← Guest83 left | 01:25 |
| ← jacobk left | 01:26 |
| ← nate2 left | 01:27 |
| → ThorMojito joined | 01:29 |
| → EvgenyK joined | 01:29 |
| → jacobk joined | 01:30 |
| ← EvgenyK left | 01:33 |
| ← derpydoo left | 01:36 |
| → EvgenyK joined | 01:36 |
| → Xenguy joined | 01:40 |
| ← EvgenyK left | 01:41 |
| → EvgenyK joined | 01:43 |
| ← causasui left | 01:43 |
| ← EvgenyK left | 01:50 |
| → EvgenyK joined | 01:52 |
| ← EvgenyK left | 01:56 |
| ← dvanloon3 left | 01:57 |
| → dvanloon3 joined | 01:58 |
| → bambanxx joined | 02:10 |
| ← knolle left | 02:12 |
| → dsrt^ joined | 02:15 |
| ← bambanxx left | 02:16 |
| → nate2 joined | 02:17 |
| ← gas51627 left | 02:17 |
| ← FinnElija left | 02:22 |
| → finn_elija joined | 02:22 |
| finn_elija → FinnElija | 02:22 |
| ← hoochmonger left | 02:23 |
| ← ThorMojito left | 02:24 |
| → EvgenyK joined | 02:25 |
| ← jlc left | 02:32 |
| → jlc joined | 02:33 |
| → nsaunders joined | 02:34 |
| ← EvgenyK left | 02:41 |
| → JeffH joined | 02:47 |
| ← bloody left | 02: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 joined | 02:55 |
| ← dvanloon3 left | 02:57 |
| → dvanloon3 joined | 02:58 |
| ← nsaunders left | 02:58 |
| ← EvgenyK left | 02:59 |
| → EvgenyK joined | 03:00 |
| ← lucasta left | 03: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 joined | 03:03 |
| ← EvgenyK left | 03:05 |
| → joek joined | 03:06 |
| ← myme left | 03:06 |
| ← joek left | 03:10 |
| ← dvanloon3 left | 03:12 |
| ← nate2 left | 03:19 |
| → EvgenyK joined | 03:30 |
| → falafel joined | 03:32 |
| ← EvgenyK left | 03:35 |
| → Gary_Sinise joined | 03:35 |
| → PageNotFound joined | 03:39 |
| ← cafkafk left | 03:41 |
| → cafkafk joined | 03:44 |
| ← lucasta left | 03:47 |
| → EvgenyK joined | 03:48 |
| ← tirnanog left | 03:48 |
| ← EvgenyK left | 03:53 |
| ← starfarer left | 04:01 |
| → bywaterloo joined | 04:03 |
| ← warthog9 left | 04:04 |
| ← peas left | 04:05 |
| → hoochmonger joined | 04:07 |
| ← PageNotFound left | 04:10 |
| ← falafel left | 04:18 |
| → EvgenyK joined | 04: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 left | 04:34 |
| ← iokill left | 04:40 |
| → EvgenyK joined | 04:40 |
| ← Gary_Sinise left | 04:43 |
| ← EvgenyK left | 04:44 |
| → Gary_Sinise1 joined | 04:45 |
| → iokill joined | 04:46 |
| Gary_Sinise1 → Gary_Sinise | 04:47 |
| → jmd joined | 04:47 |
| ← Geronimo left | 04:49 |
| ← JeffH left | 04:55 |
| → clime joined | 04:56 |
| → EvgenyK joined | 04:57 |
| → joek joined | 04:59 |
| ← EvgenyK left | 05:01 |
| ← joek left | 05:03 |
| → JeffH joined | 05:04 |
| → coot joined | 05:07 |
| ← hoochmonger left | 05:11 |
| → nate2 joined | 05:15 |
| → c0dehu1k joined | 05:16 |
| ← memset left | 05:16 |
| ← coot left | 05:17 |
| ← nate2 left | 05:20 |
| ← theobjectivedad left | 05:21 |
| → coot joined | 05:21 |
| → theobjectivedad joined | 05:22 |
| → EvgenyK joined | 05:23 |
| → Geronimo joined | 05:24 |
| → falafel joined | 05:24 |
| → memset joined | 05:28 |
| → SomeAB joined | 05:31 |
| ← c0dehu1k left | 05:31 |
| ← cafkafk left | 05:40 |
| ← SuperLag left | 05:40 |
| ← EvgenyK left | 05:41 |
| → Wuzzy joined | 05:42 |
| → SuperLag joined | 05:45 |
| ← SuperLag left | 05:45 |
| → SuperLag joined | 05:45 |
| ← falafel left | 05:45 |
| → carl--- joined | 05:48 |
| → carl-- joined | 05:50 |
| → EvgenyK joined | 05:52 |
| ← carl--- left | 05:53 |
| ← thiago left | 05:55 |
| → carl--- joined | 05:59 |
| → han-solo joined | 06:00 |
| ← carl-- left | 06:02 |
| ← junyx left | 06:07 |
| → weedmic joined | 06:07 |
| ← carl--- left | 06:08 |
| ← clime left | 06:10 |
| ← coot left | 06:11 |
| ← kostkon_ left | 06:14 |
| → kostkon joined | 06:14 |
| → coot joined | 06:25 |
| ← coot left | 06:29 |
| → coot joined | 06:31 |
| → vysn joined | 06:41 |
| → rfuentess joined | 06:45 |
| ← jmd left | 06:47 |
| → hans_ joined | 06:49 |
| → cafkafk joined | 06:52 |
| → joek joined | 06:53 |
| → xFFC joined | 06:54 |
| ← joek left | 06:56 |
| ← memset left | 07:05 |
| ← bywaterloo left | 07:06 |
| → memset joined | 07:07 |
| → stenno joined | 07:10 |
| ← Gary_Sinise left | 07:16 |
| ← EvgenyK left | 07:16 |
| → theoceaniscool joined | 07:20 |
| → nsaunders joined | 07:24 |
| → jklfds_ joined | 07:26 |
| → mobidrop joined | 07:27 |
| → igemnace joined | 07:28 |
| ← samiamsam left | 07:30 |
| → EvgenyK joined | 07:31 |
| → KnoP joined | 07:32 |
| → f_ joined | 07:32 |
| ← igemnace left | 07:35 |
| → igemnace joined | 07:35 |
| ← EvgenyK left | 07:36 |
| ← jfsimon1981 left | 07:40 |
| ← cafkafk left | 07:41 |
| → roadie joined | 07:41 |
| → cafkafk joined | 07:41 |
| → EvgenyK joined | 07:42 |
| ← EvgenyK left | 07:47 |
| ← skapata left | 07:48 |
| → EvgenyK joined | 07:51 |
| → gareppa joined | 07:52 |
| → roadie` joined | 07:54 |
| ← roadie left | 07:55 |
| ← EvgenyK left | 07:56 |
| → warthog9 joined | 07:57 |
| → yetoo joined | 08:03 |
| ← Echoz left | 08:03 |
| → Echoz joined | 08: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 left | 08:06 |
| → Echoz joined | 08:08 |
| → EvgenyK joined | 08:08 |
| ← roadie` left | 08:12 |
| ← EvgenyK left | 08:13 |
|
yetoo
| Additionally why when I git apply a patch it applies to all branches and not the currently seelcted branch | 08:14 |
|
| this is stupid and not documented properly | 08:14 |
|
| git restore . resets all the branches | 08:14 |
|
ch
| uncommitted changes are not attached to a branch | 08:15 |
| ← KnoP left | 08:15 |
| ← nsaunders left | 08:17 |
| ← igemnace left | 08:17 |
| → igemnace joined | 08:18 |
| ← kostkon left | 08:19 |
| ← troyt left | 08:21 |
| → ccapndave joined | 08:21 |
|
yetoo
| ch: and there is no way to get them to attach to a branch? | 08:22 |
|
ch
| commit | 08:23 |
| ← w4 left | 08:25 |
|
yetoo
| ch: in my testing I touched a file. git restore . and git reset --hard is not removing it. Why? | 08:25 |
| → kostkon joined | 08:25 |
| → EvgenyK joined | 08:25 |
|
ch
| a new file git did not yet know about? | 08:25 |
| → knolle joined | 08:27 |
|
yetoo
| ch: I guess | 08:27 |
|
| ch: command was touch a | 08:27 |
|
| I mean I can manually rm it, but annoying that none of the ways thats supposed to remove it dont remove it | 08:28 |
|
ch
| git only cares about "tracked" files. if you never told git about it, it leaves it alone | 08:28 |
|
| https://git-scm.com/docs/git-reset#Documentation/git-reset.txt---hard states this in a careful way | 08:28 |
|
| git clean can delete untracked files | 08:29 |
| → w4 joined | 08:29 |
| ← igemnace left | 08:29 |
| → igemnace joined | 08:30 |
| → troyt joined | 08:32 |
| ← igemnace left | 08:32 |
| → igemnace joined | 08:32 |
| ← igemnace left | 08:33 |
| → igemnace joined | 08:33 |
| → circle joined | 08:37 |
| → roadie joined | 08:38 |
| ← igemnace left | 08:39 |
| → igemnace joined | 08: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 left | 08:43 |
| → Traneptora_ joined | 08:49 |
| ← Traneptora left | 08:49 |
| → joek joined | 08:51 |
|
mobidrop
| circle, you can use git interactive rebase to squash consecutive commits into a single change | 08:54 |
| ← joek left | 08: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 file | 08:58 |
|
mobidrop
| circle, you'll have to use `git push --force` to overwrite the old history with multiple changes | 08:58 |
|
| before you do that make sure to use `git diff origin/<branch-name>` to make sure you changed the commits, not the content | 08:59 |
|
circle
| Thank you that is helpful. Is there a way to say, "forget all commits after commit X" ? | 09:01 |
| ← ccapndave left | 09:01 |
| ← EvgenyK left | 09:02 |
| → EvgenyK joined | 09:03 |
| → ccapndave joined | 09:06 |
| → nyah joined | 09:10 |
| ← m5zs7k left | 09:10 |
|
circle
| does reset accomplish that? or reset followed by interactive rebase ? | 09:11 |
| → Rashad joined | 09:11 |
|
ikke
| A reset --hard would do that for the branch you are on | 09:12 |
|
mobidrop
| reset would work too, but a soft reset and then commit after | 09:12 |
| → m5zs7k joined | 09:12 |
| ← ccapndave left | 09:16 |
| → nate2 joined | 09:16 |
| ← jorgenpt left | 09:17 |
| ← hans_ left | 09:19 |
| → ccapndave joined | 09:19 |
| → Lord_of_Life_ joined | 09:20 |
| ← Lord_of_Life left | 09:20 |
| → jorgenpt joined | 09:20 |
| ← jorgenpt left | 09:20 |
| → jorgenpt joined | 09:20 |
| ← jklfds_ left | 09:21 |
|
ikke
| That would be a revert | 09:21 |
| ← nate2 left | 09:21 |
| Lord_of_Life_ → Lord_of_Life | 09:22 |
| ← ccapndave left | 09:24 |
| → vladoski joined | 09:25 |
| ← prime left | 09:26 |
| ← EvgenyK left | 09:26 |
| ← englishm left | 09:28 |
| → englishm joined | 09:28 |
| → prime joined | 09:29 |
| ← OnkelTem left | 09:29 |
| ← JeffH left | 09:31 |
| ← cafkafk left | 09:38 |
|
ch
| yetoo: if you edit a file that is already tracked by git, obviously its already tracked by git and changes are reset | 09:39 |
|
yetoo
| ch: how is it tracked by git in the first place | 09:40 |
|
ch
| with `git add` | 09:41 |
| → OnkelTem joined | 09:43 |
| → TomyWork joined | 09:43 |
| ← circle left | 09: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 mind | 09:56 |
|
| thanks | 09:56 |
| ← OnkelTem left | 09:56 |
| → EvgenyK joined | 09:56 |
| → ashnur joined | 09:56 |
| → cafkafk joined | 09:57 |
| ← Argorok left | 10:03 |
| → feriman joined | 10:04 |
| ← Rashad left | 10:05 |
| ← feriman left | 10:06 |
| ← Traneptora_ left | 10:08 |
| → Traneptora joined | 10:08 |
| → joek joined | 10:09 |
| → OnkelTem joined | 10:11 |
| ← joek left | 10:13 |
| ← EvgenyK left | 10:13 |
| → EvgenyK joined | 10:14 |
| ← rustyshackleford left | 10:18 |
| ← Vaelatern left | 10:37 |
| → Vaelatern joined | 10:37 |
| ← Vaelatern left | 10:37 |
| → Vaelatern joined | 10:37 |
| ← Ingvix left | 10:44 |
| ← OnkelTem left | 10:46 |
| → DreamweaverN joined | 10:48 |
| → Ingvix joined | 10: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 with | 10: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 sw | 10: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 ancestors | 10: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_ joined | 10:53 |
| → OnkelTem joined | 10:55 |
|
paperino42[m]
| https://upaste.de/gYG | 10: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_b2 | 10:59 |
|
| As the branches have big differences, using the same cache folder is not as productive as it could be | 11:00 |
|
| think about pipelines like in github/gitlab with merge requests | 11:00 |
| ← vishal left | 11:05 |
| ← OnkelTem left | 11: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 joined | 11:09 |
| ← bket left | 11:10 |
| ← Furai left | 11:10 |
|
weedmic
| your paste seems to be pretty good, what is the question again? | 11:10 |
| → offby1_ joined | 11:11 |
| → vishal joined | 11:11 |
| → roadie` joined | 11:11 |
| ← roadie left | 11:12 |
| → strudl- joined | 11:12 |
| → bket joined | 11:12 |
| ← makara1 left | 11:12 |
| ← makara left | 11:12 |
| → makara_ joined | 11:12 |
| → makara joined | 11:13 |
| ← strudl left | 11:13 |
|
paperino42[m]
| Graphically it is easy, or should I give to this command the output of merge-base? | 11:14 |
| → enimaloc98 joined | 11:14 |
| ← enimaloc9 left | 11:15 |
| enimaloc98 → enimaloc9 | 11:15 |
| ← OnkelTem left | 11:16 |
| ← gryffus left | 11:17 |
| → feriman joined | 11:17 |
| → OnkelTem joined | 11:18 |
| → Rashad joined | 11:20 |
| → Furai joined | 11:22 |
| ← weko left | 11:31 |
| ← xFFC left | 11:31 |
| → Koeniz joined | 11:31 |
| ← axsuul left | 11:33 |
| → axsuul joined | 11: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 left | 11:40 |
| → jfsimon1981 joined | 11:41 |
| ← ceoltb^ left | 11:42 |
| → ceoltb^ joined | 11:43 |
| → jklfds joined | 11:45 |
| → shailangsa joined | 11:48 |
| ← jklfds left | 11:49 |
| ← EvgenyK left | 11:50 |
| → jklfds joined | 11:52 |
| ← mncheck-m left | 11:53 |
| → bambanxx joined | 11:54 |
| → EvgenyK joined | 11:55 |
| → weko joined | 11:56 |
| ← Shinzon left | 11:59 |
| → aspirin joined | 12:01 |
| → Shinzon joined | 12:01 |
| ← randm left | 12:02 |
| → randm joined | 12:03 |
| → c0dehu1k joined | 12:03 |
| → countach202020 joined | 12: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 match | 12:06 |
| → konsolebox joined | 12:06 |
|
paperino42[m]
| as you suggested to use git log --graph | 12:06 |
| ← imme-emosol left | 12:07 |
| → imme-emosol joined | 12:07 |
| → corelax joined | 12:09 |
| → mweckbecker joined | 12:12 |
| ← germ left | 12:12 |
| → germ joined | 12: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 another | 12:18 |
| ← OnkelTem left | 12: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 left | 12:19 |
|
osse
| The upaste link doesn't work | 12:19 |
|
| Ah, that one does | 12:19 |
| ← EvgenyK left | 12:19 |
|
paperino42[m]
| osse: --is-ancestor did not help me mutcht/got too complicated | 12:19 |
| → OnkelTem joined | 12:21 |
|
osse
| Can we assume that feat is ahead of master? | 12:23 |
| → EvgenyK joined | 12:25 |
| → Xaldafax joined | 12: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 b2 | 12:25 |
| → gtkgtkgtk joined | 12:26 |
| ← SilentGhost left | 12:26 |
|
osse
| g rev-list master..feat | grep "$(g merge-base feat bX)" | 12:27 |
| → SilentGhost joined | 12:28 |
|
paperino42[m]
| osse: actually no, because someone else might have updated master, and in my example feat is not ahead of master | 12:34 |
| ← nvmd left | 12:35 |
|
paperino42[m]
| (I assume ahead means that topologically comes after) | 12:35 |
| ← YuGiOhJCJ left | 12: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 statement | 12:37 |
| ← rom1v left | 12:38 |
| → rom1v joined | 12:38 |
| ← EvgenyK left | 12:38 |
|
osse
| paperino42[m]: Technically true, it is not strictly ahead. | 12:39 |
| ← Traneptora left | 12:39 |
| → gryffus joined | 12: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 case | 12:41 |
| → EvgenyK joined | 12: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 issue | 12:46 |
| → bloody joined | 12:47 |
|
paperino42[m]
| as in I'll always have only one match | 12:47 |
| → vlado_ joined | 12: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 left | 12:50 |
| ← EvgenyK left | 12:52 |
| → EvgenyK joined | 12:53 |
| → gnomesort joined | 12:55 |
| ← gnomesort_ left | 12:55 |
| → joek joined | 12:58 |
| ← joek left | 13:00 |
| → ThorMojito joined | 13:06 |
| → m4r35n357 joined | 13:06 |
| → duxsco joined | 13:07 |
| ← duxsco left | 13:07 |
| ← Xenguy left | 13:15 |
| ← iffraff left | 13:17 |
| ← feriman left | 13:17 |
| → nate2 joined | 13:18 |
| ← nate2 left | 13:23 |
| ← Lord_of_Life left | 13:23 |
| → Lord_of_Life joined | 13:23 |
| ← weko left | 13:24 |
| → weko joined | 13:24 |
| ← rfuentess left | 13:26 |
| ← tharkun left | 13:26 |
| → tharkun joined | 13:27 |
| ← warthog9 left | 13:29 |
| → warthog9 joined | 13:31 |
| → OolonColluphid joined | 13:31 |
| → astlep55047443 joined | 13:32 |
| ← astlep5504744 left | 13:32 |
| ← han-solo left | 13:32 |
| ← OolonColluphid2 left | 13:33 |
| ← ElGatoPanzon left | 13:38 |
| → totemizer joined | 13:41 |
| ← cbreak left | 13:41 |
| → ElGatoPanzon joined | 13:41 |
| → enimaloc95 joined | 13:43 |
| ← ashnur left | 13:43 |
| totemizer → ashnur | 13:43 |
| → cbreak joined | 13:44 |
| ← enimaloc9 left | 13:44 |
| enimaloc95 → enimaloc9 | 13:44 |
| ← g2anj left | 13:44 |
| → g2anj joined | 13:47 |
| → rfuentess joined | 13:47 |
| → hoochmonger joined | 13:49 |
| ← vysn left | 13:50 |
| ← vlado_ left | 13:51 |
| → samiamsam joined | 13:51 |
| ← acetakwas left | 13:52 |
| → acetakwas joined | 13:52 |
| → f__ joined | 13:52 |
| → skapata joined | 13:53 |
| ← f_ left | 13:53 |
| ← zulutango left | 13:54 |
| → han-solo joined | 13:54 |
| → feriman joined | 13:56 |
| ← SuperLag left | 13:58 |
| → SuperLag joined | 13:59 |
| ← SuperLag left | 13:59 |
| → SuperLag joined | 13:59 |
| → inovas joined | 14:00 |
| → vladoski joined | 14:00 |
| ← haritz left | 14:00 |
| ← inovas_ left | 14:00 |
| → haritz joined | 14:00 |
| ← haritz left | 14:00 |
| → haritz joined | 14:00 |
| ← andreas303 left | 14:05 |
| → andreas303 joined | 14:05 |
| → subopt joined | 14:07 |
| → thiago joined | 14:08 |
| ← vladoski left | 14:15 |
| ← Rashad left | 14:16 |
| ← YoungFrog left | 14:16 |
| → YoungFrog joined | 14:17 |
| → vladoski joined | 14:17 |
| ← vladoski left | 14:18 |
| ← geirha left | 14:18 |
| ← jklfds left | 14:19 |
| → tirnanog joined | 14:28 |
| → rsx joined | 14:28 |
| ← Nei left | 14:32 |
| → Andrew joined | 14:34 |
| → GoldLeader87 joined | 14:35 |
| ← AndrewYu left | 14:35 |
| ← thiago left | 14:36 |
| ← drbeco left | 14:37 |
| → tofohty3 joined | 14:38 |
| ← crb_ left | 14:38 |
| ← tofohty left | 14:39 |
| tofohty3 → tofohty | 14:39 |
| → Nei joined | 14:40 |
| ← rom1v left | 14:42 |
| → rom1v joined | 14:43 |
| ← theoceaniscool left | 14:44 |
| → iffraff joined | 14:47 |
| f__ → f_ | 14:50 |
| ← Millicent left | 14:51 |
| → Millicent joined | 14:52 |
| ← axsuul left | 14:56 |
| → axsuul_ joined | 14:56 |
| → Traneptora joined | 15:04 |
| ← EdFletcher left | 15:10 |
| ← GoldLeader87 left | 15:12 |
| → ferdna joined | 15:14 |
| ← bambanxx left | 15:15 |
| → jklfds joined | 15:15 |
| → thiago joined | 15:15 |
| ← ThorMojito left | 15:17 |
| → _sa0sin_ joined | 15:18 |
| → nate2 joined | 15:19 |
| → humanface joined | 15:21 |
| → astlep550474433 joined | 15:21 |
| ← astlep55047443 left | 15:21 |
| ← sa0 left | 15:21 |
| → Gary_Sinise joined | 15:21 |
| → gh34 joined | 15:21 |
| ← Millicent left | 15:22 |
| ← nate2 left | 15:24 |
| ← jklfds left | 15: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 files | 15:27 |
| → hamburgler2 joined | 15:28 |
| → szkl joined | 15:28 |
|
ikke
| and things don't magically become untracked, someone needs to explicitly tell git to stop tracking things | 15: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 how | 15:29 |
|
Nexilva[m]
| git status says this entire directory is untracked. | 15:29 |
| ← mobidrop left | 15:29 |
|
Nexilva[m]
| However, in git history, in repo, I can see that directory going back ages/months | 15: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 years | 15:30 |
| ← hamburgler left | 15:30 |
|
Nexilva[m]
| However, git status tells me it's untracked. I've no idea how or why | 15:30 |
|
ikke
| Nexilva[m]: then check where it stopped being tracked | 15: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/file | 15:31 |
|
| sorry, --diff-filter=D | 15:31 |
|
Nexilva[m]
| Np | 15: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 matter | 15:32 |
|
Nexilva[m]
| How can I undo this last commit which hasn't been pushed. | 15:32 |
|
| Oh ok | 15:32 |
| → jklfds joined | 15:32 |
|
selckin
| git reset HEAD^ | 15:33 |
|
Nexilva[m]
| I don't see anything useful in the git log | 15:34 |
|
ikke
| Do you get any commits? | 15:34 |
| ← ferdna left | 15:34 |
|
ikke
| because those commits would have removed that file | 15:34 |
|
Nexilva[m]
| I get a list of commits going back 2 yeasr | 15:35 |
|
| D == deleted filter I assume. | 15:35 |
|
ikke
| yes | 15:35 |
|
| add --name-status to see what files were modified | 15:35 |
| → ThorMojito joined | 15: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 yet | 15: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 removed | 15:37 |
|
| https://gitlab.com/hashborgir/ironman | 15:37 |
|
| here is the repository | 15:37 |
|
| https://gitlab.com/hashborgir/ironman/-/tree/testing-skills-cleanup | 15:37 |
|
| Lastest branch | 15:37 |
| ← hoochmonger left | 15:37 |
|
Nexilva[m]
| https://gitlab.com/hashborgir/ironman/-/tree/testing-skills-cleanup/data/global/items <- it shows all the files are there | 15:37 |
|
| If you wish, you can clone the repo and see things if that helps | 15:38 |
|
ikke
| It does not matter what's on gitlab | 15:38 |
|
| It's in your local repository | 15:38 |
|
selckin
| you need to show git status and git log then | 15:38 |
|
Nexilva[m]
| Why is my local says this is untracked? I still haven't understood that. | 15:38 |
|
| Ok hang on | 15:38 |
|
ikke
| git rm --cached -r <directory>'; git commit -m "oops" | 15:39 |
| → gas51627 joined | 15:39 |
| ← rfuentess left | 15:40 |
| ← jklfds left | 15:41 |
|
Nexilva[m]
| Not sure how, git status is too large to patse in to a site | 15:41 |
|
selckin
| then you have bigger problems heh | 15:42 |
|
Nexilva[m]
| Heh | 15: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-status | 15:44 |
|
Nexilva[m]
| It doesn't seem to be deleted/removed in any of the commits. | 15:44 |
| → pac1 joined | 15:45 |
|
Nexilva[m]
| I am very confused. | 15:46 |
|
| From your command, e53f208137da63879775b06056e8bc76e67c9bc4 this is the commit that shows the files | 15: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 screen | 15: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 that | 15:48 |
|
Nexilva[m]
| I see | 15:49 |
|
selckin
| if status is too big to paste then its too big to read | 15:49 |
|
| so wtf did you do that cause that | 15:49 |
| ← inovas left | 15:49 |
|
Nexilva[m]
| Well it's big because that directory contains thousands o files. | 15:49 |
|
| That directory is magically untracked somehow. Not sure why | 15:49 |
|
| git status says all those thousand of files are untracked | 15:50 |
|
| Hence the large size of paste. | 15:50 |
|
selckin
| if the directory is untracked it won't show the content | 15:50 |
| ← mweckbecker left | 15:50 |
| → inovas joined | 15:50 |
|
selckin
| so you lied | 15:50 |
|
| so some files in it are tracked | 15:50 |
|
Nexilva[m]
| Correct, not all files | 15:51 |
|
| Some files in there are tracked | 15:51 |
| → mweckbecker joined | 15:52 |
|
selckin
| so now we can't believe anything you said, caue how can that mean directory is untracked | 15:53 |
| → jklfds joined | 15:53 |
| → sam113102 joined | 15:54 |
|
ikke
| Nexilva[m]: what does git ls-tree -r HEAD path/to/dir return? | 15:54 |
| ← sam113101 left | 15:55 |
| sam113102 → sam113101 | 15: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 |
| sengy → gahidore | 15: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 support | 15:55 |
|
| They don't come here to feed you incorrect information and waste both our times. | 15:55 |
| gahidore → sangy | 15:56 |
|
selckin
| well if you're gonna restate "magically diaspeared" every 5 seconds like an ass i'm gonna reply in kind | 15: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 helpful | 15: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 point | 15:57 |
| → gnomesort_ joined | 15: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 left | 15: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 left | 15: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 see | 16:00 |
|
tirnanog
| 0x0.st supports pastes up to 512 MiB, by the way. I would hope that is enough. | 16:00 |
| → zmt00 joined | 16: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 site | 16:01 |
|
tirnanog
| git ... | curl -F'file=@-' https://0x0.st | 16: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 me | 16: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 help | 16:01 |
|
tirnanog
| or, better, so that people know the command you ran: | 16:01 |
|
| ( set -v; git ... ) | curl ... | 16:01 |
| ← zmt01 left | 16: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 untracked | 16:02 |
|
Nexilva[m]
| A grown 42 year old man about to break down crying | 16:02 |
|
| Sigh. | 16:02 |
|
ikke
| but I gave several commands that you can execute | 16: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 skills | 16:03 |
|
Nexilva[m]
| Why can't you believe what I say? | 16:03 |
|
| I am so confused right now | 16: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 though | 16: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 me | 16:04 |
|
osse
| Some people just assume the worst. | 16:04 |
|
Nexilva[m]
| I understand. | 16:04 |
| ← jkl left | 16: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 returned | 16:04 |
| → bywaterloo joined | 16: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 untracked | 16: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 left | 16: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 joined | 16:06 |
| → jlc joined | 16:06 |
|
Nexilva[m]
| That's what I'm doing. Go away for a bit and then try again later. | 16:06 |
| ← LDericher_ left | 16:06 |
| → jklfds joined | 16: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 joined | 16:10 |
| ← themill_ left | 16:10 |
|
Nexilva[m]
| I will be back later when my mind is at rest. Thanks for your help and support. | 16:10 |
| → ___nick___ joined | 16:10 |
| → themill joined | 16:10 |
| ← ___nick___ left | 16:12 |
| ← daru left | 16:12 |
| ← causa_sui left | 16:12 |
| → daru joined | 16:12 |
| → ___nick___ joined | 16:14 |
| ← ___nick___ left | 16:14 |
| → ___nick___ joined | 16:16 |
| ← sfenik left | 16:16 |
| → sfenik1 joined | 16:16 |
| ← f451 left | 16:19 |
| ← ThorMojito left | 16:21 |
| → f451 joined | 16:21 |
| ← konsolebox left | 16:22 |
|
Nexilva[m]
| I took a walk, and back now. I have more to say | 16:24 |
|
| I use VMs for dev and I regularly take snapshots of the VMs | 16: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 left | 16: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 me | 16: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 anything | 16: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 there | 16:27 |
| → jiffe joined | 16: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 left | 16:28 |
|
Nexilva[m]
| I don't want to bother you guys with needless troubleshooting if it is not necessary to do | 16: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 up | 16:29 |
| ← agd85 left | 16:29 |
| → ThorMojito joined | 16:29 |
|
Nexilva[m]
| I go look at them in each commit in gitlab manually | 16:30 |
| → ThorMojito1 joined | 16:30 |
|
ikke
| several things would need the same kind of corruption for it to be in that state | 16:30 |
|
Nexilva[m]
| Files are never gone. They are always there until the latest commit | 16: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 HEAD | 16:30 |
| ← dskull left | 16:30 |
| → so-offish joined | 16:30 |
| → dskull joined | 16:31 |
| ← ThorMojito1 left | 16: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 commit | 16:31 |
| ← ThorMojito left | 16:34 |
| → ChmEarl joined | 16:35 |
| ← g2anj left | 16:35 |
| → g2anj joined | 16:38 |
| → EdFletcher joined | 16:38 |
| ← Yorick- left | 16:39 |
| → Yorick_ joined | 16:39 |
| → gryffus_ joined | 16:40 |
| ← gryffus left | 16:40 |
| → vdamewood joined | 16:42 |
| ← stenno left | 16:43 |
| → agd85 joined | 16:44 |
| ← roadie` left | 16:45 |
| → roadie joined | 16:46 |
| → so-offishul joined | 16:49 |
| ← Avaflow left | 16:51 |
| ← so-offish left | 16:51 |
| ← dostoyevsky2 left | 16:52 |
| ← vdamewood left | 16:52 |
| ← EvgenyK left | 16:53 |
| → dostoyevsky2 joined | 16:53 |
| → astlep5504744330 joined | 16:55 |
| ← astlep550474433 left | 16:55 |
| ← axsuul_ left | 16:58 |
| → axsuul joined | 16:58 |
| ← subopt left | 16:59 |
| ← Milos left | 17:01 |
| → Milos joined | 17:01 |
|
Nexilva[m]
| I see | 17:09 |
| ← [mct] left | 17: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/PGRHU | 17:09 |
|
| I guess I have to specify origin and branch | 17:11 |
|
| I did that, and now it pulled in the latest commits/changes | 17: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 snapshot | 17: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-bisect | 17:14 |
| ← leon left | 17: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 joined | 17:15 |
|
ikke
| yes | 17:15 |
|
Nexilva[m]
| Thanks | 17:15 |
| → jkl joined | 17:16 |
| ← rsx left | 17:17 |
| → leon joined | 17:18 |
| ← roadie left | 17: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 ranges | 17:24 |
|
| like start from the most recent release if you know that the issue was not in there yet | 17:24 |
| → masber joined | 17:25 |
| → [mct] joined | 17:25 |
|
gsi_
| even if that'd be 10k commits, this still is "just" 14 iterations to narrow down | 17:25 |
|
| probably quicker done than manually searching for a "good start value" | 17:26 |
| ← f_ left | 17:31 |
| ← bret left | 17:33 |
| → lembron joined | 17:33 |
| ← cafkafk left | 17: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 sort | 17:35 |
| ← celphi left | 17:36 |
| → celphi joined | 17:36 |
|
lembron
| imagine an alias git="mv /repo/some/other/.git /bak/.git && git $* && mv /bak/.git /repo/some/other/.git" but in functional | 17:37 |
| → cafkafk joined | 17:37 |
| ← bywaterloo left | 17:46 |
| ← Gary_Sinise left | 17:47 |
|
Nexilva[m]
| Thanks guys | 17:47 |
| → Gary_Sinise joined | 17: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 left | 17:48 |
|
ikke
| last 2 commits? | 17:48 |
| ← magic_ninja left | 17: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 left | 17:56 |
|
ikke
| Yes, I'm following you, though, the merge conflicts would happen when you pull, not push | 17: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 joined | 17:56 |
|
ikke
| You probably get a message that the push is rejected when you try to push | 17:56 |
| → nsaunders joined | 17: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 conflict | 17: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 fine | 17:58 |
|
| Let me show some visuals | 17:58 |
|
ikke
| No, you'd run in the same issue | 17:58 |
|
| You need to merge or rebase them locally, and resolve any conflicts | 17:58 |
|
| there is no way around it | 17:58 |
|
Nexilva[m]
| https://i.imgur.com/SWSxwvP.png This is what shows up on remote | 17:59 |
|
| https://i.imgur.com/FSNawvy.png here's what I have locally | 17:59 |
|
| Remote shows 17th, then 25th of this month. Local has many commits between those two dates which I can't seem to push up | 18:00 |
|
ikke
| You need to check what those conflicts are and solve them (possibly using a merge tool) | 18:00 |
| → JeffH joined | 18:00 |
|
ikke
| Do you know what a merge conflict is and why it happens? | 18:01 |
| → vysn joined | 18: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 file | 18: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 merging | 18:03 |
|
| You can't do that by reseting the remote branch, pushing from the other machine and then trying to push from the first machine | 18:04 |
|
Nexilva[m]
| I actually don't want to merge. I just want the latest copy of the file | 18:04 |
|
| I think. | 18:04 |
|
ikke
| Nexilva[m]: there is a difference between merging history and merging files | 18:04 |
|
Nexilva[m]
| I see. | 18:04 |
|
ikke
| But if you want to completely discard the 2 commits, then that's possible | 18:04 |
|
| but if you want to keep the changes, you need to merge it somehow | 18: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 only | 18:05 |
|
| I have their commit hashes | 18:06 |
|
ikke
| Nexilva[m]: if you want to push those 10 commits instead, it's easier to do that immediately | 18: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 know | 18: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 anything | 18: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 joined | 18:07 |
| ← FinnElija left | 18:09 |
|
Nexilva[m]
| I did not remove the two commits | 18:10 |
|
| Instead I force pushed as you suggested. | 18:10 |
| ← JeffH left | 18:10 |
| → EvgenyK_ joined | 18:10 |
|
Nexilva[m]
| https://i.imgur.com/I86hP1a.png Here's what that did to the 25th of this month compared to the pervious screenshot | 18:11 |
|
| Essentially now the two erroneous commits no longer show up. | 18:11 |
| → FinnElija joined | 18:11 |
|
Nexilva[m]
| I apologize | 18:12 |
| → JeffH joined | 18:12 |
|
Nexilva[m]
| https://i.imgur.com/SWSxwvP.png Here is the previous screnshot, which has today's two commits on the 28th | 18:12 |
| → zumba_addict joined | 18: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 28th | 18:13 |
|
| Is this okay | 18:13 |
| ← EvgenyK left | 18:13 |
|
Nexilva[m]
| I have the code for those two commits in a different machine | 18:13 |
|
| If I should commit those now, they should show up on top of this on 28th | 18:13 |
|
ikke
| something like !situation would be a lot more clear to me | 18: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 them | 18:20 |
|
| git show 8463d70d6c83 | 18:21 |
|
| git show 6f5b779114 | 18:21 |
| → clime joined | 18:23 |
|
ikke
| Nexilva[m]: note that in git, commits are not immediately removed, even if they are no longer reachable | 18:24 |
| ← coot left | 18:24 |
| ← GingerGeek left | 18:24 |
| → GingerGeek joined | 18:25 |
| ← nsaunders left | 18:25 |
|
Nexilva[m]
| Those commits don't show up anywhere, but I have the code/files. Peculiar | 18:27 |
| → arescorpio joined | 18:28 |
| ← han-solo left | 18:28 |
| → Inline joined | 18: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 sense | 18: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 info | 18: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 6f5b779114 | 18: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 VM | 18:34 |
| ← flower_ left | 18: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 VM | 18:36 |
|
samiamsam
| force pushing doesn't remove any commits ever | 18:37 |
|
ikke
| especially not on other machines that you didn't push to | 18:37 |
|
Nexilva[m]
| He said that they were essentially discarded | 18:37 |
|
ikke
| from that remote | 18:37 |
|
| and from the perspective of the branch that you push to | 18: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 explain | 18:38 |
|
| technically they are still on gitlab, but it can be difficult to access them | 18: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 gitlab | 18:39 |
|
Nexilva[m]
| Let's fine out | 18:39 |
|
| * Let's find out | 18:39 |
|
ikke
| /namespace/project/-/commit/<hash> | 18:39 |
|
Nexilva[m]
| Hey, there they are | 18:40 |
|
| Thanks for all your help | 18:43 |
|
ikke
| no problem | 18:43 |
| ← JeffH left | 18:45 |
| → magic_ninja joined | 18:48 |
| ← gareppa left | 18:49 |
| ← gryffus_ left | 18:49 |
| → gareppa joined | 18:50 |
| ← SomeAB left | 18:51 |
| → SomaAB joined | 18:51 |
| ← gareppa left | 19:00 |
| → liefer396 joined | 19:10 |
| → coot joined | 19:11 |
| → rustyshackleford joined | 19:12 |
| ← so-offishul left | 19:14 |
| → node1 joined | 19:18 |
| → taupiqueur joined | 19:18 |
| → hans_ joined | 19:19 |
| → kostkon_ joined | 19:19 |
| ← ingy left | 19:20 |
| → nate2 joined | 19:20 |
| → Sazhen86 joined | 19:21 |
| ← EvgenyK_ left | 19:21 |
| ← kostkon left | 19:22 |
| ← nate2 left | 19:25 |
| → duxsco joined | 19:26 |
| kostkon_ → kostkon | 19:28 |
| ← masber left | 19:36 |
| ← Gary_Sinise left | 19:43 |
| ← dviola left | 19:56 |
| → diego joined | 19:58 |
| diego → Guest8280 | 19:58 |
| → so-offish joined | 20:03 |
| ← ___nick___ left | 20:03 |
| → loulou joined | 20:07 |
| ← loulou left | 20:07 |
| → loulou joined | 20:07 |
| ← TomyWork left | 20:08 |
| ← lemuria left | 20:11 |
| → lemuria joined | 20:12 |
| ← ChmEarl left | 20:13 |
| ← duxsco left | 20:14 |
| ← remedan left | 20:18 |
| → konsolebox joined | 20:22 |
| ← robobub left | 20:25 |
| ← node1 left | 20:27 |
| ← xandris left | 20:28 |
| ← feriman left | 20:28 |
| ← Sazhen86 left | 20:31 |
| → xandris joined | 20:31 |
| → gareppa joined | 20:31 |
| → gryffus joined | 20:32 |
| → geirha joined | 20:33 |
| → Sazhen86 joined | 20:35 |
| → duxsco joined | 20:36 |
| → remedan joined | 20:36 |
| ← xandris left | 20:38 |
| ← Sazhen86 left | 20:40 |
| → xandris joined | 20:41 |
| ← zumba_addict left | 20:42 |
| → hbautista joined | 20:43 |
| ← hbautista left | 20:45 |
| ← Inline left | 20:47 |
| ← duxsco left | 20:47 |
| → Kaedenn joined | 20: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 did | 20:54 |
|
| (if you have pushed, you'd deal with a public rewrite if you went down that route) | 20:54 |
| ← jab416171 left | 20:54 |
| → squirrel joined | 20:58 |
| → jab416171 joined | 21:00 |
| → currenthandle joined | 21:00 |
| ← loulou left | 21:02 |
| ← coot left | 21:07 |
| → squealingcode joined | 21:07 |
| ← foul_owl left | 21:08 |
| ← thiago left | 21:10 |
| ← aspirin left | 21:13 |
| ← jab416171 left | 21:14 |
| ← cafkafk left | 21:17 |
|
Kaedenn
| Apparently I had to `git revert -m 1 <the commit>`. That did the trick. | 21:20 |
| → jab416171 joined | 21:20 |
| ← jab416171 left | 21:20 |
| → jab416171 joined | 21:20 |
| → cafkafk joined | 21:22 |
| → foul_owl joined | 21:22 |
|
ikke
| That creates an additional commit that reverts the changes the merge commit did | 21:22 |
| ← mven left | 21:24 |
| → mven joined | 21:25 |
| ← nickorta12 left | 21:25 |
|
Kaedenn
| Which is fine, this is a feature branch | 21:25 |
| ← clime left | 21:26 |
|
Kaedenn
| I'm not too fond of actually changing commit history | 21:26 |
| → nickorta12 joined | 21:26 |
| ← gh34 left | 21: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 left | 21:28 |
| ← tchan left | 21:28 |
| → tchan joined | 21:28 |
| ← gareppa left | 21:30 |
| ← PocketKiller left | 21:31 |
| → PocketKiller joined | 21:32 |
| → jab416171 joined | 21:33 |
| ← countach202020 left | 21:35 |
| ← PocketKiller left | 21:35 |
| → PocketKiller joined | 21:36 |
| → Gary_Sinise joined | 21:36 |
| ← Gary_Sinise left | 21:38 |
| → drbeco joined | 21:43 |
| → ThorMojito joined | 21:44 |
| ← Traneptora left | 21:46 |
| → ThorMojito1 joined | 21:46 |
| ← SleePy left | 21:47 |
| ← ThorMojito left | 21:48 |
| → SleePy joined | 21:49 |
| ← arescorpio left | 21:50 |
| ← hans_ left | 21:56 |
| → causa_sui joined | 21:58 |
| → lgc joined | 22:00 |
| ← sybariten left | 22:01 |
| ← lgc left | 22:01 |
| ← taupiqueur left | 22:03 |
| ← konsolebox left | 22:07 |
| ← igemnace left | 22:16 |
| → thiago joined | 22:21 |
| ← causasui left | 22:23 |
| ← vysn left | 22:24 |
| ← gas51627 left | 22:26 |
| → Traneptora joined | 22:26 |
| ← remedan left | 22:27 |
| → remedan joined | 22:28 |
| ← humanface left | 22:28 |
| → ThorMojito joined | 22:32 |
| → Xenguy joined | 22:33 |
| ← ThorMojito1 left | 22:35 |
| → ThorMojito1 joined | 22:36 |
| ← ThorMojito left | 22:39 |
| ← ThorMojito1 left | 22:41 |
| → dmenz joined | 22:47 |
| → zulutango joined | 22:52 |
| ← jklfds left | 22:54 |
| → thorsten` joined | 22:55 |
| ← kostkon left | 22:58 |
| → kostkon joined | 22:59 |
| → ZacSharp joined | 22:59 |
| ← kostkon left | 23:00 |
| → kostkon joined | 23:01 |
| ← cbreak left | 23:06 |
| → konsolebox joined | 23:06 |
| → cbreak joined | 23:07 |
| ← cafkafk left | 23:10 |
| → cafkafk joined | 23:13 |
| → rapmoc joined | 23:16 |
| → gast0n joined | 23:18 |
| ← pvxe left | 23:20 |
| ← rapmoc left | 23:21 |
| → nate2 joined | 23:22 |
| → pvxe joined | 23:23 |
| → rapmoc joined | 23:24 |
| ← liefer396 left | 23:24 |
| → jklfds joined | 23:25 |
| ← OnkelTem left | 23:25 |
| ← nate2 left | 23:27 |
| ← jklfds left | 23:29 |
| → feriman joined | 23:30 |
| ← cafkafk left | 23:31 |
| → cafkafk joined | 23:31 |
| → ChmEarl joined | 23:32 |
| → ThorMojito joined | 23:35 |
| → ThorMojito1 joined | 23:36 |
| ← kostkon left | 23:37 |
| → kostkon joined | 23:37 |
| ← ThorMojito1 left | 23:37 |
| → nsaunders joined | 23:38 |
| ← feriman left | 23:39 |
| ← ThorMojito left | 23:40 |
| → sunny930 joined | 23:41 |
| ← sunny93 left | 23:42 |
| sunny930 → sunny93 | 23:42 |
| ← reprazent left | 23:43 |
| → reprazent joined | 23:44 |
| ← kostkon left | 23:45 |
| ← Milos left | 23:46 |
| → kostkon joined | 23:46 |
| → Milos joined | 23:49 |
| ← kostkon left | 23:50 |
| → kostkon joined | 23:51 |
| ← kostkon left | 23:51 |
| → kostkon joined | 23:52 |
| → ikwyl6 joined | 23:53 |
| → enimaloc98 joined | 23:53 |
| ← enimaloc9 left | 23:54 |
| enimaloc98 → enimaloc9 | 23:54 |
| → Millicent joined | 23:57 |
| → Traneptora_ joined | 23:57 |
| → JeffH joined | 23:58 |
| ← Traneptora left | 23:58 |
| ← BrianBlaze left | 23:59 |