IRCloggy #git 2022-04-08

Logs Search ←Prev date Next date→ Channels Documentation

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

2022-04-08

Jong left00:03
donofrio_ left00:04
duxsco left00:05
donofrio_ joined00:06
michigan joined00:06
wonko-the-sane joined00:10
gurkenglas left00:13
Jong joined00:14
jclsn0 left00:14
DNH left00:16
jclsn0 joined00:19
jclsn0 left00:27
tharkun joined00:27
jclsn0 joined00:33
slaughtr joined00:33
_9pfs left00:34
frobnic left00:34
frobnic joined00:34
_9pfs joined00:34
Yruama left00:40
rgrinberg joined00:43
jclsn0 left00:43
jclsn0 joined00:49
skered joined00:49
dvanloon0 joined00:51
skered I can look at my scrollback and see myself committing a change with the commit id post save/exiting editor, I can see myself changing branch, going back to the branch where the commit should be.. it's not there.00:51
dvanloon left00:52
dvanloon0dvanloon00:52
skered I can `git diff commitid^..commitid` see the diff... and `git branch -a --contains commitid` returns nothing... and idea what's up?00:52
Guest69 joined01:00
jclsn0 left01:06
donofrio_ left01:06
vysn joined01:06
asocialblade joined01:07
asocialblade left01:07
asocialblade joined01:07
jazzy2 joined01:09
jclsn0 joined01:09
asocialblade left01:10
donofrio_ joined01:11
jazzy left01:13
jclsn0 left01:15
jclsn0 joined01:17
dviola joined01:22
ano left01:23
sa0 joined01:25
mjorgensen left01:26
Guest69 left01:28
skered `git reflog` shows 6 goto branch from main, 5 commit, 4 goto main from branch, ... go back to branch.. not there :/01:30
coaxing left01:30
subopt left01:30
skered git checkout commitid and a couple other hoops and I'm back to what I would expect... it's like the commit didn't finish writing or something before I switched?01:30
jclsn0 left01:32
skered The silver lining here... I now know about git-reflog.01:34
ano joined01:34
igemnace left01:35
causasui joined01:36
jclsn0 joined01:37
_9pfs left01:41
dtux joined01:41
howdoi left01:42
subopt joined01:45
Jacques left01:45
pulse left01:45
ChmEarl left01:50
fflam left01:51
fflam joined01:52
Strom joined01:54
jclsn0 left01:55
jclsn0 joined01:57
sa0 left01:58
sudoforge left02:00
llh joined02:01
kaiseisei joined02:02
jamiejackson left02:05
jclsn0 left02:07
jclsn0 joined02:10
R2robot joined02:12
geowiesnot joined02:21
bloody left02:22
jclsn0 left02:23
tyson2 joined02:26
bertvvvs left02:28
jclsn0 joined02:28
jclsn0 left02:35
jclsn0 joined02:40
rgrinberg left02:43
Rashad left02:48
jclsn0 left02:51
jclsn0 joined02:51
jclsn0 left02:59
rgrinberg joined03:00
jclsn0 joined03:04
michigan left03:05
fflam left03:06
fflam joined03:08
causasui left03:10
mjorgensen joined03:16
donofrio_ left03:16
dviola left03:23
cdown left03:28
Guest69 joined03:31
Guest69 left03:31
xkuru left03:37
coot joined03:39
Thanatermesis left03:49
Thanatermesis joined03:49
tyson2 left03:53
sa0 joined03:56
fling left04:03
fling joined04:03
zebrag left04:12
rgrinberg left04:16
hbautista joined04:17
gast0n left04:19
sa0 left04:29
b0nn I'm looking for a way to remove a commit from a PR /without/ using rebase (if possible)04:30
ikke b0nn: you cannot remove commits without rewriting history04:30
b0nn I have a script that cherry-picks two commits onto the current branch for local development, but I don't want them to be committed to main04:30
ikke all hashes of following commits needs to change04:30
b0nn hmm, sure, but is there a way to do it with a single command (ie. not interactively)04:31
ikke if they're the last 2 commits, you can reset the branch back 2 commits04:31
b0nn They can be anywhere in the PR04:31
But, they will be together :)04:32
ikke ok, so rebase is good, but not interactive?04:32
b0nn hmm it's a pity that `git revert HASH` will create a new commit04:32
ikke yes04:32
b0nn Yeah - rebase might be doable if I can script it such that other people just click and collect04:33
ikke git rebase HEAD~ --onto HEAD~3 would skip HEAD~1 and HEAD~204:33
you can also set GIT_SEQUENCE_EDITOR env to a sed like command04:34
for interactive rebase04:34
b0nn hmm https://stackoverflow.com/questions/29094595/git-interactive-rebase-without-opening-the-editor04:36
I might be biting off a bit much04:36
ikke I'd say using --onto is easier04:36
b0nn The catch with the GIT_SEQUENCE_EDITOR is the script will need to know where in the PR the commits to drop are04:36
ikke yes04:36
you need to know the commit message or abbreviated hashes04:37
or the line number04:37
b0nn Hmmm I can get that, because when I cherry pick them onto the branch I can grab the last two commits04:37
OR store the number of commits in the branch04:37
ikke if you know the abbreviated commit hashes of the cherry-picked commits, it would be something like GIT_SEQUENCE_EDITOR='sed /^pick (hash1|hash2)/d' git rebase -i <target-branch>04:40
great_taste left04:41
fling left04:45
fling joined04:45
_9pfs joined04:52
Jong left04:53
saroy joined04:53
_9pfs left04:54
madewokherd joined04:58
w_lehinsun__ joined04:59
madewokherd` left05:01
w_lehinsun left05:01
w_lehinsun__ left05:08
dtux left05:20
_9pfs joined05:24
FH_thecat joined05:25
Gustavo6046 left05:29
_9pfs left05:30
_9pfs joined05:31
andypandy left05:42
Jong joined05:47
andypandy joined05:47
mncheck joined05:49
_9pfs left05:57
hbautista left06:01
dionysus69 joined06:03
ikwyl6 joined06:06
bkircher joined06:07
srinidhi joined06:13
mjorgensen left06:14
Misotauros left06:14
jclsn0jclsn06:18
zeenk joined06:22
jazzy2jazzy06:22
thiago left06:22
osse you can always do GIT_SEQUENCE_EDITOR=myprogram and write something more than a one-liner06:23
might keep you sane in the long run :p06:23
dtux joined06:23
dionysus69 left06:26
mexen joined06:28
TheCatBehemoth joined06:33
dviola joined06:34
enkeyz joined06:34
Betal left06:36
geowiesnot left06:38
epolanski joined06:39
palasso joined06:42
dviola left06:42
dviola joined06:44
dviola left06:45
dviola joined06:46
rLapz joined06:51
EvilDMP joined06:55
sa0 joined07:05
rfuentess joined07:07
MiniontobyPI joined07:14
Akiva left07:20
ano left07:20
mat001_ left07:21
mat001 left07:21
vysn left07:22
mat001 joined07:25
mat001_ joined07:27
gnoo joined07:28
sv0 joined07:30
john_johnk joined07:31
ano joined07:36
dviola left07:38
dviola joined07:40
dviola left07:45
dviola joined07:46
kenanmarasli joined07:48
sv0 left07:49
Thanatermesis left07:53
a1eaiactaest joined07:57
nyah joined07:58
donofrio joined08:00
Jacques joined08:01
skapata left08:01
dviola left08:05
Murr left08:05
Murr joined08:05
dviola joined08:06
donofrio left08:07
Haohmaru joined08:08
mncheckm joined08:08
dviola left08:12
dviola joined08:13
vitali64 joined08:15
ano left08:19
dviola left08:20
ano joined08:23
dionysus69 joined08:29
littlebobeep left08:35
coot left08:36
MajorBiscuit joined08:44
tsdh joined08:47
DNH joined08:52
EvilDMP left08:56
dviola joined08:58
EvilDMP joined08:59
duxsco joined09:01
benoliver999 joined09:03
benoliver999 Say I have two branches, A and B. I deleted a file from branch A and commit. On branch B, I made a update to the file. When I pull in changes from branch A into branch B, what happens to the deleted file?09:05
ikke You'd get a conflict09:05
delete/modify conflict09:05
benoliver999 Makes sense, thanks!09:06
hendry Can I avoid this explicit fetch tracking stuff? i.e. avoid `git branch --set-upstream-to=<remote>/<branch> branch-i-am-working-on`?09:07
benoliver999 left09:07
ikke hendry: do you create these branches yourself locally, or do you get them from the rmeote?09:08
hendry ikke: i pushed to remote of the branch of the same name, and I think it would be intuitive to `git pull` from the same remote branch name. I'm not sure why git is doing this to me.09:09
behaviour i think was different before right?09:09
iffraff left09:11
tulpa_ joined09:15
pretty_dumm_guy joined09:16
bodiccea left09:19
ikke pull always needed to know what remote to fetch from09:20
either by explicitly specifying it, or by way of tracking information09:20
dviola left09:21
kaiseisei left09:22
dviola joined09:22
a1eaiactaest left09:23
rLapz left09:24
dviola left09:26
gurkenglas joined09:28
chenqisu1 left09:28
A_Dragon joined09:29
Jong What's the word for resolving a warning so it no longer blows up the terminal with garbage text? I trying to writing a commit message09:31
"Resolve verbose warning" ?09:31
dviola joined09:32
davve quiet, then silent for nothing09:33
Jong " Resolved warning clogging the logs" ?09:33
davve "Made warnings more quiet"09:34
"Made warnings less verbose"09:34
Jong but I did what the warnings suggested to make the warning go away. I didn't suppress the warning or bypass it09:34
davve oh ok09:35
"Fixed warning(s)"09:35
imo09:35
can mention which it were to be more specific09:35
Jong Thanks!09:35
davve or what types09:35
np. thank you for putting thought into your commit messages :)09:36
Jong Fixed warning clogging terminal09:36
how about that09:36
davve perfect09:36
dviola left09:37
Jong How does this sound? "Stop validation samples from leaking into training set"09:38
iomari891 joined09:39
dviola joined09:39
DNH left09:39
davve it might make sense, but I dont know the context09:40
would prefer your previous comment09:40
i think its kind of important to stay consistent with your messages though, so make it "yours"09:41
Jong not sure if you know python but a colleague accidentally used itertools.chain to chain validation samples into training set.09:41
davve aha09:42
john_johnk left09:42
jazzy left09:44
Jong "Remove code causing validation samples to be trained" ?09:44
dviola left09:45
Jacques left09:46
dviola joined09:47
Jong what do you when you have a series of issues. Like 10, all 5 liner fixes.09:51
Do you really make 10 PRs in such a case?09:51
john_johnk joined09:52
Guest3354 joined09:53
dviola left09:56
dviola joined09:57
ikke Single PR, multiple commits, or maybe even a single commit09:58
It depends09:58
What these things change09:58
if they have some common goal09:58
If they are completely unrelated, then I would make separate PRs09:58
Guest3354 left09:59
DNH joined10:02
coldmountain joined10:03
hendry i have a branch "foo" that i want to merge in, but i need to rewrite the commits. When i `git rebase -i foo` from main, I get totally different commit to what I'm expecting. Really confused.10:03
donofrio joined10:03
nedbat hendry: what do you mean by totally different commit? rebasing will rewrite the commits.10:06
hendry: if you are trying to rewrite the commits on foo before the merge, then you probably want `git checkout foo; git rebase -i main`10:06
epolanski left10:09
jimklimov joined10:09
hendry nedbat: ah! yes, i need to rebase from branch10:09
dviola left10:16
Jong Suppose you have 10 3-liner code changes. All not relevant to each other. Would you make 10 PRs back to back? Wouldn't that appear a bit spammy?10:16
oh okay ikke10:16
good answer10:16
dviola joined10:17
jimklimov1 joined10:17
nedbat Jong: some maintainers might prefer one PR10:17
john_johnk left10:20
jimklimov left10:21
lelux joined10:22
EvilDMP left10:35
EvilDMP joined10:40
dviola left10:41
fling left10:41
dviola joined10:42
fling joined10:43
vishal left10:46
vishal joined10:48
dviola left10:49
dviola joined10:50
hololeap_ left11:00
hololeap_ joined11:02
donofrio left11:06
donofrio joined11:06
michigan joined11:08
igemnace joined11:09
tyson2 joined11:16
bertvvvs joined11:16
john_johnk joined11:23
cdown joined11:25
dviola left11:33
TheCatBehemoth left11:34
dviola joined11:34
dviola left11:35
dviola joined11:37
Yruama joined11:45
fling left11:45
wonko-the-sane left11:46
wonko-the-sane joined11:46
bin4ry joined11:47
fling joined11:47
qn joined11:47
bin4ry left11:48
bin4ry joined11:48
bin4ry left11:56
bin4ry joined11:56
littlebobeep joined12:00
FH_thecat left12:00
DNH left12:02
MajorBiscuit left12:04
bertiger joined12:04
DNH joined12:05
MajorBiscuit joined12:05
mannequin joined12:07
TheCatBehemoth joined12:10
coaxing joined12:12
TheCatBehemoth left12:15
EvilDMP left12:19
MajorBiscuit left12:24
kaiseisei joined12:25
constxd joined12:26
EvilDMP joined12:26
TheCatBehemoth joined12:27
coot joined12:27
cloaker left12:29
cloaker joined12:30
funhouse left12:44
Xenguy left12:45
gh34 joined12:45
fling left12:49
fling joined12:49
lelux left12:51
bloody joined12:52
pulse joined12:58
dviola left13:00
dviola joined13:02
xkuru joined13:07
kaiseisei left13:15
Guest24 joined13:20
zebrag joined13:31
masber joined13:33
Guest24 left13:33
haha joined13:34
haha left13:34
haha231 joined13:34
geowiesnot joined13:36
roadie left13:39
thiago joined13:45
skapata joined13:46
skapata left13:46
skapata joined13:46
haha231 left13:50
cdown_ joined13:50
cdown left13:53
cdown_cdown13:53
fling left13:54
fling joined13:55
cloaker left14:00
The_Blode joined14:03
The_Blode_ left14:04
gast0n joined14:05
Murr left14:05
Murr joined14:05
MajorBiscuit joined14:15
wakeup joined14:16
Akiva joined14:17
masber left14:26
ChmEarl joined14:26
hololeap_hololeap14:27
tyson2 left14:29
tyson2 joined14:33
masber joined14:34
madewokherd` joined14:38
mncheckm left14:40
mncheck left14:40
madewokherd left14:41
sobkas joined14:44
wonko-the-sane left14:50
liefer left14:53
liefer joined14:55
pretty_dumm_guy left14:56
EvilDMP_ joined14:57
pretty_dumm_guy joined14:57
dviola left14:58
EvilDMP left14:59
Guest73 joined15:01
Guest73 hi15:01
Guest73 left15:02
dviola joined15:02
dionysus69 left15:03
liefer left15:03
pretty_dumm_guy left15:06
dviola left15:07
dviola joined15:12
Thanatermesis joined15:12
Guest32 joined15:21
Guest32 left15:21
dviola left15:23
dviola joined15:27
DNH left15:27
LuxuryMode joined15:28
dhch joined15:30
Gustavo6046 joined15:31
DNH joined15:32
tchan1 joined15:32
dviola left15:33
___nick___ joined15:33
dhch left15:33
dviola joined15:33
masber left15:34
iomari891 left15:34
masber joined15:36
tchan left15:36
tyson2 left15:37
great_taste joined15:39
oncall-pokemon joined15:39
analoq left15:41
wonko-the-sane joined15:41
analoq joined15:42
rfuentess left15:44
michigan left15:48
JanC joined15:50
jinsun joined15:51
wakeup I have 2 commits in my repo15:52
coot left15:52
wakeup I am trying to merge them into 115:52
so I am using git reset --soft HEAD~215:52
then git commit15:52
then git push -f15:53
but the first command doesn't work15:53
"fatal: ambiguous argument 'HEAD~2': unknown revision or path not in the working tree.15:53
Use '--' to separate paths from revisions, like this:15:53
'git <command> [<revision>...] -- [<file>...]'15:53
"15:53
git reset --soft HEAD~1 does nothing15:53
impermanence joined15:54
sobkas left15:55
iffraff joined15:55
wakeup well, I just did this: https://stackoverflow.com/a/9254257/392411815:55
sobkas joined15:56
dviola left15:56
EvilDMP_ left15:57
wakeup but I would appreciate any explanation of why the other command didn't work15:57
dviola joined15:57
dviola left16:02
madewokherd` left16:02
dviola joined16:04
foul_owl joined16:04
___nick___ left16:05
___nick___ joined16:07
___nick___ left16:08
___nick___ joined16:10
iomari891 joined16:10
thiago wakeup: you can't reset to before the first commit16:11
but if you want to merge the two, you don't have to. Reset to the first, then commit --amend16:11
geowiesnot left16:13
EvilDMP joined16:15
masber left16:17
vicecea left16:17
vicecea joined16:18
Guest69 joined16:23
madewokherd joined16:25
rgrinberg joined16:27
DNH left16:32
bodiccea joined16:33
duxsco left16:35
saroy left16:36
wakeup left16:36
treefrob joined16:38
Haohmaru left16:39
duxsco joined16:40
geowiesnot joined16:41
MajorBiscuit left16:44
rsx joined16:44
odoood joined16:49
dviola left16:53
menace joined16:53
menace left16:53
menace joined16:53
menaceDeknos16:53
glik22_ joined16:56
dviola joined16:57
rsx left16:57
glik22_ i have branch A that was created off master, commits to A, then created branch B off of A, a single commit to B and more commits to master. i want to rebase B onto master, so from B i run `git rebase --onto master A B`. this succeeds but then my B commit is wiped out. i can get it back with `git reflog` and `git revert`. what's the correct rebase command?16:57
hqdruxn08 joined17:00
rewt by "B commit" you mean the commit only referenced by branch B that you moved when you rebased? that's expected... "correct rebase command" would depend on what you're expecting17:01
you could make another branch (C) at B so when you rebase B, C still points to the original commit17:01
thiago man git-rebase has nice graphs17:01
gitinfo the git-rebase manpage is available at https://gitirc.eu/git-rebase.html17:01
thiago always refer to them when using --onto17:01
three-branch --onto is confusing17:01
glik22_ rewt: i'd like my brach B to have everything in master and then only the single commit that is on the B branch. no commits from A17:03
rewt then what you did seems right17:04
thiago yep17:04
are you sure the rebase succeeded?17:04
try this: git checkout master && git cherry-pick B17:04
does that succeed?17:04
dviola left17:05
bambanxx joined17:05
glik22_ the rebase succeeded but i still have changed from A. git checkout master && git cherry-pick B worked17:05
thiago the command looks right and should do the same thing as that cherry-pick17:05
so it's likely the problem is in some part of the situation that you didn't describe17:06
glik22_ i think i can get around this by going to master, creating a new branch B', and cherry picking the commit i want from B.17:07
thiago yes17:07
glik22_ i must have done something weird that i can't recall. this should fix it though.17:07
dviola joined17:07
glik22_ ok, cool. thanks for brainstorming with me17:08
dviola left17:13
dviola joined17:14
mexen left17:15
hqdruxn08 left17:16
pretty_dumm_guy joined17:18
zeenk left17:19
dviola left17:19
hqdruxn08 joined17:19
dviola joined17:26
hqdruxn08 left17:26
odoood left17:28
gildasio1 joined17:31
OnkelTem left17:34
OnkelTem joined17:37
han-solo joined17:39
dviola left17:41
orbyt joined17:42
OnkelTem left17:44
cvmn joined17:45
tyson2 joined17:45
dviola joined17:46
OnkelTem joined17:46
dviola left17:50
hqdruxn08 joined17:51
dviola joined17:52
tchan1 left17:54
tchan joined17:59
donofrio left18:01
GNUmoon left18:03
funhouse joined18:05
gildasio1 left18:09
donofrio joined18:11
AnapodoPsalidaki left18:14
GNUmoon joined18:16
jianwu joined18:16
EvilDMP left18:21
structoha joined18:21
EvilDMP joined18:21
EvilDMP left18:21
EvilDMP joined18:25
junebug joined18:27
LuxuryMode left18:28
EvilDMP left18:29
geowiesnot left18:31
coot joined18:32
Misotauros joined18:32
dviola left18:33
Jacques joined18:33
dviola joined18:34
DNH joined18:36
sudoforge joined18:37
structoha1 joined18:39
dviola left18:40
structoha left18:40
gildasio left18:45
dviola joined18:45
gildasio joined18:45
cliluw joined18:47
cliluw left18:47
cliluw joined18:48
gildasio left18:48
gildasio joined18:48
rgrinberg left18:49
iomari891 left18:53
Jacques left18:54
beencubed joined18:55
ThorMojito joined18:56
hxztnxt joined18:57
orbyt left19:00
reset joined19:02
dionysus69 joined19:04
epolanski joined19:12
iffraff left19:12
bambanxx left19:13
bambanxx joined19:14
qn left19:17
duxsco left19:18
vitali64 left19:22
dviola left19:23
Betal joined19:23
bambanxx left19:24
dviola joined19:25
texasmynsted joined19:25
texasmynsted If I have say five commits on a new feature branch and want to squash them to a single commit, would this work `git rebase -i --root`?19:27
dviola left19:27
hxztnxt left19:32
_9pfs joined19:32
ikke texasmynsted: You probably don't want to use --root19:33
_9pfs left19:33
_9pfs63 joined19:34
ikke unless your repository only has 5 commits19:34
texasmynsted yeaaahhh. That was NOT what I wwanted19:34
skapate joined19:35
skapate left19:35
skapate joined19:35
sobkas left19:35
ikke git rebase -i <base-branch>19:35
texasmynsted base-branch being the commit where my feature branch split from?19:36
_9pfs63_9pfs19:36
ikke does not necessarily have to be exactly that commit19:36
duxsco joined19:36
ikke if you created the feature branch from master, than specifying 'master' suffices19:37
texasmynsted Is there not a way to automagically identify that point? The branch my feature branch split from has MANY more commits on it now.19:37
_9pfs How do I remove files from the first commit? I did it once with `git filter-branch`, but is there a better way? I accidentally committed a file too big for Github, and had to remove it.19:37
texasmynsted I will just try and see what happens19:37
I am sure I can abort or reset19:37
ikke _9pfs: git rm --cached && git commit --amend19:37
_9pfs I removed the file already, just wondering what to do for the future.19:37
skapata left19:37
jazzy joined19:37
_9pfs ikke: I'll try that in the future.19:37
texasmynsted ah. :-) `git rebase -i main` was exactly what I needed. Thank you19:38
junebug left19:38
wakeup joined19:38
dviola joined19:39
bambanxx joined19:40
vicfred joined19:42
coldmountain left19:42
vicfred left19:43
dviola left19:44
vicfred joined19:45
dviola joined19:47
wakeup left19:47
cvmn left19:49
jianwu left19:50
texasmynsted sigh. I guess there is no way to git rebase --no-verify --continue19:50
dviola left19:50
texasmynsted shouldn't `git rebase --no-verify -i main` prevent the `prepare-commit-msg` hook from firing?19:55
ikke I think only the pre-commit hook19:56
dviola joined19:56
skapate left19:57
AbleBacon joined20:01
dviola left20:02
duxsco left20:02
dviola joined20:03
structoha1 left20:03
dviola left20:03
structoha1 joined20:04
___nick___ left20:04
dviola joined20:04
Murr left20:04
texasmynsted This was a life saver -> https://gist.github.com/MrSwed/4bb4e0a8c2a2f35827e6d9b41064258220:04
Murr joined20:05
rgrinberg joined20:09
structoha1 left20:16
han-solo left20:18
Lord_of_Life_ joined20:19
Lord_of_Life left20:21
Lord_of_Life_Lord_of_Life20:22
bambanxx left20:27
euouae joined20:31
euouae Hello if I have a shallow clone with `git clone --depth 1 ...` and then later (say after a lot of commits) I do a `git feth --depth 1`, do I get the latest snapshot of the project?20:32
s/feth/fetch20:32
rewt man git fetch says "If fetching to a shallow repository created by git clone with --depth=<depth> option (see git-clone[1]), deepen or shorten the history to the specified number of commits."20:33
gitinfo the git-fetch manpage is available at https://gitirc.eu/git-fetch.html20:33
BtbN Keep in mind that fetch alone won't get you anything20:34
you still need to merge/checkout20:34
euouae I don't understand the manpage though20:34
what is it saying?20:34
rewt which part?20:34
euouae the shortening of the history20:34
I get the latest snapshot but the history is incomplete, right?20:35
rewt it shortens the history20:35
the history is incomplete to begin with because of the shallow clone20:35
shorten history means chop off older commits to make the history shorter20:35
euouae so if I'm in commit A with a shallow copy and there's A -> B -> C -> D and I fetch, do I grab commit D's snapshot?20:35
and my history looks like A -> D ?20:35
rewt C -> D20:36
euouae C -> D? not just D?20:36
rewt maybe just D20:36
tias20:36
euouae rewt: I don't care so much for the history, but is it true that I grab the latest snapshot of the project?20:36
BtbN I'm not sure what you mean by "snapshot". You are aware that fetch does not modify the working tree?20:37
rewt but not A -> D for sure, because A is not D's parent20:37
euouae BtbN yes, let's say I merge20:37
oh, I need to merge manually?20:37
no, `git pull --depth 1` works. Nevermind the fetch, let's say I do the pull20:38
rewt can you even merge if there is no merge-base?20:38
euouae pull has a --depth20:38
rewt pull is fetch + merge20:38
euouae oh, does `git pull --depth 1` upgrade from A to A -> B?20:38
is that what it means by "deepening the history"?20:38
rgrinberg left20:39
rewt `git pull -depth 1` means `git fetch --depth 1; git merge`20:39
pull is just a shortcut for typing fetch then merge20:39
euouae I agree20:39
I'm only curious about the behavior of --fetch 120:39
I can test it, `git clone -b ` allows to clone an early commit20:40
Hm, after `git clone <repo> --depth 1 -b <early_tag>` if I try to pull I get `git pull --depth 1` -> already up to date20:42
and if I try `--depth 2`, I just obtain more of past history20:43
bambanxx joined20:50
rgrinberg joined20:51
rewt well, yeah, git clone --depth 1, followed by git fetch --depth 1 has nothing to do because history is already 1 deep20:52
dviola left20:52
euouae I was hoping to obtain shallow copies of the most recent stuff every time20:52
BtbN The manpage of fetch sounds like that's exactly what it does?20:53
euouae no, on a shallow copy it just grabs more history20:53
from the past20:53
dviola joined20:54
orbyt joined20:55
BtbN Doesn't look like it does to me20:55
hbautista joined20:55
BtbN for a "shallow update" you probably want to fetch --depth 1 + reset anyway20:55
merge just makes no sense20:55
junktext_ joined20:56
_9pfs_20:56
__9pfs20:56
euouae I don't know what you mean by + reset20:56
You can test the behavior on a repo with `git clone <repo> -b <old_tag> --depth 1` followed by `git fetch --depth 1` for example20:57
or pull20:57
BtbN reset instead of merge20:59
dviola left21:00
dviola joined21:01
euouae hm... git fetch only goes backwards on a shallow clone I checked it21:01
BtbN Works fine for me21:01
fetch + reset --hard21:01
euouae it does? doesn't it just retrieve older commits when you fetch?21:02
BtbN Why would it?21:02
euouae that's what it does here21:02
BtbN Hmm tell you what. Let's just both be wiser and continue without solving this mystery :P it will probably be a better use of our time21:02
I'll agree that you're right and I'm probably the super noob who can't get anything right anymore :P21:03
BtbN You have to understand that a merge makes no sense without history21:03
euouae I agree21:03
donofrio left21:04
bambanxx left21:04
BtbN I'm literally looking at my git output right now, and see no issue. So I don't understand what issue you are seeing.21:04
git pull won't work21:04
you have to manually fetch and then hard reset to what you fetched21:04
euouae when I fetch it only goes backwards21:05
e.g. if I'm on 0.6.1. and I do a `--depth 10` (say) I might end up in 0.6.021:05
that's what I see on `git log`, history from 0.6.0 to 0.6.121:05
it doesn't go "up" to 0.6.2. Does that make sense?21:06
donofrio joined21:06
BtbN https://bpa.st/G4JA21:06
It doesn't seem to particularily care if it goes up or down to me21:06
dviola left21:06
bambanxx joined21:07
bn_work hi, I have created a new branch via `git branch foo`, committed some changes & pushed but when I pull from another machine it doesn't show up when I do `git branch --list -a`, why? Did I need to explicitly set the branch I created to track remote? If so, how do I do that after the fact?21:08
bambanxx left21:08
dviola joined21:08
skapata joined21:09
skapata left21:09
skapata joined21:09
bn_work Do I need to use `git branch -u` while on the original machine and re-push?21:09
BtbN bn_work, "git branch" just creates the branch, but does not check it out or otherwise does anything until you check it out21:09
euouae BtbN right but you're using the extra command line argument `v5.17`... that's why.21:09
If you tried `git fetch --depth 1` you'd get what I'm talking about21:09
BtbN euouae, you can also put "origin master" there if you just want latest21:09
bn_work BtbN: I checked it out (or `git switch foo`), sorry I forgot to mention that21:10
before committing and pushing changes21:10
BtbN But you need to give it a reference that points to a specific commit. Otherwise the whole undertaking makes no sense.21:10
bn_work BtbN: what do you mean?21:11
I thought when one "branches" it takes current HEAD of current branch21:11
BtbN If you don't tell it what to fetch, while being on a pretty much detached-head state... what's it supposed to do?21:11
wait, wrong person21:11
dionysus69 left21:11
BtbN bn_work, yeah, that's what it does by default21:12
euouae I told you what it does :P BtbN21:12
BtbN Well, you got your solution then21:12
bn_work BtbN: so what am I doing wrong? why wasn't the branch pushed?21:13
BtbN How did you push it?21:13
parsnip --depth N goes backwards. so specify the branch that is forwards?21:13
bn_work BtbN: just `git push`21:13
parsnip --depth 1 will go forward if the branch has moved forward21:13
dviola left21:13
euouae that makes sense21:13
bn_work when I do a `git log --all -graph`, I don't see an `origin/foo` so I'm assuming it never got pushed21:14
BtbN Yeah, if you make a new branch, it has no upstream, so git push won't do much21:14
structoha1 joined21:14
fillx joined21:14
BtbN you initially need to git push -u origin bla21:14
ThorMojito left21:16
dviola joined21:16
ThorMojito joined21:16
bambanxx joined21:16
kenanmarasli left21:16
bn_work oh wait, I switched back to `develop` prior to pushing, I thought `push` pushes all...21:17
ok, that seems to have worked, seems like a pain21:19
is there any way to make that process more efficient?21:19
ie: default to all branches pushed + new branches are automatically `git push -u origin ...` ?21:20
palasso left21:20
euouae which program are you using? git?21:20
dviola left21:21
euouae git has aliases you can write21:21
_9pfshello-smile4821:21
DNH left21:21
hxztnxt joined21:22
euouae git config --global alias.pushall '!git remote | xargs -l git push --all'21:22
hxztnxt left21:23
coot left21:23
distantsail joined21:25
euouae BtbN thanks for the help. I was a bit slow but I get it now.21:26
euouae left21:26
dviola joined21:27
DNH joined21:27
fillx left21:29
bn_work yes, I'm aware of aliases, can I use variables in it though?21:32
dviola left21:33
bn_work re. `git config --global alias.pushall '!git remote | xargs -l git push --all'`: why is the `git remote |` part necessary? is `origin` not always guaranteed to be the "name"?21:33
madewokherd left21:35
dviola joined21:36
dviola left21:41
dviola joined21:44
gh34 left21:44
TheCatBehemoth left21:46
j416 you can name your remotes whatever you like.21:49
structoha1 left21:52
rgrinberg left21:52
distantsail left21:52
pretty_dumm_guy left21:53
cbreak (I recommend not calling your remote "master", or "HEAD", that'd be confusing :P )21:53
feriman joined21:59
tulpa_ left22:00
feriman left22:01
rewt bn_work, that alias looks like a push to all remotes... if you have more than 1, they can't all be named origin22:02
feriman joined22:02
madewokherd joined22:03
dviola left22:03
ThorMojito left22:04
dviola joined22:04
Murr left22:04
Murr joined22:05
hello-smile48 left22:08
feriman left22:09
dviola left22:09
orbyt left22:10
Xenguy joined22:11
donofrio left22:17
dviola joined22:18
_9pfs joined22:21
srinidhi left22:22
_9pfs left22:22
_9pfs22 joined22:22
feriman joined22:23
feriman left22:25
_9pfs22_9pfs-libera22:25
mat001_ Hey. I have this command in travis.yaml file: git init && git pull https://github.com/company/app.git. This will pull master branch.22:25
How can I pull a remote branch?22:25
feriman joined22:26
OnlineCop `git submodule sync path_to_submodule; git submodule update --init path_to_submodule` perhaps?22:27
_9pfs-libera left22:27
ThorMojito joined22:28
OnlineCop Since my project has 4 submodules (and I only want 3 of them), mine looks like `git submodule sync path1/submod1 path2/submod2 path3/submod3` ...22:28
_9pfs-libera joined22:28
_9pfs-libera left22:29
_9pfs-libera82 joined22:29
Unknown joined22:33
dviola left22:33
DNH left22:33
feriman left22:37
OnlineCop Sorry, you just wanted a different branch and not a submodule? I misunderstood.22:37
bambanxx left22:38
feriman joined22:39
rewt mat001_, you probably want `git clone` instead of `git init && git fetch && git merge`22:40
michigan joined22:41
rewt and that will also get all remote branches22:41
bambanxx joined22:43
eaii^ left22:44
vdamewood left22:44
bambanxx left22:45
humanBird joined22:46
mat001 left22:48
ThorMojito left22:48
Guest70 joined22:48
dviola joined22:49
feriman left22:49
feriman joined22:49
mat001 joined22:52
bn_work rewt: ah, ok22:53
Guest70 left22:54
bn_work rewt: so any idea how to use a variable to create an alias for `git push -u origin <new_branch_name>` ?22:54
dviola left22:55
dviola joined22:56
cation21 joined23:01
w0ng left23:02
dviola left23:02
dviola joined23:04
Unknown left23:04
Unknown joined23:04
cation21cation23:04
Shentino joined23:08
enkeyz left23:09
w0ng joined23:09
sa0 left23:09
dviola left23:10
feriman left23:10
sa0 joined23:10
causasui joined23:10
dviola joined23:11
Unknown test23:11
daddy icles23:12
Unknown selci23:14
xD23:14
sa0 left23:15
Shentino left23:16
dviola left23:17
Shentino joined23:18
zumba_addict joined23:21
lgc joined23:22
lgc left23:22
john_johnk left23:26
john_johnk joined23:27
_9pfs-libera82 left23:28
dansan joined23:36
rewt bn_work, if you have the branch checked out, you can just `git push -u`23:36
Akiva left23:37
structoha1 joined23:38
rewt otherwise you're looking at something like `git push -u branch:branch`23:39
dviola joined23:43
blaklistd joined23:47
dviola left23:51
_9pfs joined23:53
zumba_addict left23:53
blaklistd left23:53
dviola joined23:54
ThorMojito joined23:57

Logs Search ←Prev date Next date→ Channels Documentation