IRCloggy #git 2022-01-21

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-01-21

spare left00:00
DrowningElysium left00:07
FinnElija left00:08
zen_coder left00:14
FinnElija joined00:18
great_taste left00:38
Xenguy joined00:41
avu joined00:45
Yruama left00:46
perrierjouet left00:48
jazzy joined00:51
kaiseisei joined00:52
tehenderz left00:53
tehenderz joined00:53
perrierjouet joined00:53
lmat joined00:54
lmat j416: Are you a software developer? Freelance or w2?00:54
maryo There is a commit which got merged to our staging branch.. I wanted to know from which branch that commit got merged to my staging branch and via what merge method. How can we do this?01:02
durham left01:04
durham joined01:05
BUSY joined01:06
rawtaz maryo: is there a merge commit?01:06
if so that one should say01:06
luke-jr left01:07
luke-jr joined01:09
durham left01:09
dkp-01 joined01:13
lmat maryo: You can't necessarily. Branches are just pointers to commits. Once branches have moved through a merge, where the branch WAS is lost. That's why you need to make sure commits hold all the meta information you need. You might say tags can also hold this informaiton, but tags are much more transient and maleable than commits.01:15
maryo: "...via what merge method." That's not really meaningful. There's only one merge method: git merge; In your question, it sounds like you're not using git by itself, but maybe Microsoft Github or some other git host? Those hosts often add information, as rawtaz said, to the merge commits. Maybe using `git show <merge-commit-hash>;`, you can see a merge request URL or pull request URL where you can get all01:17
the information you want?01:17
maryo: Good luck out there.01:17
Betal left01:21
maryo thank you lmat01:21
skapata left01:21
skapata joined01:24
fikran left01:24
fikran joined01:26
gast0n joined01:28
vysn joined01:30
BtbN joined01:32
gco joined01:39
gumbo left01:41
Xatenev joined01:42
Xatenev left01:42
Xatenev joined01:42
nyah left01:42
phylaz joined01:45
zmt01 joined01:46
skapata left01:47
zmt00 left01:49
adonis joined02:01
adonis So I checked out this source: https://chromium.googlesource.com/external/webrtc/+log/branch-heads/466402:03
When doing git checkout refs/branch-heads/4664 it says: error: pathspec 'refs/branch-heads/4664' did not match any file(s) known to git02:04
why?02:04
BtbN You probably nefer fetched that ref.02:05
skapata joined02:05
BtbN It's probably gerrit crazyness as well, and not intended for use with normal tools02:06
adonis shouldn't doing a clone of that repo bring that ref in?02:07
whats even more odd is the commit at the tip of that branch is 809830f1b39f, yet I can't check it out via commit either02:08
tip of that ref02:08
tmz joined02:11
tdeo joined02:14
BtbN You clearly didn't fetch it then02:17
ztrawhcse joined02:17
hannibal_ad_port joined02:17
causa_sui left02:17
pretty_dumm_guy left02:19
ndorf joined02:19
causa_sui joined02:20
adonis I cloned the repo so it should've brought it in. I doubt they do force pushes to that repo.02:24
BtbN Whatever force pushes got to do with that.02:25
You just didn't fetch thar ref. It's gerrid shenanagans.02:25
*gerrit02:25
tejr left02:25
adonis I mentioned the force-push thing since maybe that was an overwritten ref but it shouldn't be, at least not due to force pushes.02:26
tejr joined02:27
bluesm left02:32
mgedmin joined02:32
senoraraton joined02:36
Xatenev left02:40
skapata left02:41
causa-sui joined02:46
mihael joined02:49
causa_sui left02:49
xkuru left02:51
mihael When using --recursive how do I specify what port to connect? e.g. `git clone --recursive `git@github.com:34/..` , when it tries to clone the submodules, it reverts back to port 22.02:52
skapata joined02:53
skapata left02:53
skapata joined02:53
mihael left02:57
mihael joined02:58
causa-sui left02:58
skapata left03:00
adonis left03:01
causasui joined03:05
gumbo joined03:08
forgotmynick joined03:09
skapata joined03:17
skapata left03:17
skapata joined03:17
mihael left03:19
causasui left03:21
skapata left03:25
great_taste joined03:25
FinnElija left03:27
finn_elija joined03:27
finn_elijaFinnElija03:27
cdown left03:28
cmbengue left03:28
causa-sui joined03:32
dkp-01 left03:33
fikran left03:33
fikran joined03:35
causa-sui left03:36
OnkelTem joined03:37
chenqisu12 joined03:38
toma left03:40
chenqisu1 left03:41
luke-jr left03:43
terrorjack joined03:44
causa-sui joined03:45
vicfred left03:49
causa-sui left03:50
jazzy left03:53
lechner joined04:00
haasn joined04:01
gco left04:04
Swahili left04:07
luke-jr joined04:07
Swahili joined04:07
chenqisu1 joined04:09
realtime-neil left04:11
chenqisu12 left04:11
realtime-neil joined04:11
zmt01 left04:16
zmt00 joined04:18
causa-sui joined04:29
cryptonector joined04:30
chenqisu1 left04:32
causa-sui left04:34
pilyn joined04:39
zmt00 left04:44
queue joined04:45
zmt00 joined04:46
ChmEarl left04:49
causa-sui joined04:54
Thanatermesis left04:55
causa-sui left04:59
tyson2 left05:07
gast0n left05:08
causa-sui joined05:08
zebrag left05:09
causa-sui left05:13
xx joined05:16
bloody left05:21
forgotmynick left05:28
dviola joined05:29
vimal joined05:36
fcser joined05:36
pilyn left05:36
mackerman joined05:39
lechner left05:39
zmt00 left05:40
ecs joined05:40
structoha joined05:40
dzho joined05:41
structoha left05:41
structoha joined05:42
great_taste left05:42
fikran left05:42
madewokherd` joined05:43
thiago left05:43
fikran joined05:45
madewokherd left05:45
ecs left05:46
maryo left05:46
Gurkenglas joined05:47
earthbreaker joined05:47
FluffyFoxeh joined05:48
ecs joined05:48
mfiano joined05:49
FluffyFoxehFrogging10105:49
hendry hi, i'm trying to push to a remote a particular commit. the remote name is "stg". When I run `git push $commit stg` it says "error: src refspec stg does not match any"05:57
Xaldafax left05:58
llh joined06:02
mexen joined06:02
sudoforge left06:04
hendry my aim is (forcefully) set _stg_ remote to a commit called "d7d3ea", when I run `git push stg main d7d3ea` I get fatal: d7d3e..06:05
cannot be resolved to branch"... sorry. Bit stuck how to set a remote to d7d.06:05
structoha left06:05
structoha joined06:06
senoraraton left06:08
hendry I think I finally found the answer on https://stackoverflow.com/a/40580976/453406:09
hbautista joined06:14
madewokherd` left06:17
mud left06:20
carl- joined06:22
carl-- joined06:25
causa-sui joined06:26
bkircher joined06:28
carl- left06:28
xiongxin joined06:29
Xenguy_ joined06:31
causa-sui left06:31
crashrep left06:32
Xenguy left06:33
Xenguy joined06:40
ivanzep left06:41
Xenguy_ left06:42
Xenguy_ joined06:43
Xenguy left06:45
GNUmoon left06:46
maxzor left06:55
Xenguy__ joined06:59
Xenguy_ left07:01
john_johnk joined07:02
Xenguy_ joined07:03
chenqisu1 joined07:04
Xenguy__ left07:05
john_johnk left07:06
luke-jr left07:07
Xenguy__ joined07:07
luke-jr joined07:08
Xenguy_ left07:09
Xenguy_ joined07:15
rgrinberg left07:16
mud joined07:18
Xenguy__ left07:18
BinarySavior_ joined07:20
BinarySavior left07:20
dzho left07:20
dzho joined07:21
xiongxin left07:27
aniruddha joined07:28
Crispy joined07:29
otisolsen70 joined07:31
meator joined07:31
otisolsen70 left07:32
otisolsen70 joined07:32
causa-sui joined07:32
moviuro joined07:33
causa-sui left07:37
mehwork joined07:39
mehwork is `git fetch` ever useful if my git repo is completely local / offline online (has no remote attached)?07:39
osse no07:40
you can use git fetch with a literal url instead of a remote name. but other than that, no.07:41
mehwork ok thanks07:41
wondered because `git fetch` outputs nothing but `git pull` tells me there's no tracking info07:42
seems like git fetch should do some kind of warning to say there's nothing to fetch from yet07:42
osse because pull = fetch + merge, and it's the merge part that needs that info07:42
yeah, that would make sense07:42
mehwork otherwise it's just a nop and not very helpful to a noob like me07:43
hbautista left07:46
xiongxin joined07:47
GNUmoon joined07:47
fikran left07:52
spare joined07:52
structoha left07:52
Xenguy__ joined07:53
meator left07:53
fikran joined07:54
causa-sui joined07:55
Xenguy_ left07:55
structoha joined07:56
mehwork when `git commit --ammend` changes the commit SHA, does that technically mean it created a new commit? It's still the same _amount_ of commits. So did it just rewrite the history?07:57
osse yes07:58
you replace one commit with another07:59
mehwork i noticed i can still `git show <old commit it replaced>` though07:59
but git log isn't showing it anymore07:59
so it's a combination of creating a new commit and rewriting history?07:59
causa-sui left08:00
osse the old commit data is still lying around because git is lazy about cleaning up after itself08:00
so the data is still obtainable if you know the hash08:00
mehwork does it ever get cleaned up?08:00
osse but git log (without args) starts from the branch name, and goes from there.08:00
yes, git periodically runs 'git gc --auto' which checks if there's too much garbage08:01
palasso joined08:01
mehwork i just manually ran git gc --auto and it didn't clean up that old commit08:02
osse there's not enough garbage I guess08:03
mehwork interesting08:03
osse to clean it up you'd have to do git gc --really-delete-everything --no-i-mean-it --just-do-what-i-say08:03
causa-sui joined08:03
osse (that was a joke. but git is a bit careful)08:03
mehwork i see08:04
osse in your case the old commit is still referenced by the reflog (reflog != log) so it'll be about 90 days before git starts to care08:05
!reflog08:05
gitinfo The git reflog (`git log -g`) temporarily (90 days by default) snapshots your branch states at each operation that changes the branch, making it easy to undo e.g. merges and rebases. The usual warnings about !rewriting/undoing history apply. See https://sukima.github.io/GitFixUm/ for full details.08:05
osse but if you clear the reflog and say that git should remove all unreference objects then it should get deleted08:05
Xenguy joined08:06
unluckyshrubbery left08:06
Xenguy__ left08:06
Jong joined08:07
causa-sui left08:08
rfuentess joined08:08
MajorBiscuit joined08:10
abu joined08:12
Major_Biscuit joined08:15
feriman joined08:17
MajorBiscuit left08:18
iomari891 joined08:21
bleb I have local changes which conflict with the master repo08:22
so git pull says error: Your local changes to the following files would be overwritten by merge: ... Please commit your changes or stash them before you merge.08:22
just want to make sure I'm doing this the "right" way: do I run git stash, then git pull, then git stash apply to begin the merge?08:23
osse pull does the merge part08:24
but yes, the order is correct08:24
feriman left08:24
bleb I tried it and the auto-merge happened when I ran git stash apply08:25
what would I have had to do for pull to do the merge?08:25
vysn left08:25
osse miscommunication08:26
causa-sui joined08:26
osse there are two merges involved. git pull does one (as in it runs 'git merge')08:26
stash applies the changes you have, which can be called a merge, I guess, but it's more like applying a patch08:26
bleb ok, but the first merge happens only if you have conflicting commits08:28
I only had conflicting changes in my working directory08:28
yes?08:28
osse yes08:28
bleb cool thanks08:28
dsrt^ joined08:30
causa-sui left08:30
earthbreaker left08:35
earthbreaker joined08:36
dzho left08:37
nickel715 joined08:40
EvilDMP joined08:41
duxsco joined08:42
coot joined08:46
cliluw left08:49
tureba joined08:49
cliluw joined08:50
kenanmarasli joined08:51
dzho joined08:52
causa-sui joined08:52
furrymcgee joined08:59
Sulky_ joined09:00
GreenAlpaca joined09:00
causa-sui left09:00
jimklimov joined09:01
causa-sui joined09:01
Codaraxis joined09:03
whatsupdoc left09:03
jimklimov left09:05
jazzy joined09:06
causa-sui left09:06
Codaraxis_ left09:06
feriman joined09:13
AnapodoPsalidaki joined09:16
AnapodoPsalidi left09:18
Disconsented joined09:19
Murr left09:20
teut joined09:20
Murr joined09:20
murii joined09:23
teut left09:25
nyah joined09:26
mud left09:28
mud joined09:28
carl-- left09:29
carl- joined09:29
bkircher left09:31
Disconsented left09:31
causa-sui joined09:31
Disconsented joined09:32
Gurkenglas left09:32
dlam joined09:32
causa-sui left09:35
TheCatBehemoth joined09:38
tirnanog left09:38
xiongxin left09:38
___nick___ joined09:41
irc_user left09:42
BinarySavior_ left09:46
BinarySavior joined09:48
xiongxin joined09:48
xiongxin left09:52
mannequin joined09:58
dlam left09:58
causa-sui joined09:59
Gustavo6046 left09:59
adonis joined10:00
fikran left10:02
causa-sui left10:03
Disconsented left10:03
fikran joined10:04
unluckyshrubbery joined10:06
feriman left10:06
coot left10:10
coot joined10:13
hazmi35 joined10:16
chenqisu12 joined10:20
chenqisu1 left10:23
causa-sui joined10:23
Akiva left10:25
Disconsented joined10:26
dlam joined10:26
causa-sui left10:29
maxzor joined10:34
vysn joined10:38
Lord_of_Life_ joined10:44
jlucas_ joined10:44
Lord_of_Life left10:44
jlucas left10:44
teut joined10:45
Lord_of_Life_Lord_of_Life10:45
kaiseisei left10:47
spare left10:57
Swahili left10:58
Swahili joined10:59
Codaraxis_ joined11:03
Codaraxis left11:03
Codaraxis_ left11:07
Codaraxis_ joined11:07
zen_coder joined11:08
jlucas joined11:10
jlucas_ left11:11
madewokherd joined11:12
j416 lmat: dev yes. not freelance.11:16
vishal joined11:16
Gurkenglas joined11:21
ch joined11:25
cdown joined11:25
causa-sui joined11:26
tulpa_ joined11:28
perrierjouet left11:28
causa-sui left11:30
causa-sui joined11:31
___nick___ left11:35
causa-sui left11:36
___nick___ joined11:36
___nick___ left11:36
causa-sui joined11:37
___nick___ joined11:38
causa-sui left11:41
___nick___ left11:42
___nick___ joined11:43
pileatedx joined11:44
causa-sui joined11:45
adonis left11:48
causa-sui left11:49
causa-sui joined11:49
TomyWork joined11:50
YuGiOhJCJ joined11:51
causa-sui left11:54
natrys joined11:55
unluckyshrubbery left11:56
DrowningElysium joined11:57
causa-sui joined11:59
causa-sui left12:03
AbleBacon left12:04
causa-sui joined12:05
TheCatBehemoth left12:06
causa-sui left12:09
elkalamar_ joined12:10
fikran left12:11
elkalamar left12:12
fikran joined12:13
BSaboia joined12:13
causa-sui joined12:15
causa-sui left12:19
lunix00 joined12:21
BSaboia left12:24
tyson2 joined12:27
causa-sui joined12:28
aniruddha left12:28
jlucas left12:29
jlucas joined12:29
dob1_dob112:31
causa-sui left12:33
perrierjouet joined12:34
elkalamar_ left12:36
zen_coder left12:36
causa-sui joined12:38
Codaraxis_ left12:40
unluckyshrubbery joined12:41
causa-sui left12:42
tehenderz left12:43
tehenderz joined12:43
causa-sui joined12:50
duderonomy left12:56
causa-sui left13:01
hazmi35 left13:01
emanuele6 left13:06
durham joined13:06
causa-sui joined13:07
abu left13:08
cek joined13:09
cek left13:09
kernelspace are tags branch-related ?13:10
durham left13:10
causa-sui left13:11
chenqisu12 left13:12
bremner no13:14
emanuele6 joined13:15
OnkelTem left13:18
Murr left13:19
Murr joined13:20
teut93 joined13:22
causa-sui joined13:24
teut left13:25
causa-sui left13:29
xkuru joined13:29
causa-sui joined13:29
lgc joined13:30
lgc left13:30
ikke Tags and branches are at the same level conceptually13:33
realtime-neil left13:33
causa-sui left13:33
lunix00 left13:38
causa-sui joined13:40
causa-sui left13:44
robertparkerx2 joined13:44
robertparkerx2 left13:45
polyphem joined13:45
polyphem i recently stumbled over git-flow and find it quite reasonable , however after doing a bit of research i found that it is regarded obsolte/deprecated it favour of trunk based development which is more useful for ci/cd , but i think a lot od open source projects still do git flow, can someone experienced give me a clarification on the current best practices please ?13:49
ekathva joined13:50
ekathva left13:50
dman777 left13:52
cmbengue joined13:54
causa-sui joined13:54
fdan joined13:54
fdan how to rebase the PR on latest master13:54
some context: I have forked a repo and then made changes and created a PR13:55
now i would want to rebase the PR on latest master13:55
how would i do that13:55
j416 fdan: git fetch && git checkout yourbranch && git rebase origin/master13:55
fdan j416 how can i do a git clone of my forked repo?13:56
j416 git clone <url>13:56
fdan sure13:56
git fetch && git checkout yourbranch && git rebase origin/master13:57
this command needs to be run from my forked repo?13:57
lericson never underestimate git clone <path_on_local_filesystem>13:57
cmbengue left13:57
fdan j416: it says Your branch is up to date with 'origin/master'.13:58
j416 fdan: then all good13:59
causa-sui left14:00
polyphem ^?!14:01
causa-sui joined14:01
causa-sui left14:05
teut93 left14:06
bloody joined14:09
fdan git fetch is different from git fetch upstream?14:12
osse it can be14:13
FinnElija left14:14
causa-sui joined14:16
xkuru left14:17
fikran left14:20
causa-sui left14:20
xkuru joined14:20
FinnElija joined14:21
BSaboia joined14:22
fikran joined14:22
BSaboia left14:26
causa-sui joined14:26
Xenguy left14:27
fdan left14:28
causa-sui left14:31
wgrant joined14:32
AnapodoPsalidaki left14:36
BSaboia joined14:38
BSaboia left14:39
Xaldafax joined14:40
rapiz joined14:41
rsx joined14:44
BSaboia joined14:46
BSaboia left14:47
elkalamar joined14:47
molt joined14:49
TheCatBehemoth joined14:51
BSaboia joined14:53
drogas joined14:53
BSaboia left14:54
node1 joined14:54
skapata joined14:55
skapata left14:55
skapata joined14:55
fdan joined14:57
fdan Hi there, i get this error You are in 'detached HEAD' state14:58
https://bpa.st/M7CA14:58
could someone help me how to fix this14:58
ChmEarl joined15:00
texasmynsted left15:01
node1 left15:02
fdan could someone help me15:03
canton7 !detached15:05
gitinfo A detached HEAD (aka "no branch") occurs when your HEAD does not point at a branch. New commits will NOT be added to any branch, and can easily be !lost. This can happen if you a) check out a tag, remote tracking branch, or SHA; or b) if you are in a submodule; or you are in the middle of a c) am or d) rebase that is stuck/conflicted. See !reattach15:05
mackerman fdan: You made a commit not on a named branch. That is called detached15:05
andi_ joined15:05
mackerman git gave some hints as to how to create a branch, if you wish to do so.15:05
fdan mackerman i get this message from the build tool15:05
and its one of the docker image building steps15:06
how do i resolve this15:06
causa-sui joined15:06
canton7 It's cause by the fact that you said to checkout a commit hash directly: '&& git checkout ${COMMIT_SHA} \'. However, that's unrelated to the patch failing to apply15:06
mackerman Ask whomever wrote that patch to fix it, or fix it yourself.15:07
canton7 It looks like your probably is just that the patch isn't applying: if this is a build system, it's probably fine and intended that you're detaching the HEAD, as you won't be making any commits15:07
(git throws up that big warning because it's easy to accidentally lose work if you detach your HEAD and then make commits. You can silence it with 'git checkout --detach ${COMMIT_SHA}')15:08
*It looks like your problem is just that15:08
coot left15:10
BSaboia joined15:10
fdan canton7 if i try to to rebuild , i get the same error15:10
how can i fix this?15:10
BSaboia left15:10
bookworm by rewriting the patch so that it applies15:11
fdan can i do git stash; git checkout master; git stash pop; git push15:11
canton7 fdan, presumably that patch is supposed to be applied to that commit? Otherwise why does the build step specifically check out that commit?15:12
The first step to solving the problem is understanding why it's happening...15:12
fdan the commit hash belongs to the release https://github.com/decred/dcrd/commit/74a67dce24802169142990a6a9797653354b31cc15:13
thiago joined15:13
GreenAlpaca left15:16
BSaboia joined15:17
BSaboia left15:18
canton7 So presumably you actually want to use that release in your build?15:19
Thanatermesis joined15:21
fdan yes15:21
thats right15:21
jazzy left15:22
lesshaste joined15:24
lesshaste how can I git clone https://github.com/dmlc/dgl/tree/0.7.x/docs ?15:24
vimal left15:24
bookworm clone the repo, if necessary with a filter assuming you just want the doc subdir15:25
https://stackoverflow.com/a/1373895115:26
lesshaste thanks15:27
fdan could you guys help me15:27
j`ey joined15:28
j`ey how can I get --no-color, from .git/config? I tried [ui]\ncolor=false15:29
ok [color] ui, not [ui] color15:32
fdan [20:28:38] <fdan> Hi there, i get this error You are in 'detached HEAD' state15:33
[20:28:41] <fdan> https://bpa.st/M7CA15:33
could someone help me please15:33
osse fdan: that's what happens when you checkout a sha1 directly15:35
it's no big deal15:35
fdan but the error says failed15:36
1 out of 1 hunk FAILED15:36
bookworm that's because your patch doesn't apply cleanly15:36
fdan so how to fix this15:36
bookworm rewrite the patch so that it does15:36
fdan i saw the git commands in other repo, the commands look similair but this is the only repo where the build is failing15:36
bookworm when you say rewrite the patch? how can i do that15:37
bookworm where did you get the patch from?15:37
you are applying a patch from /app/whatever15:37
vysn left15:37
fdan from here https://github.com/decred/dcrd/commit/74a67dce24802169142990a6a9797653354b31cc15:37
bookworm if it's in the same repo, why are you even doing that via patch? Just use git and tell it to cherry-pick that commit15:38
fdan bookworm what is this command `&& patch -N -p1 < /app/assets/0001-allow-any-notls.patch`15:39
bookworm patch is a cli tool that applies a patch file (a diff)15:39
causa-sui left15:39
fdan can i remove the command15:39
Xaldafax left15:39
fdan would that work?15:39
bookworm sure15:39
then you wouldn't patch the source15:39
fdan this is not my repo but still touching15:39
thats a standard process for us to checkout a new release15:40
bookworm to immediately patch it?15:40
seems strange to me but godspeed15:41
but considering the name of the patch file I seriously doubt that it is related to https://github.com/decred/dcrd/commit/74a67dce24802169142990a6a9797653354b31cc as you've said15:42
wyre hi guys, could I remove a specific commit?15:42
bookworm as that would be the worst patch file naming in history15:42
wyre: define remove, you can with rebase but it modifies the history15:43
wyre I mean, like if it wouldn't be there ever15:43
bookworm better is to revert it15:43
password or some such?15:43
wyre s/wouldn't be/wouldn't have been/15:43
bookworm, nope, just a change in docs that I have to revert15:43
bookworm then just revert it, no harm done15:44
unless that thing wasn't public yet, then rebase is fine15:44
wyre bookworm, how?15:44
I mean, is there git revert?15:44
bookworm literally, yey15:44
wyre oh, I see15:44
bookworm yes*15:44
wyre hehe15:44
madewokherd` joined15:53
funkytwig joined15:54
madewokherd left15:56
kenanmarasli left16:01
kenanmarasli joined16:02
jlucas left16:11
jlucas joined16:12
reset joined16:14
clime i guess, with git, you can't you commit into a different branch than you are in? something like git commit -a --target-branch <something>?16:15
causasui joined16:15
ikke not with the porcelain16:16
The problem is, unless you update the index to first match the target branch, the commit would most likely not look like you expect16:17
clime ok16:18
bluesm joined16:18
clime i sometimes want to test something dirty and quick but at the same time i need to track that state...16:19
Jong where is the git submodule commit id stored?16:19
I remember it was in some file16:19
Subproject commit aab3edawefawef16:19
something like that16:19
imMute Jong: the "file" where the submodule is.16:19
Jong: so if your repo has a submodule at foo/bar/baz then the parent project records a file at foo/bar/baz with the submodule commit SHA16:20
Jong what's the name of the file?16:20
imMute Jong: it's the path to the submodule16:20
(when stored in the git DB)16:20
pileatedx left16:20
Jong you mean under the hidden .git folder?16:21
imMute yes16:21
and it's not necessarily stored as a file in there either (it might be part of a pack)16:22
Jong Is the file name called HEAD ?16:22
I see the commit id stored there16:22
imMute no, that's something else16:22
Jong I'm looking in <myrepo>/.git/modules/<mysubmodule>16:24
is it there?16:24
you said it's in a file named the same name as the submodule?16:24
imMute the HEAD in there would be the currently checked out commit in the submodule. that may or may not be the commit that the parent project has recorded for the submodule16:24
it's a "file" in the git DB. it's not a file on the filesystem though.16:24
a better question is, why do you want access to this file?16:24
skapate joined16:25
skapate left16:25
skapate joined16:25
clime i guess, i can just make some bash macro, that will stash, checkouts, unstash, commits, and checkouts back...shouldn't be that difficult...16:26
skapata left16:27
atrigent left16:28
mar77i left16:29
fikran left16:30
atrigent joined16:31
fikran joined16:32
DoofusCanadensis joined16:33
great_taste joined16:37
Jong imMute I want to update the submodule repo commit id to a newer commit, but not the very latest of the submodule repo.16:39
imMute git -C path/to/submodule checkout <sha you want>16:41
or cd to the directory and do 'git checkout <sha>' like normal16:41
XV8 joined16:43
Akiva joined16:43
EvilDMP_ joined16:43
EvilDMP left16:46
Jong imMute that's how to update the folder locally. I'm talking about updating the remote so next time anyone does git clone --recursive some_github_repo.git, it checks out the commit id I want it to.16:46
EvilDMP joined16:47
lunix00 joined16:47
imMute you have to commit the change to the parent repo too. you can't just "change a file" and have the submodule start pointing at a different version16:47
Jong to update remote, I need to commit something after checking out the new commit id16:47
imMute yeah, you have to do that no matter what16:47
Jong but to commit, I need to know which file to add so I can do git add16:47
imMute you add the path to the submodule.16:48
just do the git checkout in the submodule and then do 'git status' in the parent and you'll see the path marked as modified16:48
EvilDMP_ left16:49
polyphem git flow or trunk based development ? what is best practice ?16:50
Xaldafax joined16:50
EvilDMP_ joined16:50
madewokherd` left16:50
imMute polyphem: there is no best, do what works for your team/project.16:51
what works for one project might not work for another.16:51
my personal preference is one that's like git flow but what flow calls "develop" I call "master" (or "main" now I guess). and what flow calls "master" i don't have at all. and hotfixes are done on the relevant release branches.16:52
durham joined16:52
EvilDMP left16:53
polyphem i think open source projects prefer git flow , cause of untrusted contributors and PR with code review, whereas closed source project with trust between devs can easily use tbd , right ?16:53
imMute I think it's the opposite. the git flow model seems to be focused on things that have a production environment (like websites). most open source software is released by throwing a tarball up on the internet that others download and use16:54
bremner there are many ways to do code review16:54
imMute and even closed source project tend to use PRs when merging into the main development branch.16:55
zer0bitz left16:56
EvilDMP joined16:56
Betal joined16:56
cvmn joined16:59
EvilDMP_ left16:59
polyphem i thought git flow hinders ci/cd because of excessive branching wich isolates changes , whereas tbd is better cause steady commits to main are checked in integration pipeline to ensure all devs are "marching" in same direction and divergence and problems are easily discovered as soon as possible17:00
remedan left17:00
rapiz left17:00
polyphem hmm17:00
imMute CI shouldn't matter about your branching scheme. you should be able to run CI against any branch or any commit.17:02
Akiva left17:02
imMute CD shouldn't care about your branching scheme either - you should be able to run the deployment pipeline against any branch or commit (though sanity says you should only run it against some branches)17:02
polyphem i realy dont't know , i stumbled upon git flow a few days ago and find it reasonable , then i watched this video (https://www.youtube.com/watch?v=0lS0io4K86Y) which tells that its bad because of CI/CD stuff17:04
imMute it's probably more "paperwork" that other models for CD. but CI/CD is totally doable with git flow (and related methods)17:04
remedan joined17:05
polyphem so git flow isnt obsolete/deprecated/overcome and is still considered a got model ?17:05
mackerman Rants pro and con for any development flow are easy to find17:05
polyphem mackerman: guess so17:06
Sulky_ left17:06
imMute ^^ and no, there are still people who use git flow. don't be one of those people that hops on the bandwagon when it changes every 6 months17:06
as Bjarne said: there are two categories of programming languages [insert git branching model instead]: ones that people bitch about and ones that nobody uses.17:07
polyphem imMute: i thought so , how i said before i find git flow a reasonable aproach17:07
imMute I also find parts of it reasonable. and if I were working on a webapp-type project, I'd probably go with git flow simply because someone put in the time to make it easy to use from the CLI17:08
polyphem imMute: why this constraint to webapp projects ?17:09
imMute I'm having a hard time coming up with a generalization of it, but basically webapps have a production service that they run. so having CD to update that service multiple times a day/week make sense.17:10
but for embedded projects, you don't really have that, so being able to "release" multiple times a day doesn't really make sense.17:11
same with projects that just release libraries on the internet for other people to use: the time between releases is just typically longer17:11
mackerman Git flow assumes there needs to be a persistant always ready to release branch seperate from a development branch.17:12
polyphem mackerman: yes the main branch , that is fed from release branches that branch from develop and commit to master , right ?17:14
mackerman Others have explained git flow better than I cna.17:14
* can17:14
Graph what you doing in a diagram or whiteboard. Find the problems in the process.17:15
polyphem thats why you have the separation between main/master an develop17:15
j`ey left17:15
polyphem main always builds is ready , and develop adds features till next releas is merged into main17:16
rgrinberg joined17:16
Major_Biscuit left17:17
polyphem thanks however mackerman and imMute17:17
ph88 joined17:18
ph88 when i want to use git over ssh should i setup a linux user to use ssh ?17:18
imMute ph88: you could use your own linux user. you don't *need* a separate user for the simple cases17:18
ph88 i don't really have a linux user on the server side, just root17:21
maryo joined17:22
ph88 it's ssh protocol but will it connect to the normal ssh daemon or is the git server setting up it's own ssh server ?17:22
ikke ph88: normal ssh17:22
a non-root users is advisible17:22
ph88 how can that normal ssh access the repository ? how does git client know where it is located on the server and what about permissions on that folder ?17:24
mexen left17:25
imMute you pass the path to the repo in the remote URL. and the permissions are "as long as the SSH user can access the files"17:25
mackerman Relative paths in ssh URLs are in your home directory.17:26
tulpa_ left17:26
rgrinberg left17:28
ph88 home directory of which user ?17:29
like there is only 1 repository on the server right ... so if i have 5 different ssh users what happens then ?17:30
atrigent left17:31
Gurkenglas left17:32
madewokherd joined17:34
ikke ph88: the ssh user you specify in the remote17:34
___nick___ left17:34
ikke git clone username@domainname:path/to/repo.git17:34
rsx left17:34
atrigent joined17:35
bn_work joined17:35
mackerman For seperate users you might put the repo not in home direcotry, and give persmissions to everyeone who needs them.17:36
ph88 i am already able to access the repository over https. I didn't create an new ssh user yet17:36
ikke ph88: Are you planning to have multiple users access repositories?17:36
ph88 eh different developers get their own account i guess, but they can use https i guess17:37
ikke ph88: do they each get their own repositories, or are they going to push to shared repos?17:37
drogas left17:38
ph88 shared17:38
ikke Perhaps take a look at !gitolite then17:39
gitinfo Gitolite is a tool to host git repos on a server. It features fine-grained access control, custom hooks, and can be installed without root. Download: https://github.com/sitaramc/gitolite Docs: http://gitolite.com/gitolite/ Quick example: http://gitolite.com/gitolite/overview/#basic-use-case17:39
ikke It's very easy to setup17:40
ph88 in the docs it says git@... https://docs.gitea.io/en-us/faq/#ssh-issues then when i look at the server /etc/passwd i don't see a git user17:40
my boss wants me to use gitea17:40
ikke ah17:41
You need to explicitly create that user17:41
but with gitea, they handle most of this17:41
ThePhilgrim joined17:42
ph88 there is a gitea user for the deamon, that's all of user i see in /etc/passwd17:42
gitea:x:465:464:Gitea daemon:/usr/share/gitea:/bin/bash17:42
ikke https://wiki.archlinux.org/title/Gitea#Enable_SSH_Support17:43
The_Blode left17:43
ph88 thanks !17:45
Betal left17:46
mackerman See also #gitea channel for help with it17:46
YuGiOhJCJ left17:46
rfuentess left17:47
ekathva joined17:48
ekathva left17:48
EvilDMP left17:48
irc_user joined17:50
EvilDMP joined17:50
irc_user left17:50
tehenderz left17:51
tehenderz joined17:51
tyson2 left17:52
lungaro_ is there a way to get a list of just untracked files?17:54
suitable for deleting them?17:55
Voker57 git clean -n17:55
imMute lungaro_: and use git clean to delete them ;)17:56
lungaro_ nice17:56
thanks17:56
rgrinberg joined17:57
AbleBacon joined17:57
The_Blode joined17:58
Sulky joined17:59
vicfred joined17:59
Gustavo6046 joined18:02
ThePhilgrim left18:05
ThePhilgrim joined18:05
tirnanog joined18:15
Akiva joined18:17
TimWolla joined18:21
jlucas_ joined18:23
jlucas left18:24
lungaro_ is it possible to have hooks in git to transparently encrypt and decrypt objects with gpg? Such that, on commit they get encrypted and on checkout they get decrypted/18:26
zmt00 joined18:27
lungaro_ i'm gonna say no, as it breaks the git model entirely, but maybe i'm missing something18:27
Gustavo6046 left18:28
tulpa_ joined18:31
zen_coder joined18:32
imMute smudge/clean filters could do that18:32
coot joined18:32
lungaro_ just trying to have an elegant solution to storing my dotfiles using git and also sharing them. But passwords currently stop me from sharing18:33
haha18:33
maybe its as simple as treating all my files as jinja templates or something, but that's kinda annoying18:34
fdan left18:34
Akiva left18:38
fikran left18:39
fikran joined18:41
tyson2 joined18:43
Gustavo6046 joined18:48
vysn joined18:50
Sulky left18:50
ph88 left18:56
maryo left18:58
ubique joined18:59
TomyWork left19:00
mw_ left19:00
Gustavo6046 left19:00
lechner joined19:00
bluesm left19:08
igemnace left19:09
Gurkenglas joined19:11
goldfish joined19:12
duxsco left19:16
rgrinberg left19:17
carl- left19:19
mw_ joined19:20
rgrinberg joined19:21
duxsco joined19:29
troyt joined19:30
crashrep joined19:31
cliluw left19:33
zen_coder left19:37
arcatech joined19:39
node1 joined19:42
node1 left19:43
node1 joined19:44
funkytwig_ joined19:45
node1 left19:45
funkytwig left19:48
zmt00 left19:50
node1 joined19:50
node1 left19:51
node1 joined19:51
cliluw joined19:51
troyt left19:53
node1 left19:53
node1 joined19:54
oprypin joined19:55
coot left19:57
troyt joined19:57
node1 left19:57
iomari891 left19:57
coot joined19:57
ubique left19:58
Ilyu left20:03
dustinm joined20:05
natrys left20:05
coot_ joined20:10
cvmn left20:11
coot left20:14
Ilyu joined20:18
coot_ left20:23
TheCatBehemoth left20:26
Ilyu left20:26
Betal joined20:33
rgrinberg left20:38
zmt00 joined20:45
zmt00 left20:48
fikran left20:48
fikran joined20:50
cliluw left20:53
llh left20:54
cliluw joined20:54
llh joined20:55
zmt00 joined20:56
spare joined20:58
wootehfoot joined20:58
OnlineCop I've got a Unity project where some files are .gitignore'd: `*.sln`, `*.csproj`. I want to have Unity re-generate the .sln and .csproj files for me, so I can compare how those files have changed from a fresh regeneration to what it is now. Would I want to `git add --force` those ignored files, push or stash them so I have something to diff against, generate the new ones, and when I'm done, restore those files?21:00
Hawker_ joined21:05
Hawker_ left21:06
frobnic joined21:06
zebrag joined21:07
vysn left21:13
otisolsen70 left21:17
dsrt^ left21:22
lmat j416: Sweet. Rock on!21:22
OnlineCop: Are there .sln or .csproj files in the repo?21:23
noex joined21:25
anddam joined21:27
MajorBiscuit joined21:28
anddam hi, I cloned a github repo, then create a private repo, added it as "secondary" remote. I now want to clone origin onto secondary, i.e. push all branches21:29
eamanu in the secondary you should add remote origin21:30
and then git pull origin21:30
anddam do I have to create a tracking branch per each remotes/origin/* ?21:30
murii left21:30
anddam eamanu: what?21:31
eamanu If I understand ok, you have a repo X and you want to pull from repo Y?21:31
anddam no, I want to clone from X to Y, Y is empty21:31
push --all Y wil push local branches, but I have only master as tracking branch21:32
all remotes/origin/FOO and remotes/origin/BAR are missing21:32
eamanu ahh21:32
git fetch?21:32
anddam question is if I have to create all local (tracking) branches21:32
I am fully fetched21:32
madewokherd left21:33
lunix00 left21:34
anddam I did just parse git branch output, but I wonder if there was a straightforward command to perform that21:39
another| git branch -a21:41
j416 lmat: haha. thanks though.21:41
junktext left21:44
Betal left21:47
OnlineCop lmat: There aren't any .sln or .csproj files in the repo, no. Since they were all untracked, I wanted to know a good way to "track" them so I could check out the diffs, and then reset the HEAD to before I had modified them.21:47
xx left21:47
mackerman OnlineCop: Or, don't track them, but move them to a different file name, generate the other version, and diff21:49
aLeSD left21:57
cliluw left21:58
cliluw joined22:00
junktext joined22:00
tulpa_ left22:01
duxco joined22:02
coot joined22:02
duxsco left22:03
duxcoduxsco22:03
maxzor left22:03
tchan joined22:05
anaveragehuman joined22:24
toma joined22:27
jjakob left22:33
coot left22:33
jjakob joined22:34
m0viefreak joined22:37
mven joined22:37
mven left22:37
mven joined22:37
madewokherd joined22:49
nickdiaz1wag209 joined22:51
ChmEarl left22:51
nickdiaz1wag209 i feel like sometimes the upstreams are set for me automatically because i dont have to set them very often. maybe a handful of times ever, and i interface with new repos (for me, but these repos have been worked on by other people for a while), pretty often22:52
when are upstreams automatically set in git?22:52
troyt left22:52
nickdiaz1wag209 i created a new repo, and created a new branch. The main has upstream automatically set, but my new branch doesn't. When I use "git pull", it tells me i need to specify which branch i want to merge with"22:52
DoofusCanadensis upstreams are set when you check out an existing branch22:54
the developer needs to set the upstream the first time they push a new branch22:54
nickdiaz1wag209 ah ok22:54
everything makes sense then22:54
if i blow away my current repo, and then just re-clone, it should have all the upstreams set up for all existing branches then22:55
and it does22:56
mackerman git checkout -b <branch> # will do the same as git checkout -b <branch> --track <remote>/<branch> if exactly one tracking branch by that name exists22:56
And the --guess flag is the default.22:56
troyt joined22:56
fikran left22:57
nickdiaz1wag209 "if exactly one tracking branch by that name"... i dont quite understand this. I take it you dont mean another branch with same name. Whats a situation where theres more than one tracking branch?22:58
osse if you have more than one remote then you can have both origin/master and myfork/master22:58
mackerman Multiple remotes. origin/branch upstream/branch22:58
nickdiaz1wag209 ahh22:59
thanks guys :)22:59
fikran joined23:00
BSaboia joined23:00
BSaboia left23:01
pizdets_ left23:03
pizdets joined23:04
jimklimov joined23:09
igemnace joined23:09
ChmEarl joined23:09
Celeo joined23:09
ThePhilgrim left23:11
Gurkenglas left23:13
MajorBiscuit left23:13
jimklimov left23:17
ivanzep joined23:18
Murr left23:19
Murr joined23:19
mooz joined23:22
structoha left23:22
Crispy left23:29
cvmn joined23:30
murii joined23:31
Pseudocrat left23:31
Pseudocrat joined23:33
Akiva joined23:34
murii left23:35
lavos joined23:46
DoofusCanadensis left23:47
duxco joined23:47
duxsco left23:47
duxcoduxsco23:47
zebrag left23:48
molt left23:49
foul_owl joined23:51
furrymcgee left23:53
palasso left23:54

Logs Search ←Prev date Next date→ Channels Documentation