IRCloggy #git 2019-02-22

Logs Search ←Prev date Next date→ Channels Documentation

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

2019-02-22

mven_ joined00:00
raffo left00:01
finalbeta left00:04
bjpenn joined00:04
bjpenn im working on a feature branch and i did 'git rebase master' on the feature branch00:05
this put all my commmits on top, of everything on master00:06
which is great00:06
but i guess changed the commit numbers for my existing commits prior to the rebase?00:07
freeman42x left00:07
mjsir911 left00:09
j416 why would you assume that?00:12
what command did you run before the rebase that would change the commits?00:13
or, do you mean that the rebase caused new commit hashes?00:13
bjpenn i think rebase caused new commit hashes00:14
let me try to explain the scenario00:14
vishal normally rebase won't cause new hashes on master (in your case), but it definitely will for the commits that were brought over from 'topic'00:15
egovirus left00:15
j416 bjpenn: that's expected.00:15
bjpenn im working on a feature branch with a few new commits. I have a PR open for this feature branch00:15
but since ive been working on this, master has changed quite a bit00:15
j416 yes; you explained this above00:15
you rebased and the hashes changed.00:16
bjpenn i wanted to locally incorproate the new changes in master, to run some tests, with my changes on top (so i used git pull master; siwtched to feature branch, and ran git rebase master)00:16
so for the most part, this worked, git log showed my commits all on top00:16
with the master commits right after ti00:16
it*00:16
i wasn't able to push though because it said its a non-fast-forward push00:17
j416 yes, also expected.00:17
bjpenn why is that?00:17
j416 you altered history00:17
bjpenn ah ok00:17
Essadon left00:18
alyptik joined00:18
bjpenn j416: so in this situation how do i get it back to a point where i can push?00:18
i guess what would be the best way in this scenario to unalter history00:18
orbyt_ left00:20
vishal you can undo the rebase using reflog it it was just for throwaway testing and you care about the hashes on topic. Alternatively you can push --force if you don't care about the history (or if no one depends on it)00:20
bjpenn i do care about the history00:20
hmm00:20
so whats standard practice when performing a PR?00:21
if you want to incorporate all the recent changes of master00:21
yyy left00:21
bjpenn if i do a git merge master on my feature branch, and then push the feature branch00:21
the PR will show every single commit since my changes right?00:21
the PR will show every change thats already on master, in my PR right?00:22
vishal git reflog and git reset --hard HEAD@{XX} where XX is the number that refers to your rebase. I /think/ github is smart enough to figure out your branch was based off an older point in the history of master, and if it is mergeable, it /should/ just show your commits, but don't take my word for it00:23
basteh left00:25
vishal indeed if you're based off an older version of master, the only commits that are in your feature branch, that are not already on master, are yours, and are the ones you want in the PR, right?00:26
bjpenn yes00:27
orbyt_ joined00:27
vishal the PR won't show commits in upstream's master that you are missing00:27
orbyt_ left00:28
bjpenn before i submit my PR i want to merge with master, to incorporate all the upstream master changes into my branch00:28
and run some tests00:28
either rebase or master00:29
rebase or merge*00:29
vishal in that case sounds like you will have to rebase and force push00:29
or merge, yes00:29
bjpenn if i merge onto master from the feature branch00:30
and then git push to my PR00:30
will it show every single commit on upstream master, along with my changes00:30
vishal I'm not sure how github represents merges in PRs, but I wouldn't expect it to show any commits that are already on master00:32
it will likely show one additional 'merge commit'00:32
some upstreams may have a policy around that, if they want to keep their history linear, and in that case ask you to rebase instead of merging00:33
raffo joined00:34
vishal if there is not a linear history policy, it is generally recommended that you go the merge with master locally,. and do your testing, but in the PR use the original feature branch if there were no changes resulting from the testing00:35
(and especially if it merges cleanly)00:35
that way the project's history will show your topic branch being merged, instead of a random "merge master" which conveys less information00:35
rothen left00:37
j416 if the PR is still new and no one started looking at it, I'd rebase and force push.00:38
if the PR has been looked at (there are comments etc.), I'd address those first and then rebase after a go-ahead from the reviewer(s) to avoid confusion.00:38
bjpenn: ^00:39
n000g left00:42
n000g joined00:43
mikecmpbll left00:45
renich_ joined00:47
renich left00:47
skyikot left00:47
www_t joined00:52
blackmesa1 left00:52
aeyxa joined00:56
raffo left00:56
hofmann3900 joined00:56
Achylles left00:59
de-facto left01:01
de-facto joined01:01
vishal left01:05
brandonkal left01:06
vishal joined01:07
raffo joined01:09
ozcanesen left01:11
mjsir911 joined01:11
m0viefreak left01:13
mat001 left01:15
yohnnyjoe joined01:17
kerframil left01:18
kerframil joined01:18
raffo left01:21
mobile_c left01:27
kjartan left01:32
kjartan joined01:34
raffo joined01:35
mjsir911 left01:35
rafasc left01:46
Sasazuka left01:46
orbyt_ joined01:52
ozcanesen joined01:55
xrexeon left01:58
ozcanesen left02:02
finalbeta joined02:06
thiago left02:10
justanotheruser joined02:10
eb0t joined02:11
eb0t_ left02:13
mowcat joined02:13
aeyxa left02:16
mat001 joined02:17
mat001 left02:18
mat001 joined02:18
mjsir911 joined02:19
mobile_c joined02:20
skyikot joined02:26
renich joined02:28
renich_ left02:29
F0rTex left02:30
F0rTex joined02:31
null1337 left02:43
null1337 joined02:44
renich left02:51
bjpenn j416 , vishal thanks for your feedback above02:55
im reading into how to use the reflog now02:56
seems like reflog is like an activity log02:56
hopefully i can revert back02:56
revert back to the point before i rebased on top of master02:56
SleePy left02:57
SleePy joined02:59
null1337 left03:00
polyrob left03:00
nuc left03:00
polyrob joined03:02
igemnace joined03:04
bjpenn in my reflog i can see that it keeps track of all my activity, and keeps of track of me switching branches and the entry in the reflog also corresponds that to a hash and HEAD@{XX}03:05
is it possible for me to reset it to that point in time?03:05
stitched_unicorn joined03:06
blackbaba joined03:06
cfoch left03:09
blackbaba left03:09
lagothrixGuest7252903:09
Guest72529 left03:09
lagothrix joined03:10
awkwords joined03:11
bjpenn looks like it worked03:15
inkbottle left03:16
bjpenn just using git reset HEAD@{XX} , where HEAD@{XX} corresponds to the most recent commit acitivity i wanted to go revert to, worked03:16
i didn't try reseting to a commit hash referencing a branch switch though03:16
davidfetter joined03:22
davidfetter hi03:22
Is there any way using only git to see that a flock of patches was part of a particular pull request?03:22
thiago joined03:32
mowcat left03:36
Dirak left03:47
igemnace left03:48
igemnace joined03:50
wolfshappen left03:59
wolfshappen joined04:01
jungsubk left04:02
yohnnyjoe left04:07
diogenese left04:11
diogenese joined04:11
mobile_c left04:12
orbyt_ left04:12
wyre left04:14
Cabanoss- joined04:14
Cabanossi left04:14
Cabanoss-Cabanossi04:14
Goplat joined04:18
energizer` joined04:18
xcm left04:18
xcm joined04:18
energizer` when i get merge conflicts i get these things >>>>>>>> and <<<<<<<<<<<<<<04:19
am i supposoed to manually edit those things away?04:19
kerframil left04:21
topdownjimmy left04:21
topdownjimmy joined04:21
davidfetter energizer`, yep04:22
pick one side, the other, or a mix, and remove the lines with those >>>>>>>>>>>>>>>>>>>>> and <<<<<<<<<<<<<<<<<<<<< on them04:22
keepLearning512 joined04:23
energizer` davidfetter, alright. i'm honestly a bit surprised i don't see >>>><<< appearing in source code by accident, it seems like an easy mistake to just miss one04:23
davidfetter they're there because they're really easy to find with any editor's search functionality04:24
zulutango left04:26
keepLearning512 left04:28
client35 joined04:31
zulutango joined04:35
client35 How would I go about pulling certain branches down that had changes made to them? For example, I have "a" branch, that I'm merging everything into before merging into master. I'm currently working on some code in "b" branch as well as "c" branch. However, when I try pulling git pull origin b I lose files from a and vice versa04:37
I did stash my code locally b/c I had made changes that were going to be overwritten, but wasn't sure if I needed to repull the entire repo?04:37
esenegoid joined04:37
diogenese left04:38
esenegoiddiogenese04:38
jungsubk joined04:41
awkwords left04:42
howdoi joined04:43
zulutango left04:47
mobile_c joined04:48
__rohit joined04:51
miczac joined04:53
zulutango joined04:58
__rohit left04:58
__rohit joined04:59
mal10c joined04:59
dre_ joined05:01
pks_ joined05:02
pks left05:02
pks_pks05:02
v01d4lph4 joined05:05
v01d4lph4 left05:05
v01d4lph4 joined05:05
kadoban left05:07
client35 :/05:10
zulutango left05:12
boombatower left05:13
davidfetter client35, this isn't a super active channel. are you more a merger or a rebaser?05:16
client35 Ah okay, is there a more active channel, maybe slack or discord? I'm kind of new to git - I know how to clone, push pull, checkout branches and push those but I don't have much experience with merging or rebasing I'm afraid05:17
mven_ left05:20
ym555 left05:20
zulutango joined05:22
davidfetter I believe this is it. I'm kinda new to it, too, so please bear with me.05:22
what do you mean by "stash my code locally?" is that as in git checkout foo && hackety-hack-hack && git stash05:22
?05:22
client35 No worries, thank you for the help either way :)stash locally meaning I05:23
mjsir911 left05:23
client35 err, trying to do new line lol - git stash, rather, just to save some code05:23
It stashed changes I made to a file locally. Don't worry about it now though because I ended up re-cloning the repo to start over; thank you though.05:24
I appreciate it05:25
cdown joined05:28
skyikot left05:33
deltab left05:34
rsrx joined05:35
bn_work left05:36
tsdh joined05:37
keepLearning512 joined05:38
deltab joined05:41
keepLearning512 left05:44
miczac left05:44
skyikot joined05:45
jungsubk left05:48
notmike stash is a myth perpetrated by the government order to further subjugate the black man05:48
justanotheruser left05:49
stitched_unicorn left05:53
cdown left05:54
justanotheruser joined05:57
__rohit left05:57
miczac joined05:58
jungsubk joined06:13
mobile_c left06:16
energizer` left06:17
opalepatrick left06:29
rsrx left06:30
client35 left06:32
Cabanossi left06:39
miczac left06:41
plexigras joined06:42
de-facto left06:45
Cabanossi joined06:46
de-facto joined06:49
oojacoboo left06:53
skyikot left06:59
osse Correct07:00
stitched_unicorn joined07:05
lowbro joined07:07
rsrx joined07:07
sauvin joined07:09
wxg joined07:16
stitched_unicorn left07:17
netj left07:26
Trieste left07:26
Trieste joined07:28
netj joined07:28
Goplat left07:31
thiago left07:32
miczac joined07:32
chele joined07:34
netj left07:42
netj joined07:45
n3wborn joined07:46
mven_ joined07:46
kjartan left07:47
irc_viewer_test joined07:48
oxymoron93 joined07:49
supernov1h joined07:50
kjartan joined07:51
mven_ left07:52
Makaveli7 joined07:53
irc_viewer_test left07:55
xcm left07:59
xcm joined08:00
zulutango left08:06
gxt left08:07
theoceaniscool joined08:09
zulutango joined08:10
sQVe joined08:11
dege joined08:15
interrobangd joined08:15
wxg left08:18
mat001 left08:39
rsrx left08:40
hussam left08:45
blackmesa joined08:46
SuperLag left08:48
gxt joined08:49
keepLearning512 joined08:53
sjoshi left08:54
Sleepy63 left08:55
SuperLag joined08:55
hussam joined08:58
miczac left09:01
YuGiOhJCJ joined09:01
floppydh joined09:03
mikecmpbll joined09:06
tsdh osse: Just got the "git status" shows modified but "git diff" shows nothing again.09:06
bjpenn left09:06
tsdh git commit -am "foo" created no commit and git status still showed the modification.09:07
git add <modified_file> staged nothing, but now git status is silent again.09:07
Inline left09:08
atrigent left09:08
sQVe left09:08
netj left09:08
hofmann3900 left09:08
hofmann3900 joined09:09
netj joined09:11
esotericnonsense left09:12
osse tsdh: are you on a weird file system by any chance?09:13
howdoi left09:14
davidfetter left09:15
tsdh osse: ext4 but I use autocrlf=input and work in a mostly-windows show where we have a wild mix of files with LF-EOL and CRLF-EOL...09:15
s/show/shop/09:16
osse tsdh: compare file thatfile.java and git show HEAD:thatfile.java | file -09:16
netj left09:16
rafalcpp left09:17
pyfgcr left09:18
esotericnonsense joined09:18
esotericnonsense left09:18
queip left09:18
esotericnonsense joined09:19
pyfgcr joined09:20
netj joined09:22
nixroot joined09:23
WhereIsMySpoon joined09:23
WhereIsMySpoon Is anyone able to tell me why if I close a pr on github then rebase+force push, I cant then reopen the pr? Does the rebase/force push do something to the branch that github cant deal with?09:24
grr12314 joined09:25
dpyro left09:25
osse WhereIsMySpoon: do you get an error message?09:25
WhereIsMySpoon the button is just greyed out09:26
tsdh osse: Same as yesterday, both are "Java source, UTF-8 Unicode text".09:27
osse WhereIsMySpoon: https://gist.github.com/robertpainsi/2c42c15f1ce6dab03a0675348edd4e2c09:27
tsdh: try git update-index --really-refresh09:27
WhereIsMySpoon ive seen that09:27
i want to know _why_09:27
not how to fix it09:27
:)09:27
osse I have no idea09:27
https://github.com/isaacs/github/issues/361#issuecomment-11429703409:28
floppydh someone got impressions of https://gerrit.googlesource.com/git-repo/ ?09:28
Noti joined09:28
floppydh feels like there's still a need for something that integrates multiple git repositories09:28
canton7 WhereIsMySpoon, because "github only lets you re-open a PR if the branch it was opened from hasn't changed", presumably. None of us work at github, so we can't explain why they made that decision09:28
WhereIsMySpoon thats...weird09:29
"> because there is no good way to tell what changes have happened while a pull request was closed and the head branch has changed." surely you can just diff the changes and keep going09:29
canton7 diff from what? the commit will probably have been garbage-collected09:29
WhereIsMySpoon oh really09:29
nixroot left09:29
WhereIsMySpoon im unaware of garbage collection of commits/git refs etc09:29
osse But does it matter what happened during the time it was closed?09:30
mimajof joined09:30
tsdh osse: Since after "git add"-ing the modified file, it's not shows in git status anymore (neither as staged nor unstaged), I guess I'll have to wait until I'm in the modified-but-no-diff situation again, right?09:30
canton7 WhereIsMySpoon, garbage collection of unreachable objects is a big part of git's management of its object database09:30
WhereIsMySpoon i see :)09:30
canton7 man git gc09:30
gitinfo the git-gc manpage is available at https://gitirc.eu/git-gc.html09:30
osse tsdh: I guess. you can try 'git reset' to see if that changes anything, but I doubt it will09:30
tsdh osse: Nope, nothing.09:31
hofmann3900 left09:31
hofmann3900 joined09:32
osse tsdh: do you have any idea of what might have happened? Did you modify the file, save, undo then save again or something like that?09:32
WhereIsMySpoon osse: if theres no previous commit or HEAD tracking then surely you wouldnt be able to reconstruct history and give the nice commit change history view they provide?09:34
osse WhereIsMySpoon: No, but in that case they could just display the PR as if it was new09:35
cbreak git commits always refer to their ancestors, if there are any09:35
canton7 they might keep references to commits referenced by closed PRs, I don't know. I'm speculating, as that's the only thing any of us can do09:35
maybe it's simply a matter of "we haven't paid for the work to support this yet" /shrug09:36
sQVe joined09:36
mikecmpbll left09:38
mikecmpbll joined09:39
Inline joined09:40
tsdh osse: It always happens when I merge or cherry-pick from another branch. It's quite likely that in that branch, the file has another EOL encoding. And I think it happens only for files where I have a conflict that I need to fixup.09:40
yyy joined09:41
grr12314 left09:41
tsdh osse: On a related note, I sometimes get files marked as conflicting in a merge but when I consult them, there are no conflict markers at all.09:42
floppydh what's your most liked alternative to git-submodules?09:43
ben914 joined09:48
miczac joined09:50
jokajak left09:56
localhorse joined09:57
localhorse how can i rebase my local commit to master on top of origin/master without creating a temp local branch?09:58
osse tsdh: Everything sound weird. I would toss the PC out the window, quit and become a furniture carpenter09:58
localhorse the situation is: someone else committed and pushed to master first09:58
i want to rebase on his commit09:58
osse localhorse: git rebase origin/master09:58
assuming you're on master09:58
localhorse osse: not git pull --rebase origin/master ?09:58
osse that works too09:58
localhorse ok thanks09:59
wolfshappen left09:59
osse my solution assumes you have fetched first. pull --rebase fetches09:59
localhorse ok10:00
and another situation: feature2 branch forked off feature1 branch that forked off master. now feature1 was rebased on top of master. what to do with feature2 to also rebase it on top of the rebased feature1 branch?10:00
osse git rebase --onto=feature1 feature1{1}10:00
ehh10:00
git rebase --onto=feature1 feature@{1}10:00
ehh10:00
git rebase --onto=feature1 feature1@{1}10:00
localhorse why not git rebase origin/feature1 ?10:00
wolfshappen joined10:01
dhollin3 joined10:01
zulutango left10:01
interrobangd left10:03
dhollinger left10:04
venmx joined10:05
achadwick joined10:05
ben914 left10:06
supernov1h left10:07
oxymoron93 osse that command assumes one has checked out feature2 right?10:07
gthm I have some SVN repos I plan on converting to Git. The repos have large binaries checked in, so I'd like to involve Git LFS. Does anyone have experience with "retrofitting" Git LFS to an existing repo?10:07
supernov1h joined10:08
gthm As SVN history is linear, I can imagine rebasing .gitattributes with the LFS definitions to the start of the history, and then writing some gnarly Perl to walk the history and rewrite the commits that involve binary files to use LFS10:08
but maybe someone already came up with a better idea10:09
Krafter joined10:09
miczac left10:12
cbreak gthm: something like that was described in some git lfs docs I read years ago I think10:13
YuGiOhJCJ left10:14
YuGiOhJCJ joined10:14
dustinm left10:15
gthm ha! bfg has a --convert-to-git-lfs option10:16
dustinm joined10:17
gthm no perl/dogfood for gthm tonight10:17
dustinm left10:17
supernov1h 110:19
dustinm joined10:20
blackmesa left10:20
Makaveli7 left10:23
blackmesa joined10:27
Krafter So, I have a workflow issue. Here is what I do.10:36
1. I checkout a new branch feature-1 from branch master.10:36
zulutango joined10:37
Krafter 2. I edit my code and make a few commits.10:37
3. I push the branch and ask for review of my PR.10:37
4. Before the PR has been accepted I create a new branch of off feature-1 called feature-2.10:37
5. I make a few more commits on feature-210:37
6. feature-1 has been approved and squash merged.10:37
7. Now the new feature-2 will have a bunch of "junk commits" from the old feature-1 branch.10:37
How can I get rid of those?10:37
I know that I work off the assumption that the PR of feature-1 will be accepted.10:38
supernov1h does git diff and git apply care about what commits are in place10:42
n3wborn left10:42
supernov1h I have two identical repos, fetched to the latest revision, and checked out at the same commit but one has a bunch of stuff I want to make a patch of, send to another pc and apply10:42
where I expect to commit10:42
WhereIsMySpoon left10:43
osse oxymoron93: yes10:44
localhorse: you said you wanted to rebase on top of feature110:44
so why origin/feature1 ?10:44
dre_ left10:45
supernov1h I ended up having to run diff -urN <(./path/to/file) <(git show <hash>:./path/to/file), modifying the path spec to match and then manually applying patches on a per-file basis10:45
when I ran git apply it just said "patch does not apply" for all files10:45
osse git apply is very strict. I've had better results with patch10:46
supernov1h: if what you want to make patches of are commits, then git format-patch is the tool to use10:47
supernov1h osse: no I just wanted a patch tool that understood the git pathspec and could diff stuff quickly10:48
osse sounds like git diff to me :O10:48
supernov1h exactly, but like I said, git apply said patch does not apply10:48
after manually patching everything, the output of git diff -w is identical on both computers now10:49
osse if the two repos are on ther same commit, how can one have a bunch of stuff the other doesn't?10:50
tsdh osse: Hehe, I'm already working in the furniture industry! ;-)10:51
supernov1h patching and git have nothing to do with eachother10:51
gthm Krafter: The only thing I can think of is to create a new branch off master once feature-1 is merged and squashed ('feature-2-no-really-this-time') and cherry-pick your commits from feature-2 into it10:51
supernov1h git just understands the filesystem of a git archive10:51
when it comes to generating a diff10:51
Achylles joined10:52
Krafter gthm: Thanks!10:52
osse Krafter: git rebase --onto is your friend10:53
git rebase --onto=feature-1 {last junk commit}10:53
Krafter: i re-read your question: git rebase --onto=master feature-110:54
justanotheruser left10:54
pix9 left10:55
Krafter osse: Doesn't rebase unlike most commands modify both branches?10:55
osse Krafter: no10:55
gthm osse: will that deal with the squashed commits?10:55
osse gthm: yes10:55
Krafter: git rebase --onto=master feature-1 will take all commits in the range feature-1..HEAD and put them on top of master10:55
Krafter: so --onto=X takes the same commits rebase would normally concider, but put them on top of X instead10:56
yyy left10:56
lankanmon left11:00
Krafter osse: Thanks!11:01
osse Krafter: in the last two commands i am assuming that feature-1 still points to the same commit as immediately before the merge --squash11:02
tombusby left11:03
tombusby joined11:03
cebor left11:04
cebor joined11:04
osse supernov1h: agreed. but I realize now I'm lost as to what you're doing. To answer your original answer, the question is no11:10
supernov1h I can't figure out why git apply would refuse the output of git diff11:10
I can run git diff, output it to a file, reset --hard and then run git apply on the file and it refuses to apply it11:11
why?11:11
osse you can try git apply --reject, then it behaves more like patch would, ie. apply what it can and generate reject files for the rest11:11
hmm, have you configured diff to ignore whitespace/line endings or stuff like that by default ?11:11
supernov1h osse: whitespace yes11:12
usually I run git diff -w11:12
osse that could be it then11:12
git apply --ignore-whitespace maybe11:12
supernov1h I ran the output of both through sha256 and the hashes are the same11:12
eh, for now its just a super laborious process of running it through diff -urN with the <(git show <hash>:./path/to), manually replacing the file path in the diff output and applying it on the other system11:14
osse how do you apply it on the other system?11:14
supernov1h patch <(cat -Rp1 the.patch)11:15
p1 because I like leaving the ./ pathspec in there11:15
osse I would try using patch with the git diff output11:15
supernov1h sorry, patch -Rp1 <(the.patch)11:15
sec11:16
sQVe left11:17
supernov1h fails on some hunks11:18
oh hey, so the output for -w IS different, how did I skip over that, the hashes were different... and it works with the output of git diff11:18
osse then git apply --ignore-whitespace probably works too with diff -w11:19
supernov1h so `git diff > 23-02-2019.patch`, on other system: `patch -p1 < ./22-02-2019.patch`11:19
pix9 joined11:20
osse yep, that's how it should be11:20
or you could actually make a commit and apply that on the other side :P11:20
supernov1h yeah so there's a major merge conflict going on here, that's why I'm doing this on Saturday morning11:20
osse straya ?11:21
supernov1h nz kent11:21
osse makes sense11:22
I'm just back from friday lunch :P11:22
supernov1h lol at lunch I watched a woman get sentenced, actually two women, they let one off four assault charges because she went to rehab and had apparently been given the wrong meds or some bollocks11:23
said that played to her benefit, the fact that her family could afford to send her to a $25k rehab in Thailand11:23
mohabaks joined11:24
mowcat joined11:25
wildermind joined11:27
jim left11:31
jim joined11:31
rakm joined11:32
achadwick left11:33
supernov1h the judge said that rather, talk about privelege11:35
rakm left11:41
tarkus joined11:44
adgtl joined11:46
lankanmon joined11:47
yyy joined11:47
wxg joined11:48
keepLearning512 left11:48
mven_ joined11:50
Achylles left11:51
yyy left11:52
staafl_ joined11:53
yyy joined11:54
mven_ left11:54
hussam left11:55
adgtl left11:56
kjartan left11:59
Krafter left11:59
miczac joined12:00
YuGiOhJCJ left12:01
greatgatsby left12:01
mohabaks left12:01
kjartan joined12:01
keepLearning512 joined12:09
keepLearning512 left12:09
Noti left12:14
tarkus left12:20
wxg left12:20
Makaveli7 joined12:23
emsjessec joined12:23
lucasb joined12:25
Achylles joined12:26
gxt left12:27
staafl_ left12:28
gxt joined12:29
Kaisyu left12:29
staafl_ joined12:30
rsrx joined12:31
adder left12:34
CodeSlingerPaul joined12:35
tjbp left12:36
gxt left12:37
tjbp joined12:37
rjsalts left12:38
rjsalts joined12:38
gxt joined12:38
CryptoDavid joined12:39
Essadon joined12:43
Essadon left12:43
Essadon joined12:44
bulletmark joined12:44
wxg joined12:44
AtumT joined12:50
wxg left12:52
gxt left12:52
gxt joined12:53
totte left12:54
supernov1h left12:56
bulletmark left13:00
totte joined13:02
SpeakerToMeat left13:05
tsdh left13:07
Achylles left13:08
skered left13:12
inkbottle joined13:17
Trieste left13:19
mowcat left13:21
Trieste joined13:21
sjoshi joined13:23
n-st left13:25
xcm left13:26
miczac left13:26
xcm joined13:27
xcm left13:28
xcm joined13:29
Makaveli7 left13:32
gxt left13:33
gxt joined13:34
venmx left13:35
chaosruler joined13:37
venmx joined13:37
chaosruler left13:38
Achylles joined13:41
sborza joined13:43
royal_screwup21 joined13:43
royal_screwup21 Looking at a project where a contributor made 500 additions 90 deletions, in ONE commit. Short of actually making those changes in one commit, is there any other explanation how that could have happened?13:45
osse royal_screwup21: those numbers sound reasonable to me13:45
maybe indentation was changed. that can blow up those numbers13:46
rts-sander maybe they squashed a bunch of smaller commits13:46
royal_screwup21 ah I see13:47
is squashing good practice though? I mean the tree is basically reset so you can't ever go back to an intermediary point you squashed13:48
xcm left13:48
xcm joined13:48
osse royal_screwup21: depends on why you're squashing13:49
royal_screwup21 looking at it again, it's 900* additions, not 50013:49
osse those numbers aren't huge. maybe it makes complete sense13:49
rts-sander it depends on how you look at it, some prefer high granularity in their commits13:49
in some teams even large features have to be squashed so that they can find the original ticket / reasons for introducing the change13:50
sborza left13:56
cd joined13:56
sborza joined13:57
kjnilsson joined13:58
kjnilsson left13:59
totte left14:00
sQVe joined14:00
totte joined14:03
Mattiaslndstrm left14:07
Seveas I've had commits with thousands of additions and deletions when vendoring dependencies for example14:08
or just with thousands of deletions when cleaning up. Those are satisfying :D14:08
queip joined14:14
staafl__ joined14:15
awkwords joined14:15
cbreak I've seen commits that deleted 90% of the repository...14:17
Foxboron cbreak: Someone removed the accidental commit of node_modules?14:18
Foxboron hides14:18
skered joined14:18
cbreak someone decided that the code was not salvageable and rewrote it14:19
jnewt_ joined14:19
jnewt_ left14:19
skered left14:20
mkarray joined14:22
Noti joined14:23
chaosruler joined14:24
Inline left14:25
Inline joined14:25
awkwords_ joined14:27
fahadash joined14:28
mkarray left14:28
awkwords left14:29
n-st joined14:31
GreenJello left14:31
GreenJello joined14:35
staafl_ left14:35
mat001 joined14:36
xcm left14:37
xcm joined14:37
mven_ joined14:39
howell joined14:42
tarkus joined14:43
chaosruler left14:43
miczac joined14:47
chaosruler joined14:47
Envil joined14:48
orbyt_ joined14:50
Envil left14:51
Envil joined14:52
rafalcpp joined14:53
habbah left14:54
miczac left14:56
Makaveli7 joined14:56
ym555 joined14:57
boombatower joined14:58
govg left14:58
justanotheruser joined14:59
Mattiaslndstrm joined15:01
chachasmooth joined15:10
igemnace wow if he cut it down to 10% and still passed the tests, that's really something15:10
de-facto left15:10
chachasmooth_ left15:11
de-facto joined15:11
hexnewbie left15:15
davidfetter joined15:17
keepLearning512 joined15:17
mimajof left15:17
millerti joined15:18
blackmesa left15:18
hexnewbie joined15:20
yn left15:21
yn joined15:27
baako joined15:27
Mattiaslndstrm left15:28
orbyt_ left15:29
dudek joined15:29
Noti left15:33
hussam joined15:36
tarkus left15:36
maryo joined15:37
v01d4lph4 left15:38
dhollin3dhollinger15:38
skered joined15:40
AbleBacon joined15:40
leeN joined15:44
thiago joined15:45
sandromehic joined15:48
oxymoron93 left15:51
PioneerAxon left15:53
raffo left15:53
PioneerAxon joined15:57
Inline left15:57
yuriii left15:57
igemnace left15:59
Getafix74 joined15:59
wolfshappen_ joined16:01
wolfshappen left16:01
Inline joined16:02
pyfgcr left16:03
jim left16:04
jim joined16:04
jim left16:05
lowbro left16:05
lesshaste left16:06
Achylles left16:07
fission6 joined16:07
jim joined16:08
treehug88 joined16:08
rafasc joined16:10
irc_viewer_test joined16:16
chele left16:18
PioneerAxon left16:18
PioneerAxon joined16:18
thiago left16:19
maryo left16:20
sQVe left16:20
fission6 left16:23
manuelschneid3r joined16:26
maryo joined16:32
_noblegas joined16:33
maryo left16:36
maryo joined16:37
yyy- joined16:38
yyy left16:41
skyikot joined16:42
maryo left16:43
sandromehic left16:43
mowcat joined16:43
R2robot left16:44
Bradipo joined16:46
\void joined16:47
Bradipo Is there a possibility that git fetch --all will cause previously committed code to disappear?16:47
jamiejackson joined16:47
Bradipo e.g. if the sequence of commands is: git commit -a; git fetch --all16:47
cdown joined16:48
tafa2 joined16:48
rafasc Bradipo: no.16:49
Bradipo Ok, that's kind of what I thought.16:49
Somehow some code that I moved in a file came back and I'm unsure how it happened.16:49
rafasc fetch only updates the remote tracking branches. And they're read-only.16:49
Arsenick joined16:49
Bradipo So the file ended up with the original code and the new code, and git blame shows both the commit where the code was inserted and the commit where it was moved.16:50
Which seems like a paradox.16:51
irc_viewer_test left16:51
tarkus joined16:52
tarkus left16:52
tarkus joined16:52
fission6 joined16:53
rafasc how is that a paradox?16:53
maryo joined16:55
SpeakerToMeat joined16:58
opalepatrick joined16:59
awkwords_ left17:01
Bradipo Because there is no commit that shows how they both got in there.17:03
One commit says it was added, another commit shows the lines moved, and both sets of lines are in the current file.17:04
How did both get there?17:04
rafasc Bradipo: probably a mismerge?17:04
Bradipo That's what I'm wondering, but shouldn't the mismerge be recorded?17:04
Is it possible to track where the lines were reintroduced?17:04
rafasc in git everything is recorded.17:04
mikecmpbll left17:04
rafasc you can search for commits that match a regex with git log -G 'pattern'17:05
Bradipo So commits that match the lines?17:05
rafasc or -S17:05
floppydh left17:06
rafasc -S ignore moves and isn't regex.17:06
Bradipo: is your repository publicly available?17:06
Bradipo No, it's internal.17:07
And there are others who commit, so it's entirely possible someone did something strange.17:07
But I'm trying to figure out how it happened so I can instruct on how to avoid it. :-)17:07
rafasc well, if someone did something strange it will be there recorded in the history.17:07
Bradipo That's what I thought, but so far I haven't been able to find that record.17:08
keepLearning512 left17:08
baako left17:09
rafasc Bradipo: It could be as simple as someone resolving conflicts wrong.17:09
Bradipo Sure, but then that should show up as a conflict resolution commit.17:09
And I don't see such a thing, but maybe I just haven't looked hard enough.17:10
rafasc as in, they' took both sides of the conflict and finished the merge.17:10
Bradipo Right, that would make sense.17:10
client35 joined17:10
client35 if I'm working on multiple branches, i.e. each branch is for different features that eventually get merged into a main repo and then that gets merged into a master repo, is it normal to do this?17:10
I have a login.py script that is in branch "b" and api script in branch "c"17:10
kneeki joined17:12
rafasc Bradipo: not sure how else I can help you. blame, log -S/-G, and !lol.17:12
gitinfo Bradipo: A nifty view of branches, tags, and other refs: git log --oneline --graph --decorate --all17:12
rafasc That should be enough to find anything that happen. You just need to look in the right places. Having a neat history helps. Which may not be the case.17:13
Achylles joined17:14
rafasc client35: That's sounds completely fine.17:15
fission6 left17:15
rafasc not sure if the separating in repos is necessary though.17:15
you could have something like two branches instead of those two repos.17:16
feature branch merges into dev branch, dev branch merges into master.17:17
CryptoDavid left17:17
Regon joined17:17
rafasc You can even setup your host to prevent pushing to these two 'protected branches' directly.17:17
wpkeg left17:18
ym555 left17:20
client35 two branches, rather, sorry rafasc17:21
Bradipo rafasc: Thanks, I'll keep looking.17:21
rafasc client35: then it sounds completely fine. Very similar to !flow17:22
gitinfo client35: [!gitflow] The description of the gitflow branch workflow model is at http://nvie.com/posts/a-successful-git-branching-model/ while a tool to help implement this workflow is at https://github.com/petervanderdoes/gitflow See http://sethrobertson.github.com/GitBestPractices/#workflow for other workflow suggestions/references17:22
client35 master branch hasn't been merged/pushed to yet as my friend and I are only working on separate main branches17:22
adgtl joined17:22
client35 ah okay17:22
DannyButterman joined17:22
DannyButterman Hi there17:23
gitinfo DannyButterman: hi! I'd like to automatically welcome you to #git, a place full of helpful gits. Got a question? Just ask it — chances are someone will answer fairly soon. The topic has links with more information about git and this channel. NB. it can't hurt to do a backup (type !backup for help) before trying things out, especially if they involve dangerous keywords such as --hard, clean, --force/-f, rm and so on.17:23
maryo left17:25
DannyButterman I'm new to git, and I want to update the remote repos with my last updates. git pull, then commit then push throw me errors I don't understand :17:25
"error: Your local changes to 'some file' would be overwritten by merge. Aborting. Please, commit your changes or stash them before you can merge.17:26
So I do git commit -m some message17:26
v01d4lph4 joined17:27
DannyButterman and a list of modified files is displayed( that I didn't modify actually ???) . It ends with :17:28
# Untracked files:17:28
# (use "git add <file>..." to include in what will be committed)17:28
#17:28
# .buildpath17:28
# .settings/17:28
no changes added to commit (use "git add" and/or "git commit -a")17:28
rts-sander DannyButterman, someone else upstream made a change and it's conflicting with your change17:30
rafasc DannyButterman: that means the merge is trying to overwrite a file you have uncommitted modifications.17:30
rts-sander DannyButterman, try git pull --rebase and fix your commits17:30
DannyButterman, of course after you abort the current failed merge with git merge --abort17:30
DannyButterman git pull --rebase did the trick !! thanks :)17:31
orbyt_ joined17:31
craftyguy left17:32
rts-sander left17:32
craftyguy joined17:32
rafasc be sure you understand the dangers of --rebase !rewrite17:32
gitinfo Rewriting public history is not recommended. Everyone who has pulled the old history will have to do work (and you'll have to tell them to), so it's infinitely better to just move on. If you must, you can use `git push --force-with-lease <remote> <branch>` to force (and the remote may reject that, anyway). See http://goo.gl/waqum17:32
crater2150 left17:34
misuto joined17:35
DannyButterman Sure I don't have much clue about what it all means. It seems like answers to complicated issues that I don't have. Just locking file that I work on would be enough for me :s17:35
adder joined17:36
m0viefreak joined17:36
craftyguy left17:36
crater2150 joined17:37
craftyguy joined17:38
causa_sui joined17:38
nowhere_man joined17:41
steppentyu joined17:41
Makaveli7 left17:45
Makaveli7 joined17:45
fission6 joined17:46
keepLearning512 joined17:47
crater2150 left17:49
cmosguy hello git experts, my team and I are using `git flow` for our features, so we do a `git flow feature start ABS-01_some_branch`17:50
the issue we are having is when we finish a feature, we lose the ability to track the branch `ABS-01_some_branch` feature name17:50
is there a tip or way to get some tagging involved for this automatically?17:50
Sleepy63 joined17:51
blipz joined17:52
tjbp left17:53
DannyButterman Bye guys thanks17:55
DannyButterman left17:55
rafasc DannyButterman: git was designed precisely to avoid the need of those 'locks'. You work on files without worrying about locks then resolve the conflicts when they arive...17:55
tjbp joined17:55
rafasc cmosguy: what do you mean by lose the ability to track?17:56
mowcat left17:57
rafasc does 'git flow' delete the branch when you decide to merge? (finish?)17:57
cmosguy @rafasc basically when i loot at all my commits and messages, I have no way to really see the original branch name that was used to facilitate a specific Jira ticket17:57
for example I have a jira ticket called `ABS-01`, when i create a feature I call it `ABS-01-some-feature`17:58
i want to see all my history and find this old infor17:59
_ikke_ The convention is that the merge commit message describes what branch was merged in17:59
cmosguy: I would not use refnames as permanent records of history18:00
mikecmpbll joined18:00
gxt left18:00
rafasc it is encouraged by the default merge message, but not compulsory.18:01
_ikke_ right, hence convention18:01
gxt joined18:01
rafasc some people use trailers in the merge commit message with additional information.18:01
_ikke_ But the merge commit message is the place to record these kinds of things18:01
rafasc ticket-id: blablabla18:02
totte left18:07
grawity I'd make a commit hook that automatically adds a jira URL into the commit message18:09
totte joined18:10
chaosruler_ joined18:18
venmx left18:19
chaosruler left18:19
theoceaniscool left18:22
causasui left18:23
fstd_ joined18:23
awkwords joined18:23
hofmann3900 left18:24
estodiMania joined18:27
fstd left18:27
fstd_fstd18:27
orbyt_ left18:27
client35 left18:31
jungsubk left18:32
cmosguy @grawity that sounds like an interesting idea18:32
thanks @_ikke_ and @rafasc I'll take these ideas into consideration18:32
Darcidride joined18:33
R2robot joined18:34
v0lksman joined18:34
v0lksman hey all! hopefully someone is willing to discuss this with me but basically I'm trying to figure out the best work flow when dealing with a dev branch. Let's say I have a master that is our production stable code. I then create a dev branch that will get a bunch of new features. I make security fixes to master on a regular basis and want those included in the dev branch so we can test to ensure dev is18:36
stable before bringing it back inline to master.18:36
I know of using rebase from the dev branch as "git rebase master" and there is also "git merge master". Can't wrap my head around why I would use one over the other18:37
mjsir911 joined18:37
v0lksman like is it safe to continually rebase master after every change to make it part of dev? or am I better off merging the two?18:39
freeman42x joined18:40
rafasc v0lksman: merge and rebase are two ways to bring together histories that diverged. Both have pros and cons.18:40
fission6 left18:41
rafasc merge will create a commit that points merges multiple endpoints (branches) together.18:41
ym555 joined18:42
rafasc rebase will take the commits from a branch, and recreate them on top of another branch.18:43
SkarmoutsosV joined18:43
fahadash left18:44
v0lksman ok so lets say I make changes to master and want them on dev, so I rebase, and continue to add to dev, then I make another change to master, do I rebase again? It seems that rebase goes back to the first divergence always not what has already been rolled into dev. Is that correct?18:44
_ikke_ v0lksman: yes, you need to rebase again18:45
rafasc ^ and that's one of the "problems" of rebase.18:45
rsrx left18:45
_ikke_ Not so sure if it's a problem18:45
v0lksman yeah cause that's a lot of work each time I want to apply changes made to master18:46
well it can be a lot of work18:46
in my current situation it's a lot of work18:46
:)18:46
rafasc if you have feature branches that branch of dev, you'll have to rebase them too.18:46
v0lksman yeah let's not confuse things just yet18:46
again just trying to figure out best work flow to ensure that security changes to master are added to dev so we can test the full solution before promoting the code back to master for production use18:47
sounds like I should be merging though18:49
SkarmoutsosV left18:52
orbyt_ joined18:52
SkarmoutsosV joined18:52
rafasc v0lksman: with all due respect, I don't think you understood the difference between rebase and merge yet.18:55
Sasazuka joined18:55
ghormoon left18:55
rafasc both will equally allow you to include the security fixes in your branches.18:55
how that history is recorded is what changes.18:55
ghormoon joined18:58
in1t3r left19:01
in1t3r joined19:01
fission6 joined19:04
atrigent joined19:04
v0lksman rafasc: yes but it seems that if I use rebase I have to reapply changes if I need to rebase multiple times. Where if I merge, once I do that those changes won't be retried on the next merge, only new changes (commits) will19:06
v01d4lph4 left19:07
Darcidride left19:07
royal_screwup21 left19:07
blackmesa joined19:07
maunix_ joined19:08
Inline left19:08
Inline joined19:08
royal_screwup21 joined19:09
royal_screwup21 left19:11
Bradipo v0lksman: You can certainly merge. With git, a lot of attention is placed on making the history look nice, and --rebase helps you do that. If you don't care about that, I'm not sure there is a compelling reason to use rebase vs merge.19:13
yyy- left19:15
yyy- joined19:15
awkwords_ joined19:18
cdown left19:19
awkwords left19:20
assemblyman joined19:22
grumble`-_-`grumble19:22
Dirak joined19:23
jwest left19:23
sauvin left19:24
yyy- left19:24
AbleBacon left19:25
oprypin left19:26
gxt left19:26
`-_-`grumblegrumble19:36
xrexeon joined19:36
xrexeon left19:37
xrexeon joined19:37
mjsir911 left19:46
skered left19:46
atrigent left19:49
stitched_unicorn joined19:50
skered joined19:51
stitched_unicorn left19:52
Bradipo rafasc: I found the problem; there was a merge conflict.19:52
I guess git log -S doesn't search through merge conflicts?19:52
stitched_unicorn joined19:53
rafasc I think it does. But -S doesn't consider 'moved lines'19:53
you need -G for that.19:53
Bradipo Ahh.19:53
And conflict resolution creates moved lines?19:53
atrigent joined19:54
rafasc if you move lines as part of your resolution I guess...19:54
Bradipo Right, because it shows the lines I moved with a normal commit.19:54
I'll try log -G now to see if it finds it.19:55
rafasc Bradipo: also, forgot to mention. If you know a before and after state, you can use git bisect to find the commit where it changed.19:55
tarkus left20:02
Dirak left20:05
stitched_unicorn left20:08
wildlander joined20:22
Dirak joined20:23
xcm left20:32
xcm joined20:32
rkta left20:35
rkta joined20:35
oprypin joined20:36
cdown joined20:37
yourfate joined20:39
n3wborn joined20:44
gxt joined20:45
manuelschneid3r left20:46
maunix_ left20:46
fatalhalt left20:47
orbyt_ left20:48
Bradipo rafasc: Of course, git bisect... that's pretty obvious, not sure why I didn't think to try that.20:50
fatalhalt joined20:50
jwest joined20:51
rafasc even better if you can automate the property being tested.20:51
:)20:51
emsjessec left20:56
wootehfoot joined20:56
awkwords joined20:59
Lunatrius` joined21:00
Lunatrius left21:00
Lunatrius`Lunatrius21:00
in1t3r_ joined21:01
in1t3r left21:02
Bradipo Yeah, grep can easily automate the property being tested. :-)21:02
adder left21:02
awkwords_ left21:02
kneeki left21:02
roygbiv joined21:05
awkwords_ joined21:06
skered left21:07
assemblyman left21:09
awkwords left21:09
davidfetterguys21:09
guysdavidfetter21:09
fission6 left21:10
SkarmoutsosV left21:11
SkarmoutsosV joined21:13
skered joined21:14
estodiMania left21:17
estodiMania joined21:18
estodiMania left21:18
estodiMania joined21:18
n3wborn left21:19
estodiMania left21:19
Dirak left21:20
theoceaniscool joined21:20
n3wborn joined21:21
UrsoBranco left21:22
Dirak joined21:24
n3wborn left21:25
in1t3r_ left21:26
in1t3r_ joined21:26
n3wborn joined21:27
SkarmoutsosV left21:27
mven_ left21:29
ozcanesen joined21:32
Fernando-Basso joined21:32
n3wborn left21:33
n3wborn joined21:34
awkwords joined21:38
roygbiv left21:38
awkwords_ left21:39
hays left21:42
GinoMan2440 left21:43
awkwords left21:43
xcm left21:43
xcm joined21:43
hays joined21:45
awkwords joined21:45
blipz left21:47
ozcanesen left21:51
cdown left21:52
raymond joined21:53
irqq joined21:54
blipz joined21:54
dviola joined21:55
davidfetter left21:58
wolfshappen_ left22:00
Makaveli7 left22:01
keepLearning512 left22:01
Makaveli7 joined22:01
wolfshappen joined22:01
exitcode1 joined22:09
mjsir911 joined22:10
cliluw left22:12
awkwords_ joined22:13
cliluw joined22:14
wildermind left22:16
awkwords left22:17
awkwords_ left22:17
camsbury_ left22:18
awkwords joined22:18
awkwords left22:18
camsbury joined22:18
exitcode1 left22:18
estodiMania joined22:20
camsbury left22:23
xcm left22:27
xcm joined22:28
SuperLag left22:28
Spacew00t joined22:29
howell left22:32
BlessJah left22:35
Karyon joined22:41
BlessJah joined22:47
camsbury joined22:49
BlessJah left22:51
lucasb left22:54
freeman42y joined22:55
estodiMania left22:55
_noblegas left22:56
irc_viewer_test joined22:58
freeman42x left22:58
camsbury left23:00
Mattiaslndstrm joined23:00
camsbury joined23:00
Lunatrius left23:02
Mattiaslndstrm left23:02
hahuang65 left23:04
hahuang6- joined23:04
camsbury left23:07
BlessJah joined23:07
mar77i left23:10
CodeSlingerPaul left23:11
Makaveli7 left23:13
Makaveli7 joined23:13
daurnimator joined23:16
kerframil joined23:16
irc_viewer_test left23:22
Fernando-Basso left23:24
puff joined23:25
bulletmark joined23:25
bulletmark left23:26
jamiejackson left23:26
Trieste left23:27
m1m0 joined23:28
Achylles left23:28
mooasaurus left23:29
mooasaurus joined23:29
Nokurn_ left23:29
steppentyu left23:30
dudek left23:30
Trieste joined23:30
blackmesa left23:30
igemnace joined23:31
n3wborn left23:33
Nokurn joined23:35
hahuang65 joined23:40
troyt left23:41
troyt joined23:41
greatgatsby joined23:42
greatgatsby left23:42
greatgatsby joined23:43
thiago joined23:44
Revan- joined23:50
Revan- left23:53
millerti left23:54
plexigras left23:56
duderonomy left23:56
weems joined23:58

Logs Search ←Prev date Next date→ Channels Documentation