#garfield Logs
Jan 16 2024
#garfield Calendar
01:50 AM polprog: 02:39 < rue_mohr> there is a guy in twitter going on a rant that the 1 bit computer I'm doing isn't 1 bit
02:03 AM polprog: haha
02:03 AM polprog: well there is obviosuly more than 1 bit of information in it !!
02:03 AM polprog: crooks everywhere!
11:25 AM aandrew: rue_mohr> there is a guy in twitter going on a rant that the 1 bit computer I'm doing isn't 1 bit
11:25 AM aandrew: hey now I was only making jokes, don't be like that
05:25 PM polprog: https://www.youtube.com/watch?v=XvEnKLQ2UMc
05:25 PM polprog: new generator
05:25 PM polprog: needs fixin
05:29 PM Tom_L: how well do you know git?
05:29 PM Tom_L: someone has a repo that i forked. i want to sync the fork but do it from a bash command instead of from a url with firefox etc
05:36 PM polprog: sync as in get the lastest changes from the repo or send yours to the repo?
05:36 PM Tom_L: get from master to the fork
05:36 PM Tom_L: but do it from my local pc
05:36 PM polprog: then do a 'git pull'
05:36 PM polprog: in the repo directory
05:37 PM Tom_L: currently i log into my git account and the repo and do a sync
05:37 PM Tom_L: but i'd like to automate that
05:37 PM polprog: git pull does that, if you have the credentials right
05:37 PM Tom_L: i don't push changes to the master git just pull from
05:37 PM polprog: none needed if the remote is over https
05:37 PM polprog: (see 'git remote')
05:37 PM polprog: if its ssh://, then it needs the SSH key
05:38 PM Tom_L: then for my local copy i do git fetch origin; git reset -- hard origin/master
05:38 PM Tom_L: i have ssh set up
05:38 PM polprog: this sounds allright
05:38 PM Tom_L: but that's just from my fork to my pc
05:38 PM Tom_L: ^^^
05:38 PM polprog: git pull does these two at once, it does a fetch and updates the working directory
05:39 PM Tom_L: so how do i go from the master to my fork?
05:39 PM polprog: huh
05:39 PM Tom_L: both on github
05:39 PM polprog: whats the github repo you want to pull changes from?
05:39 PM polprog: the public one or yours?
05:39 PM Tom_L: i run a fork just for safety and he pulls in the changes
05:39 PM Tom_L: one sec
05:40 PM Tom_L: https://github.com/jethornton/mesact
05:40 PM Tom_L: https://github.com/tlight9/mesact
05:41 PM Tom_L: the first one is the one i want to pull from and sync mine then i'll pull a local pc copy from mine
05:41 PM Tom_L: or push to mine
05:41 PM polprog: allright
05:41 PM polprog: the easiest way would be to add yours as a second remote
05:41 PM Tom_L: i build debs for him then push them back
05:41 PM polprog: then pull from 'origin' and push to your remote
05:41 PM Tom_L: it doesn't have to be automated as it works ok as is
05:42 PM polprog: if the ssh key from that machine is added to your github account then its just as simple ass
05:42 PM polprog: as*
05:42 PM Tom_L: the push to my remote would trigger his as changes made though wouldn't it?
05:42 PM polprog: no, they are separate
05:42 PM polprog: its just gonna increase the "x commits behind" counter
05:42 PM polprog: or rather
05:42 PM polprog: zero it
05:42 PM polprog: git remote add mine git@github.com:tlight9/mesact.git
05:43 PM polprog: ^ this is to add your repo as the second remote called mine
05:43 PM polprog: then the cycle to update yours on changes from the public one is
05:43 PM polprog: git pull -X theirs origin master
05:44 PM Tom_L: is 'mine' a local pc copy?
05:44 PM polprog: git push mine master
05:44 PM polprog: its just the local name for your repo on github
05:44 PM Tom_L: mmm
05:44 PM Tom_L: i'm too new to git to follow all this i think
05:44 PM Tom_L: i somewhat get it
05:44 PM polprog: its just two commands
05:45 PM polprog: 'git pull -X theirs origin master' downloads the changes and applies them to the working directory, "-X theirs" makes it prefer the remote version if the local files disagree (merge conflict)
05:45 PM polprog: 'git push mine master' uploads the local version to your own repo on github
05:45 PM Tom_L: what's the -X for?
05:46 PM polprog: and the 'git remote add ...' adds your repo as a remote under the name 'mine'
05:46 PM Tom_L: right now i use git gui to push back to mine
05:47 PM polprog: the extra parameters specify which remote and branch to use if you dont want the default
06:10 PM rue_mohr: aandrew, fancy
06:15 PM Tom_L: polprog, so i have to pull it to the pc from his first then push it back to my git repo to sync the two on git?
06:23 PM rue_mohr: Tom_L, do you know what files changeD?
06:33 PM Tom_L: never
06:44 PM rue_mohr: I have a method, but I dont think it works for you
06:45 PM rue_mohr: or is it your repository?
06:45 PM Tom_L: it's alright, i have to log in to move it back to his anyway
06:45 PM rue_mohr: I have my master copy on my server
06:46 PM rue_mohr: so I create the project on github, (empty) clone it to a temp folder, change everything, and upload it
07:14 PM Tom_L: it works well enough
07:15 PM Tom_L: i update via web, fetch the changes to my pc, build amd64, arm64 & armhf debs and push those to my git repo
07:15 PM Tom_L: then create a pull request for him
07:36 PM rue_mohr: tom, know of anyone with a bantam cnc?
07:39 PM rue_mohr: the web results are strange, its like, ALL ads
07:40 PM Tom_L: never heard of it
07:40 PM rue_mohr: its like nobody who wasn't sent one to review has one
07:40 PM rue_mohr: I'v heard the name before, but I couldn't remember where
07:41 PM Tom_L: https://store.bantamtools.com/products/bantam-tools-desktop-cnc-milling-machine
07:41 PM Tom_L: not for $7k
07:41 PM rue_mohr: hah, oh, I didn't look
07:41 PM Tom_L: only 1/4" tooling too
07:41 PM rue_mohr: maybe thats why
07:41 PM rue_mohr: its a school machine
07:42 PM Tom_L: edu love to spend somebody else's money
07:42 PM Tom_L: can't figure out the local push yet
07:42 PM rue_mohr: what are you trying to do?
07:43 PM rue_mohr: what should I do on the weekend?
07:53 PM Tom_L: i build to debs locally and just want to push the changes back to my repo
07:55 PM Tom_L: something like git push git@github.com:tlight/mesact.git but i'm not sure how to address the local copy
07:55 PM Tom_L: something like git push --repo git@github.com:tlight/mesact.git but i'm not sure how to address the local copy
08:03 PM Tom_L: just wish i could see behind git gui to see the actual command
08:04 PM Tom_L: must need to stage changes first
08:31 PM Tom_L: haha got it
08:31 PM Tom_L: git add
08:31 PM Tom_L: git commit
08:31 PM Tom_L: git push
08:31 PM Tom_L: done
08:35 PM Tom_L: add is the same as stage changes
08:48 PM Tom_L: rue_mohr,
08:49 PM Tom_dev: http://paste.debian.net/1304347/
08:49 PM Tom_L: pulls the changes, builds and returns the debs to the repo
10:49 PM Tom_L: now to figure out how to pass a cmd line parameter to the script
10:50 PM Tom_L: for the commit -m message
10:50 PM Tom_L: and if omitted the default one will be sent
10:59 PM Tom_L: and that's figured otu
10:59 PM Tom_L: out