IRCloggy #git 2021-06-29

Logs Search ←Prev date Next date→ Channels Documentation

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

2021-06-29

Gustavo6046Gustavo6000:00
FLHerne_FLHerne00:00
wagle left00:01
wagle joined00:02
Gustavo60 left00:02
CalimeroTeknik joined00:06
cronos left00:08
FFY00 left00:08
cronos joined00:09
quiexotic_ joined00:09
qpdb_ joined00:12
qpdb left00:15
quiexotic_ left00:16
jhulten joined00:17
s1b1 joined00:18
orbyt left00:31
orbyt joined00:31
rifl joined00:33
Gustavo6046 joined00:36
dka left00:36
Gustavo6046 left00:36
orbyt left00:36
PaMeDa joined00:37
dka joined00:37
apauli left00:41
rafspiny joined00:43
quiexotic_ joined00:46
jhulten left00:50
goldfish left00:54
Gustavo6046 joined00:57
arash left01:00
quiexotic_ left01:03
Guest53 left01:05
vdamewood left01:06
blue_penquin joined01:10
venmx joined01:11
jim left01:14
jim joined01:15
hbautista joined01:25
Sasazuka left01:26
phylaz left01:27
pete443 joined01:27
AnAverageHuman_ joined01:29
pete443_ left01:29
AnAverageHuman left01:29
quiexotic_ joined01:30
alzgh left01:38
rifl left01:39
rifl joined01:40
maher joined01:45
jim you made iot01:46
maher jim: thanks!01:47
jim welcome... now, which repo is this?01:47
maher I'm looking at this: https://gitlab.gnome.org/GNOME/evince/-/merge_requests/31601:48
I haven't looked at this since Feb - so my local copy of master is from Feb01:48
if I do git pull in the master branch it asks if I want to merge or rebase - I think I want to reabse01:49
jim I see commits from yesterday01:49
ThorMojito left01:49
jim umm :) that I don't know, I forgot exactly what a rebase is01:50
maher if i do a rebase, and decide later I should have done a merge, can I undo the rebase?01:50
jim well, you could always reclone... are you contributing code to it01:51
?01:51
maher I sent in a patch and revised it - I think I did it the git way with a request to merge - can you tell from that webpage if I am meant to to anything now?01:51
jim is 316 yours?01:52
maher yes01:52
jim brb01:52
maher but I don't understand anything about git and needed some hand holding to get there, and don't want to bug the evince devs further if I can avoid it...01:53
jim ok01:55
maher i just did a git fetch, and it downloaded some things, but git show still shows somethign with a Feb 26 date01:56
jim howbout git log -101:57
phylaz joined01:57
ThorMojito joined01:58
maher jim: gives we something with a Feb 26 date01:58
jim when you do git status, which branch are you on?01:59
venmx left02:00
maher On branch master \ Your branch is up to date with 'origin/master'.02:00
jim hmm02:00
did you say you're new to git?02:01
rifl` joined02:01
maher jim: yes02:01
git branch gives me: issue-316-open-new-window \ josephmaher/evince-issue-316-open-new-window \ * master02:02
i want to update master to current remote master02:02
imMute it already is02:03
rifl left02:03
jim do you have -uncommited- (and unpushed) changes?02:03
maher imMute: why does git log only show changes from Feb 26th and earlier?02:03
jim: I don't know02:03
Xenguy joined02:03
imMute did you do a 'git fetch' ?02:04
quiexotic_ left02:04
maher imMute: yes02:04
imMute idk then. but " Your branch is up to date with 'origin/master'" means the two branches are the same02:04
maher ImMute: git fetch now runs with no output02:04
imMute the last time anyone committed to master was back in Feb then02:05
jim maher, is your remote, to a fork you made?02:05
maher jim: I don't know02:05
rifl`` joined02:05
PaMeDa left02:06
jim ok. I'll ask this again: are you -new- to git?02:06
maher jim: yes - I have never understood anything about git02:06
rifl``rifl02:06
jim how would you like to fix that part?02:07
I have a video you could watch... there's the book 'pro git'...02:07
rifl` left02:07
maher jim: I want to know the minimun about git to get this patch into the evince source tree so I don't need to maintain my own version which I have been doing for the past 10 years :(02:07
jim I guess the merge request is present...02:08
maher jim: ok - here's a specific question: maybe master points to some other branch which is not evnice master - how do I find out where master points to?02:09
jim howbout this: let's reclone the repo into a different dir... sound good?02:09
maher jim: in the past past I have always just made new clones - I thought I would try and do things the git way this time02:09
jim well we could look at a fresh clone to see what's what02:10
find a different dir you'd like to use (you could get rid of this clone when you figure out what happened)02:11
cd to that dir... and run git clone [email@hidden.address]02:12
maher ok - I just made a new clone and git show gives me a Jun 27th change02:12
jim ok02:12
maher how do I find out where master comes from>02:13
jim then cd to the original clone (yeah, it's a contradiction :), and see if you can run: git merge02:13
maher i ran: git clone [email@hidden.address] <--- what do I type into git to tell me that that master comes from there?02:14
rifl i want commands combined together in push like this "git once" which consists of git add git commit git push , how can i do this?02:14
maher jim: on the original one it says up to date, so I think imMute was right, and that master is not evince master but something else02:15
rifl seems my script running this has old syntax is outof date02:16
jim that could be02:16
maher hah!: git remote show origin02:16
jim do you understand what a git fork is?02:16
you found it :)02:17
you should bookmark this: https://progit2.s3.amazonaws.com/en/2016-03-22-f3531/progit-en.1084.pdf02:17
FFY00 joined02:18
jim wait, there must be a better way02:18
maher jim: thanks - have pdf now02:18
jim that's the book Pro Git by Scott Chacon02:19
maher jim: i thought I knew what a fork was in source code repositories, but my inability to use git shows that in fact I do not understand them02:19
ok - so the original rep I was looking at is: Fetch URL: [email@hidden.address]02:20
jim when you ask a site like github (which is a storage place for repositories), to fork a particular repository, it takes the repo and makes a complete copy of it, including all the history02:20
and sets it up so that you can write to it02:21
maher actual evince master is: Fetch URL: [email@hidden.address]02:21
jim: ok - I think I'm getting there - so I thought I was in evince master, but I was in the Feb 26th remote copy master...02:22
jim if you write or push to the repository, or even if you mess it up entirely, it won't hurt the original02:22
you can blow it all away, and it won't hurt the original02:23
maher jim: I don't want to mess up [email@hidden.address] because isn't that where the evince devs are going to pull the changes for the main tree if they ever decide to merge them?02:23
jim once the fork is ready, you would clone the fork... then you can work work work, commit commit, push push push...02:24
ferdna joined02:24
jim once you're satisfied that your work... umm, works, then you can "raise your hand" and say "hey, merge from me, I think it's good"02:25
Gustavo6046 left02:25
maher this is what happened: I uploaded an initial patch and did a merge request - the devs made some suggestions to fix it, and I made their changes02:25
jim that's called a pull request, or a merge request02:25
Gustavo6046 joined02:25
maher jim: i think I meant pull request there not merge request02:25
jim it looks like one site calls em pull requests, another calls em merge requests02:26
maher so when I look at: https://gitlab.gnome.org/GNOME/evince/-/merge_requests/316 i see a big button that says rebase - what happens if I click this button? am I meant to do this?02:26
jim I don't know exactly... others here can answer that question02:27
maher if I do the merge on my local copy, I assume it doesn't update the remote one?02:27
jim pokes others :)02:27
tang^ left02:28
jim it's a site I'm not used to... you should wait for an answer other than me :)02:28
maher jim: thanks for your help!02:28
jim welcome :)02:29
quiexotic_ joined02:29
jim maher, also, https://www.youtube.com/watch?v=8JJ101D3knE02:29
finn_elija joined02:30
FinnElija left02:30
finn_elijaFinnElija02:30
jim maher, having said that, I think you're more advanced than that... having said that, maybe you should watch that video (series?) to fill in any holes... the more you know the better02:32
ferdna left02:33
maher jim: I hate watching videos :(02:33
gco joined02:36
Gustavo6046 left02:41
YuGiOhJCJ joined02:44
Gustavo6046 joined02:45
quiexotic_ left02:45
Wuzzy left02:52
jim maher, oh, sorry to hear that... well, you got a great book too02:56
gco left02:57
gast0n joined02:58
gco joined03:00
quiexotic_ joined03:02
pac1_ left03:05
pac1 left03:05
Guest53 joined03:15
bytehackr joined03:21
Xenguy left03:21
gco left03:22
gco joined03:27
Guest53 left03:28
gco left03:39
Lord_of_Life_ joined03:40
Lord_of_Life left03:41
Lord_of_Life_Lord_of_Life03:41
nate1 joined03:42
guy_frm_yogaland joined03:49
thiago left04:06
Betal left04:06
bytehackr left04:07
Vipul left04:13
arcatech left04:15
skapata left04:18
wender joined04:19
bjwyman_ left04:19
computeiro left04:22
cliluw left04:24
cliluw joined04:25
debsan left04:28
guy_frm_yogaland left04:31
guy_frm_yogaland joined04:32
nate1 left04:33
gco joined04:35
vishal left04:40
vishal joined04:43
gast0n left04:45
Gustavo6046 left04:49
Gustavo6046 joined04:50
quiexotic_ left04:52
nate1 joined04:56
hoochmonger joined04:58
nate1 left05:04
Gustavo6046 left05:09
quiexotic_ joined05:11
Gustavo6046 joined05:13
srinidhi joined05:34
quiexotic_ left05:38
AbleBacon left05:44
guy_frm_yogaland left05:45
AnAverageHuman_ left05:47
srinidhi left05:50
srinidhi joined05:51
gordonfish- joined05:52
gordonfish left05:54
rafspiny left05:58
supernovah left06:00
supernov1h joined06:06
supernovah joined06:07
quiexotic_ joined06:07
supernov1h left06:08
supernovah left06:09
shabius_ joined06:11
quiexotic_ left06:12
shabius left06:15
supernovah joined06:16
gco left06:18
alfredb joined06:18
rafspiny joined06:19
quiexotic_ joined06:29
DevAntoine joined06:30
ntwk left06:30
DevAntoine left06:35
opzeul joined06:35
guy_frm_yogaland joined06:38
xrisovalantis joined06:41
quiexotic_ left06:42
ntwk joined06:43
venmx joined06:46
DevAntoine joined06:46
DevAntoine left06:50
venmx left06:50
lpapp joined06:54
lpapp hi, is it possible to do git show HEAD anotherbranch?06:54
selckin whats that supposed to do different from git show branch06:55
lpapp oh, that is it, thanks!06:56
nate1 joined06:59
quiexotic_ joined07:00
rfuentess joined07:04
unluckyshrubbery left07:04
nate1 left07:05
haskl joined07:24
goldfish joined07:30
eoli3n_ joined07:31
eoli3n_ Hi07:31
how to resolv conflict with the choice to keep all remote version of files ?07:32
hbautista left07:32
Tomte joined07:34
eoli3n_ git checkout --theirs *07:36
mspe hmm, didn't know about --theirs07:36
venmx joined07:37
mspe was gonna suggest07:37
git checkout <remote-branch> *07:37
goldfish left07:38
mkopriva joined07:38
eoli3n_ i was not sure, i removed then re cloned07:39
mspe or you could just abort merge/rebase07:40
no need to wipe it all ^^07:40
eoli3n_ i'm the guy who destroy the house to kill a fly07:40
venmx left07:41
arash joined07:42
quiexotic_ left07:44
DevAntoine joined07:49
Nalt joined07:52
Gustavo6046 left07:53
DevAntoine left07:54
DevAntoine joined07:56
EvilDMP joined07:57
lpapp left07:57
Nalt| joined08:02
Gustavo6046 joined08:02
arash left08:04
zj joined08:05
arash joined08:05
Nalt left08:05
ntwk left08:06
bLeDy[m] left08:09
heftig[m] left08:09
ServerStatsDisco left08:09
kadoban left08:09
blue_penquin[m] left08:09
morguldir left08:09
dieggsy left08:09
novasharper left08:09
Rubin left08:09
cpackham[m] left08:09
inkbottle[m] left08:09
Kamui left08:09
thetourist108 left08:09
elemongw[m] left08:09
crysisanon[m] left08:09
tuxayo left08:09
silvio[m] left08:09
viral_mutant[m] left08:09
pinage404 left08:09
nazarii[m] left08:09
ntwk joined08:10
EvilDMP left08:14
Murr left08:14
hegstal joined08:14
Murr joined08:14
Quack left08:18
adanwan left08:20
Quack joined08:20
adanwan joined08:21
arash left08:22
selckin left08:22
reset left08:27
DevAntoine left08:27
DevAntoine joined08:27
unixbhaskar joined08:35
jimklimov1 joined08:36
jimklimov left08:40
VoidFox joined08:42
FH_thecat joined08:43
gareppa joined08:46
Gustavo6046 left08:46
Gustavo6046 joined08:47
jsrnop left08:48
gareppa left08:48
guy_frm_yogaland left08:48
jsrnop joined08:49
guy_frm_yogaland joined08:49
FH_thecat left08:49
offpics joined08:52
Crassus joined08:55
Gustavo6046 left09:00
sysh joined09:00
nate1 joined09:01
unixbhaskar left09:04
guy_frm_yogaland left09:04
unluckyshrubbery joined09:04
unixbhaskar joined09:04
Nalt| left09:05
nate1 left09:06
rfuentess shame on me... I screwed the `git commit -C` and I already pushed the commit into an active PR09:07
Gustavo6046 joined09:08
Nalt joined09:12
eoli3n_ left09:15
hnOsmium0001 left09:16
zeenk joined09:17
DevAntoi_ joined09:18
Hi-Angel1 joined09:18
Nalt| joined09:19
Hi-Angel1 Hmm, is it just me, or `git reset` is broken in git 2.32.0 ?09:19
When I execute `git reset` to unstage file changes, the file changes disappear completely09:19
Nalt|| joined09:20
Nalt left09:20
Hi-Angel1 Although, there's a nuance: they *don't* disappear if I made the changes myself. But they *do* disappear if I brought the changes by executing `git reset HEAD^ -- myfile`.09:21
ikke That sounds as intended09:21
DevAntoine left09:22
Hi-Angel1 ikke: but how am I supposed to unstage the file changes?09:22
ikke You only bring the changes in the staging area09:22
With git reset, you undo that again09:22
Your 2nd command does not change the workingtree09:23
Nalt| left09:24
Hi-Angel1 I see, I should probably use instead `git checkout` in the second command09:24
Thanks ikke09:24
DevAntoi_ left09:26
DevAntoine joined09:26
offpics left09:31
offpics joined09:31
offpics left09:32
offpics joined09:32
Gustavo6046 left09:39
haskl left09:39
haskl joined09:40
Nalt|| left09:41
haskl left09:45
Nalt joined09:45
acid left09:45
Gustavo6046 joined09:47
jinsun left09:47
haskl joined09:48
venmx joined09:49
jinsun joined09:49
haskl left09:51
haskl joined09:51
acid joined09:51
venmx left09:53
acid left09:57
adlternative joined10:00
Gustavo6046 left10:00
acid joined10:01
adlternative left10:15
Gustavo6046 joined10:31
iauc joined10:34
iauc hi, is there some addon/overlay for git which will basically allow me to have a normal commit flow as if I'm working on master, but commit changes to branches instead10:35
nedbat iauc: that sounds like switching to a branch, and then just making commits. i must be missing something.10:36
iauc well it is :)10:36
dka left10:39
Gustavo6046 left10:40
j416 iauc: git checkout branch10:42
skapata joined10:47
Adoi joined10:50
selckin joined10:51
stennowork joined10:53
adlternative joined10:54
stennowork good day, i want to copy a repository A with all its branches and commit history into a new repository B. I selected the --mirror option during cloning. Now if i push a commit to repository A, will it reflect in B and vice versa?10:55
ikke stennowork: it will not automatically sync, you need to setup hooks to do that10:55
stennowork aah great10:55
can i still cherrypick from A to B ?10:55
ikke sure10:56
note that if you clone with --mirror, B will be a bare repository10:56
So that repo does not have a working tree10:57
stennowork what is the consequence of that? can i not push commits to B?10:57
ikke You cannot do operations which require a working tree (cherry-picking for example)10:57
bare repository are actually what you want when you want to push to it10:58
stennowork so i cannot cherrypick _from_ B?10:58
sorry for being so slow lol10:59
ikke You can fetch history from B, and then cherry-pick locally, that's not an issue10:59
You cannot cd to repository B and cherry-pick there10:59
stennowork i only want to pick from A to B10:59
hmm10:59
pulse joined11:01
stennowork well i guess thats fine then if i understood correctly which i am not sure about11:01
the problem is when i read git documentation, it somehow reads a bit for me like one of those autogenerated fake git man pages11:01
ikke They are mostly references11:02
nate1 joined11:02
ikke So the expectation is that you are already familiar with the concepts11:02
jinsun__ joined11:02
stennowork yeah and that is only partly the case11:02
i really need to sit on my ass and get into the details of git11:02
ikke stennowork: in general, you do not need to cherry-pick on B11:03
you can have a dedicated branch on A, cherry-pick commits there, and then push that to B11:03
stennowork ooh i see11:03
jinsun left11:03
stennowork i am worried that i accidentally execute the wrong command and overwrite the changes of B completely with A. My understanding is that that might happen11:05
ikke unless you use --force (-f), you can only push new changes, not overwrite existing ones11:06
stennowork ok, i wont anyway11:07
nate1 left11:07
jkl left11:07
jkl joined11:09
PaMeDa joined11:10
Tomte left11:11
Adoi left11:13
Adoi joined11:16
jkl left11:19
jkl joined11:20
jazzy left11:31
Gustavo6046 joined11:35
stkrdknmibalz left11:35
wender left11:39
Adoi left11:40
computeiro joined11:41
fnurkla left11:43
FFY00 left11:58
FFY00 joined11:59
nate1 joined12:25
adlternative left12:25
kenanmarasli joined12:28
cliluw left12:28
cliluw joined12:28
nate1 left12:30
jinsun joined12:33
jinsun__ left12:35
TomyWork joined12:38
lgc left12:42
debsan joined12:52
iauc left12:55
EvilDMP joined12:55
gh34 joined12:58
EvilDMP left13:08
Guest53 joined13:09
drew left13:13
yaymukund joined13:15
stennowork left13:16
fnurkla joined13:18
cxl left13:21
AnAverageHuman joined13:22
Guest53 left13:23
Crassus left13:28
offpics left13:33
discipulus left13:47
discipulus joined13:49
reset joined13:49
iauc joined13:52
gpanders left13:53
gpanders joined13:53
venmx joined13:57
jimklimov joined13:57
jimklimov1 left13:58
arcatech joined13:58
venmx left14:02
thiago joined14:04
Murr left14:14
Murr joined14:14
liefer left14:16
pulse left14:21
nate1 joined14:26
ndim left14:28
AbleBacon joined14:28
nate1 left14:31
discipulus left14:33
DevAntoi_ joined14:34
discipulus joined14:35
DevAntoine left14:38
discipulus left14:41
rifl left14:41
discipulus joined14:42
rifl joined14:42
Guest63 joined14:49
digup joined14:49
Guest63__that__14:49
__that__ left14:50
AnAverageHuman left14:53
sahilister joined14:55
qunzhong_luxian joined14:59
xrisovalantis left15:01
rifl` joined15:04
zj left15:04
rifl left15:06
rifl` left15:10
vicfred joined15:11
AnAverageHuman joined15:13
EvilDMP joined15:14
EvilDMP left15:20
sudoforge left15:22
pulse joined15:26
mehwork joined15:34
mehwork is it always bad to squash commits after pushing? For instance, even if it's my own branch?15:35
BtbN After pushing?15:35
ikke It all depends on expectations of others15:35
BtbN You'd immediately diverge from what you just pushed, and the next pull/push will be a mess.15:36
ikke If the branch you are working on is only used by yourself or not15:36
Timvde Using fixup commits and autosquash is explicitly part of our workflow15:40
mehwork I'm so confused15:41
ikke about what?15:41
mehwork as to when it's ok to squash after pushing15:42
dmvrtx left15:42
imMute mehwork: if you're the only one using the branch, it's usually fine. if other people are using your branch too (basing theirs off it or contributing to it directly) then it's usually a bad idea15:43
mehwork they're not using it15:44
ok thanks15:45
is it still fine even if i merged develop into it?15:45
nate1 joined15:45
dmvrtx joined15:46
fef joined15:48
nate1 left15:50
liefer joined15:54
sahilister left15:59
unixbhaskar left16:00
nate1 joined16:02
j416 mehwork: what is it that you are worried about?16:04
mehwork: perhaps, understanding _why_ it's sometimes a bad idea would be helpful.16:05
mehwork j416: i'm also worried about breaking things. I ended up in a state where i get a fatal error about not possible to pull because of fast forward16:06
j416 so you're more afraid of the tool than of the state?16:06
unixbhaskar joined16:06
j416 learn it well and that'll go away. :)16:06
mehwork well i'm trying to learn it well. I'm afraid of the painful process of learning it on a real code base and making these mistakes the hard way16:07
j416 so have a test repo to try with?16:07
mehwork i did, but then i still ran into these issues. Anyway i'll keep playing with it, eventually i'll get better at it16:07
j416 !book16:07
gitinfo There are several good books available about git; 'Pro Git' is probably the best: http://git-scm.com/book but also look at !bottomup !cs !gcs !designers !gitt !vcbe and !parable16:07
Betal joined16:07
dimi1947 joined16:08
nate1 left16:08
j416 this should be one of the first chapters http://git-scm.com/book/en/v2/Git-Internals-Git-Objects16:08
at least for me, it was much easier to first understand the data model, and only after that learn what commands do what16:09
mehwork those things never answer my questions though16:09
j416 sure they do16:09
qunzhong_luxian left16:09
sudomann joined16:10
mehwork like right now i'm still wondering if when 'git log' says 'merge branch develop into [branch]' as the top commit and then the commit i want to squash to, if it's ok to squash that merge of develop16:10
j416 start with that, then build experience on top of that16:10
mehwork iow are all commits equal16:10
j416 that depends on what you mean by "ok"16:10
mehwork ok as in a good idea16:10
or safe16:10
sudomann I am trying to learn more about hooks16:10
such as precommit etc16:10
Do you provide a shell script to run?16:10
mehwork sudomann: yes, and there's some example ones usually included that you can use as a template16:11
qunzhong_luxian joined16:11
j416 mehwork: assuming you're about to force push that after altering history, if you are the only person working on the branch, or, you've informed the others and they're ok with it, then yes, squash all you want16:12
sudomann Okay, so you are responsible to making sure you dont have logical conflicts such as: pre commit hook which maybe does a git command (which might invoke other hooks, etc)16:12
digup left16:13
mehwork j416: ok, and going forward am i better off using --squash when merging develop to my branch?16:13
j416 mehwork: the reason altering the history of a shared branch is often a bad idea is that you can end up with people confused over why their history suddently doesn't match what's on the remote.16:13
mehwork e.g., git merge --squash develop16:13
digup joined16:13
j416 mehwork: that'd depend entirely on your workflow. I never use --squash.16:14
mehwork: I also never merge upstream into my branch.16:14
Murr left16:14
AnapodoPsalidaki left16:14
mehwork i'm using git-flow16:14
Murr joined16:14
j416 does that encourage merging upstream into topic branches?16:15
b0rf joined16:15
j416 it's a valid workflow; just creates a lot of unnecessary noise, which I prefer to not have.16:15
also risk of introducing issues in merge conflict resolution16:16
I prefer to rebase topic branches instead.16:16
this does of course still doesn't remove potential merge conflicts, but at least you get to solve them in the original commits, rather than doing that in the merge commit16:17
and through that, you get clean history, plus git blame or git bisect or such will give you a proper commit that introduced whatever bug, rather than a merge commit16:18
which is useful.16:18
mehwork j416: git-flow is merge based so yeah16:19
j416 this is subjective. some prefer to keep the commit history exactly as it happened, with all work in progress half-finished commits and so. I see no value in that, but each to their own.16:19
mehwork: in that case, avoid --squash, because that won't create a merge.16:20
mehwork the _only_ reason i use git rebase is to keep history cleaner by getting rid of useless commits like "fixes eslint issue"16:20
ok thanks16:20
j416 s/merge/merge commit/16:20
mehwork well, wait, that's what i wanted though16:20
to also keep the useless 'merged develop' commits that are just there to keep my branch up to date16:20
j416 if you're keeping the commits anyway, why not keep the history of those commits by avoiding --squash?16:21
EvilDMP joined16:21
ndim joined16:22
j416 "git blame" on a line showing "sync with develop" doesn't make much sense.16:22
mkopriva left16:22
jiffe which git16:24
mehwork right tht's why i want to squash16:24
j416 I don't follow16:24
mehwork I don't either, so i'm back to confused :[16:24
j416 see git object model above16:24
this might be helpful https://learngitbranching.js.org/?NODEMO16:25
TomyWork left16:25
j416 merge --squash effectively discards the history and just keeps the result of the merge, which becomes a regular commit with no info on where those changes came from other than the commit message16:26
hbautista joined16:27
mehwork ok, so you're saying don't use merge --squash because it offers no real benefit and only takes away the ability to figure out if a merge of that branch caused a bug?16:28
vicecea joined16:28
mehwork and i shouldn't squash those merges of other branches into my branch, unless i've verified it didn't cause a bug first?16:28
BtbN I don't like having merge commits in my history at all16:29
hard to read and potentially confusing16:29
vicecea hi, I merged another branch that included 2 commits, C1 and C2, C2 added a file F1, however, F1 does not exist after I have merged the branch in the workspace, I can't `git co F1` and merging the branch again says it's already up to date - I have never seen this before, any pointers?16:29
j416 mehwork: it won't take away the ability to figure out that the _merge_ cause the bug.16:30
mehwork ok, then i wish squash ad nauseum16:30
j416 mehwork: but that's the very issue. If the merge commit caused the bug, that creates more headache than needed.16:30
mehwork: it's the equivalent of writing code, committing that saying "Add stuff"16:31
not very useful.16:31
except also in this case, you're doing that with code you didn't write.16:31
mehwork j416: meaning if 'git log' in my branch shows these 3 commits: 1. fixes eslint issue 2. Merge branch 'develop' into <mybranch> 3. Commit message i want -- then i'll do `git rebase -i HEAD~3` and squash 2 and 3, right?16:32
j416 but, y'know, squash merge if you prefer.16:32
mehwork yeah i'm not gonna use --squash16:32
j416 mehwork: I don't understand the question16:32
BtbN My colleagues at work love squash merges16:32
so our history consists only of single commits with like -5000+5000 lines16:32
bisecting bugs is next to impossible16:33
j416 BtbN: wonderful.16:33
BtbN Not sure if that or their original history of "Ooops" "Fix" "One more thing" "forgot" would be better16:33
j416 small commits make finding bugs much easier.16:33
BtbN: sounds like you want to teach them a thing or two. :)16:33
mehwork j416: my question is, is it ok to do that based on everything we've talked about with keeping history a cleaner while still merging develop into my branch16:33
BtbN I tried. Doesn't work.16:33
hbautista left16:34
mehwork j416: once i push these changes and make a PR in github, i don't want it saying there's 3 commits. I want it saying there's 116:34
j416 mehwork: looks like you're describing squash merge.16:34
mehwork: so rebase.16:34
mehwork yes that's why i said i'm going to do git rebase -i HEAD~3 in that case16:35
BtbN You usually want one commit per "thing" you did16:35
as granular as possible16:35
mehwork j416: and then i'll mark 2 and 3 as 'squash'16:35
j416 mehwork: skip the merge altogether16:35
mehwork: just rebase16:35
BtbN You don't want stuff like "typo fixes" as individual commits, unless the typo is in the main repo16:35
j416 mehwork: also, rebase will eat the merge by default.16:36
mehwork j416: the problem for me is that i already have a PR and it's still showing 3 commits. And when i squash this one into 1 commit, it shows 4 commits now :/16:36
j416 mehwork: rebase + force push is the only option to get that to show 1 commit.16:36
mehwork oh i didn't force push when i pushed, maybe that's why16:36
BtbN You pushed _something_ tho16:37
j416 ^16:37
mehwork yes16:37
it still let me push16:37
without -f16:37
j416 force push is only useful when you have altered history16:37
mehwork that's what i'm trying to do16:37
j416 but you didn't.16:37
mehwork alter the history from 3 commits to 1 by rebasing16:37
j416 if you had, the regular push would give an error.16:37
if you rebase, then a regular push won't work.16:38
mehwork but i did rebase, what the heck. I did git rebase -i HEAD~3 and squashed 2 commits16:38
j416 mehwork: anyway, object model, commit graph. it's in the book. :)16:38
this is not about workflow anymore but about the commit graph and how to modify it16:39
fef left16:39
j416 so, it's all there. sorry to say rtfm, but book will explain it better and with less wasted time than anyone here can.16:39
mehwork yes, i need to master that16:39
no that's fair. I just hate when i follow instructions and things don't work16:39
not your instructions, but some i found online16:39
j416 yes16:39
learn why it doesn't work instead16:40
sysh left16:40
j416 better yet, don't follow instructions at all.16:40
mehwork including your instructions? jk16:48
you're right. It doesn't pay to just follow someone else's steps without truly understanding what's going on (tell that to the millions of people who just copy paste from stack overflow all day)16:48
Ok now another issue is i'm trying NOT to squash commits, and i just did a 'git push origin <mybranch>' after creating a commit and it's giving me error: failed to push some refs: updates rejected because top of your current branch is behind its remote16:51
so i ran 'git pull origin <mybranch>' and that's failing: fatal: Not possible to fast-forward, aborting16:52
srinidhi left16:52
mehwork so i can't pull nor push. What the heck?16:52
imMute your branch and the branch on the server have diverged (they both have commits the other doesnt). you can 'git fetch' and then do the merge manually. but that's what git-pull does by default, but yours seems to be configured to only allow fast-fowards, so that's probably for a reason16:53
rfuentess left16:53
mehwork oh yes, my local gitconfig has ff-only16:54
because someone at work told me that's a good idea16:54
imMute IMO it is. I never use git pull. I always fetch, and then examine the branches to decide if I want to rebase/ff/merge.16:54
Adoi joined16:55
mehwork git fetch origin <mybranch> didn't have an error but i still can't push or pull16:55
hnOsmium0001 joined16:55
imMute just 'git fetch' is enough. you need to manually merge/rebase before you can push though.16:55
mehwork i can do 'git pull origin <mybranch> --no-ff' and it said "Merge made by the 'recursive' stratgy'16:56
imMute so that did the fetch and then a merge, overriding your ff-only config option.16:56
which is probably fine.16:56
j416 mehwork: yes, don't blindly follow. read up and make your own opinion. :)16:56
unixbhaskar left16:56
j416 mehwork: (also, I can't recall giving you instructions.)16:56
mehwork yeah that worked and now i can push16:56
j416: i was making a joke about how you gave me instructions not to follow instructions16:56
j416 sure.16:57
unixbhaskar joined16:57
jmcantrell joined16:57
j416 I'm a random person on the internet. don't trust me. :)16:57
mehwork how is that different than a random person irl or a random author in a book?17:00
DevAntoi_ left17:01
j416 not much I suppose.17:01
dimi1947 left17:01
j416 (though not sure about the latter)17:03
mehwork i've read worse advice in random books than on irc in my time17:04
at least with computer related stuff17:04
j416 (how'd the author get into the book?)17:04
j416 shows self out17:05
digup left17:06
Hi-Angel1 left17:06
jiffe there a way to get git running on an old version of x64 linux with https running out of ~/.local ? I tried grabbing https://github.com/EXALAB/git-static which works in a new ubuntu machine but not in this old rhel5 machine, it segfaults17:08
sahilister joined17:09
mehwork j416: convinced a publisher? Not hard for technical people to convince non technical people, since they have no way of knowing if they know wth they're talking about17:11
Adoi left17:13
BtbN You will need to compile it yourself, targetting the ancient toolchain of that OS17:13
jiffe BtbN: why do I need to use an old toolchain?17:14
I've got a static version of curl running in this machine ok17:14
j416 mehwork: (.....joke.)17:14
BtbN jiffe, glibc is never truely static17:15
something built with a newer glibc has absolutely no guarantee to run on a system with an older one17:15
ikke musl can be fully statically linked17:17
BtbN You lose a bunch of features then though17:17
like, dynamically loading nss modules17:17
jiffe I don't need a lot of functionality, I just need to be able to git clone some stuff17:18
via https17:18
BtbN That is a lot of dependencies just for that17:18
ikke jiffe: do you actually need a git repo?17:18
BtbN best bet might be using something like conda, which brings literally everything except the kernel17:18
ikke if you just need the files, downloading an archive might be simpler17:19
BtbN But even that might expect a more modern glibc17:19
Betal jiffe: is it an one time download? can it be http?17:19
jiffe not a one time, and has top be https as I don't think you can use http with github17:20
Betal jiffe: can't you use the browser and download a zip?17:20
ikke or use curl and download a zip17:20
jiffe Betal: I'm using this with pyenv which installs and updates a local version of python17:20
Betal would not be a option to git clone in a working machine, than use it as a proxy repo, old ubuntu -> updated machine -> github ?17:22
kenanmarasli left17:23
jiffe I can figure out other solutions if there's absolutely no way to get this to work, I'm here with the interest of trying to get git + https as a solution here17:23
kenanmarasli joined17:24
liefer left17:24
kenanmarasli left17:24
liefer joined17:25
Betal isn't rhel5 eol? still secure to use it connected to internet?17:25
jiffe that's up to the sys admins, these are dev machines running rhel5 and they're on the internet17:27
mspe rhel5 extended support ended November 30 202017:28
YuGiOhJCJ left17:28
ikke poor sobs who have to develop on rhel517:28
jiffe: Not sure if there is an easy solution17:29
you have to figure out why it's segfaulting17:30
or try to get a static build against musl17:30
liefer left17:30
liefer joined17:31
jiffe alright I'll see what I can figure out, thanks17:33
digup joined17:35
cliluw left17:41
ubique joined17:42
jhulten joined17:43
Sasazuka joined17:46
madewokherd left17:46
madewokherd joined17:47
Sasazuka left17:54
opzeul left17:54
waxer joined17:58
maher when I look at the repository on gitlab, there are lots of branches - but when I clone it, I only get one branch. How do I get all the branches?17:58
ikke You have all branches17:59
try git branch -r17:59
crabbedhaloablut joined18:01
nate1 joined18:04
Sasazuka joined18:04
maher ok - so I did a git switch issue-316-open-new-window and it made a new local branch tracking that remote branch18:06
AbleBacon left18:06
maher but then I did git switch josephmaher/issue-316-open-new-window and it said: fatal: invalid reference: josephmaher/issue-316-open-new-window, but that branch shows up in git branch -r18:06
zmt01 joined18:06
AbleBacon joined18:07
ikke it's a remote tracking branch18:08
Adoi joined18:08
jimklimov1 joined18:08
nate1 left18:09
ikke like you said, you created 'local' branch already18:09
zmt00 left18:10
maher ikke: in branch -r I see two branches: origin/issue-316-open-new-window and origin/josephmaher/issue-316-open-new-window <--- are these different branches?18:10
ikke maher: yes, they do represent different branches18:11
jimklimov left18:12
natrys joined18:12
maher ikke: why doesn't git switch josephmaher/issue-316-open-new-window work?18:12
Sasazuka left18:14
Murr left18:14
ikke git switch -c josephmaher/issue-316-open-new-window -t origin/josephmaher/issue-316-open-new-window18:14
Murr joined18:14
maher ikke: thanks! ( there was type in my original git switch command :( )18:16
seand joined18:20
theoceaniscool left18:22
gordonfish-gordonfish18:23
dogood joined18:23
digup left18:23
Sasazuka joined18:23
srinidhi joined18:27
infernix joined18:29
vicecea left18:31
infernix left18:35
hbautista joined18:35
infernix joined18:37
dogood left18:40
Soniqueeries18:42
hbautista left18:44
jazzy joined18:48
nyah left18:49
forgotmynick joined18:49
CJ joined18:51
tsdh joined18:54
xayto left18:54
waxer_ joined18:55
waxer_ left18:55
hoochmonger left18:58
hoochmonger joined18:59
CJ left19:04
mthall left19:05
mthall joined19:06
opzeul joined19:09
blue_penquin left19:10
unixbhaskar left19:10
xayto joined19:19
jhulten left19:20
jhulten joined19:21
AnAverageHuman left19:21
jhulten left19:25
hbautista joined19:35
AnAverageHuman joined19:37
jhulten joined19:41
alfredb left19:42
DevAntoine joined19:46
arcatech left19:49
arcatech joined19:50
DevAntoine left19:52
DevAntoine joined19:52
arcatech left19:53
DevAntoine left19:57
arcatech joined20:00
hbautista left20:01
arcatech left20:05
nate1 joined20:05
DevAntoine joined20:08
nate1 left20:10
GNUcifer joined20:12
cehteh left20:12
GNUcifercehteh20:12
DevAntoine left20:12
mokulus joined20:15
xall joined20:18
AnapodoPsalidaki joined20:22
EvilDMP left20:25
EvilDMP joined20:26
liefer left20:29
waxer left20:29
liefer joined20:29
BUSY left20:34
idego joined20:40
pieguy128 left20:42
pieguy128 joined20:43
gast0n joined20:45
b0rf left20:53
liefer left20:55
liefer joined20:56
srinidhi left20:57
idego left20:57
forgotmynick left20:59
qunzhong_luxian left21:02
shabius_ left21:03
shabius joined21:03
ubique left21:04
toinen joined21:12
yksi left21:13
Xenguy joined21:19
ThorMojito left21:21
anotheranother|21:23
gh34 left21:25
mehwork everytime i see glibc i think of how glib C is21:33
What exactly does this do: git co <mybranch> ; git rebase -i origin/main21:34
does it fetch `main`'s changes from the remote and replay those commits over my branch?21:34
shabius left21:35
mokulus left21:35
unixbhaskar joined21:38
shabius joined21:39
SuperLag joined21:39
lgc joined21:40
fnurkla left21:44
nyah joined21:44
EvilDMP left21:47
Nalt left21:48
EvilDMP joined21:48
EvilDMP left21:48
EvilDMP joined21:49
EvilDMP left21:49
EvilDMP joined21:49
EvilDMP left21:50
EvilDMP joined21:50
EvilDMP left21:50
EvilDMP joined21:51
j416 mehwork: there's no network involved in that.21:51
EvilDMP left21:51
j416 mehwork: it checks out <mybranch>, then rebases that on top of whatever origin/main points at.21:51
(a commit)21:52
EvilDMP joined21:52
shabius left21:52
EvilDMP left21:52
j416 mehwork: most things in Git are local.21:52
EvilDMP joined21:53
EvilDMP left21:53
EvilDMP joined21:53
EvilDMP left21:54
EvilDMP joined21:54
EvilDMP left21:54
EvilDMP joined21:55
EvilDMP left21:55
EvilDMP joined21:56
EvilDMP left21:56
kilobyte_ch left21:56
shabius joined21:59
mud joined22:00
arcatech joined22:01
Rubin joined22:03
offpics joined22:05
offpics left22:06
nate1 joined22:06
fnurkla joined22:07
mehwork interesting thanks22:07
heftig[m] joined22:07
bLeDy[m] joined22:07
pinage404 joined22:07
cpackham[m] joined22:07
tuxayo joined22:07
novasharper joined22:07
morguldir joined22:07
dieggsy joined22:07
kadoban joined22:07
Kamui joined22:07
ServerStatsDisco joined22:07
Guest5383 joined22:07
elemongw[m] joined22:07
crysisanon[m] joined22:07
silvio[m] joined22:08
inkbottle[m] joined22:08
thetourist108 joined22:08
jazzy left22:08
viral_mutant[m] joined22:08
mehwork so it's the same thing as git co main ; git pull ; git co <my branch> ; git merge main ?22:08
nazarii[m] joined22:08
jazzy joined22:09
blaklistd joined22:10
kilobyte_ch joined22:11
bLeDy[m] left22:11
ServerStatsDisco left22:11
heftig[m] left22:11
mehwork well not the exact same thing obviously, but similar22:11
morguldir left22:11
Rubin left22:11
kadoban left22:11
Guest5383 left22:11
dieggsy left22:11
heftig[m] joined22:11
cpackham[m] left22:11
nazarii[m] left22:11
inkbottle[m] left22:11
bLeDy[m] joined22:12
novasharper left22:12
Kamui left22:12
cpackham[m] joined22:12
nate1 left22:12
novasharper joined22:12
morguldir joined22:12
dieggsy joined22:12
kadoban joined22:12
Kamui joined22:12
ServerStatsDisco joined22:12
elemongw[m] left22:12
fnurkla left22:12
blue_penquin[m] joined22:12
fnurkla joined22:12
elemongw[m] joined22:12
inkbottle[m] joined22:12
blue_penquin[m]Guest64922:13
nazarii[m] joined22:13
crysisanon[m] left22:13
thetourist108 left22:13
pinage404 left22:13
gpanders no, it's not the same thing. For one, there's no 'git pull'. For two, rebase and merge are not the same (though they *sometimes* have the same outcome)22:13
Rubin joined22:13
tuxayo left22:13
pinage404 joined22:13
gpanders And the -i flag means it's an interactive rebase, so it's *definitely* different than git merge22:14
tuxayo joined22:14
crysisanon[m] joined22:14
thetourist108 joined22:14
mehwork what if i did this though (all in my branch): git fetch ; git rebase -i origin/main22:14
does the git fetch first make up for it not doing a git pull?22:15
ndorf pull = fetch + rebase, or fetch + merge. so yes.22:15
mehwork nice22:18
silvio[m] left22:19
viral_mutant[m] left22:20
venmx_ joined22:21
blaklistd left22:22
Kamui left22:22
heftig[m] left22:22
thetourist108 left22:22
dieggsy left22:22
kadoban left22:22
cpackham[m] left22:22
bLeDy[m] left22:22
novasharper left22:22
inkbottle[m] left22:22
morguldir left22:22
pinage404 left22:22
crysisanon[m] left22:22
Guest649 left22:22
Rubin left22:22
tuxayo left22:22
nazarii[m] left22:22
ServerStatsDisco left22:22
elemongw[m] left22:22
blaklistd joined22:22
mehwork is it fine to always just 'git fetch -p' instead of plain 'git fetch'?22:24
JanC_ joined22:26
JanC left22:27
Rubin joined22:28
cehteh possibly not .. depends on what you want to do22:28
heftig[m] joined22:28
bLeDy[m] joined22:28
pinage404 joined22:28
cpackham[m] joined22:28
tuxayo joined22:29
novasharper joined22:29
dieggsy joined22:29
morguldir joined22:29
kadoban joined22:29
Kamui joined22:29
mehwork at leat in this case where i want to fetch before rebase'ing origin/foo onto my branch22:29
ServerStatsDisco joined22:29
Guest6204 joined22:29
elemongw[m] joined22:29
crysisanon[m] joined22:29
silvio[m] joined22:29
inkbottle[m] joined22:29
thetourist108 joined22:29
viral_mutant[m] joined22:29
nazarii[m] joined22:29
fnurkla doesn't seem necessary22:29
cehteh why do you want -p then?22:29
mehwork it says it will remove any remote-tracking references that no longer exist ont he remote22:30
jstein left22:30
mehwork just seemed like a bonus22:30
cehteh in presence of multiple remote repositories which are not in sync pruning can be nasty, possibly not overy dangerous but unnecessary at best22:30
fnurkla ^22:30
mehwork alright thanks22:31
cehteh when you only track a single origin its prolly harmless, but still unnecessary unless you exactly want that22:31
ThorMojito joined22:32
frobnic left22:33
mehwork i'll avoid it then22:35
Nalt joined22:35
micah left22:47
Guest53 joined22:51
venmx_ left22:52
zeenk left22:53
frobnic joined22:55
opzeul left22:56
discipulus left22:57
blaklistd left22:59
jsrnop left23:01
jsrnop joined23:01
Guest53 left23:03
polyrob left23:08
blaklistd joined23:12
sgnsgn_23:15
navidr left23:15
sgn_sgn23:15
natrys left23:16
sudoforge joined23:16
maher left23:23
maher joined23:24
blaklistd left23:26
blaklistd joined23:26
polyrob joined23:26
orbyt joined23:28
keypusher left23:34
stkrdknmibalz joined23:36
JanC_JanC23:39
keypusher joined23:48
BUSY joined23:49
Adois joined23:53
jhulten left23:55
Adoi left23:57
kaisyu joined23:58

Logs Search ←Prev date Next date→ Channels Documentation