#help-with-git

1 messages · Page 3 of 1

topaz whale
#

To reset branch a, checkout the commit you want to revert it to, and to a "force push"

#

With something like "git push -f <local branch>:branch_a"

#

A "headless" checkout of the commit hash works well for something like this

#

Does this make sense?

fair ingot
#

oh neat! I didn't realize that you could push commits onto upstream branches that is not the same as the upstream for the branch being pushed from.

topaz whale
#

Sure can! You will probable also be interested in the "-u" or "--set-upstream" setting; this will set the local branch to track whichever remote branch you specify

#

(So you don't have to keep specifying it)

waxen hill
#

When a branch is clean and you're about to do new work on it, git checkout -b my_backup_Branch helps a lot.

spiral epoch
waxen hill
#

The trick is to erase them (or at least systematize how they are named) when their immediate utility is gone.

#

I also push to another directory on the same hard disk, as a local remote.

#

This way if it's really terrible, I just damaged an asset no viewing member of the public will see.

#

With recursive copying this amounts to 'free trials' to try out dangerous git commands with low penalty.

fair ingot
#

NGL a bunch of that went over my head. However, It''l be great fodder for google foo. The experimental pushes to a local remote is a great idea i never would have thought of .

#

Thank you (plural you)

topaz whale
#

To Hugo's point: doing a force-push is not ideal, and is not something you're supposed to do with remote branches anyone cares about

#

Definitely be careful

#

One thing I do sometimes, is to run the push without the "-f" flag

#

If it doesn't work, it's error message is helpful confirmation that I have the right branch

#

(Then I run the force-push)

fair ingot
#

thoughts on git cherry-pick ?

topaz whale
#

For a situation where you meant to push to a different branch, cherry-pick isn't advisable

#

It's really a kind of copy-paste, and doesn't maintain relationships the way merge does

spiral epoch
#

I view a cherry-pick more as applying a .patch (or several) from another branch. That could be the original "wrong" branch, but it could also be for patching a change/feature/fix to a different version or branch without doing a full merge.

serene river
#

I ran the cookiecutter to create my library and pushed the code to my own repository. (Note: This is the first time I’m trying to do this outside of an existing Adafruit project.) It is failing pylint https://github.com/kmatch98/CircuitPython_DisplayIO_Animation/runs/2302161089. It doesn’t seem to be finding the library dependencies that I am using, (perhaps because it’s in my own repo and the libraries are in Adafruit_xxx_xxx ?). Did I do something wrong with the cookiecutter, or do I need to add something to help it find the imported libraries on GitHub?

spiral epoch
#

I'm trying to recall the particulars for being able to reference the other libraries. I'm tempted to say it wasn't the requirements.txt, but a different file that helped resolve those. But it's getting late and I've blinked since the last time I looked at that, but checking now to confirm

#

Maybe I am remembering it wrong after all, and it is a requirements.txt file that's needed within the "examples" directory

serene river
#

Thanks Hugo, I’ll look at requirement.txt and compare with an existing library to search out differences. Thanks for a pointer on where to look.

spiral epoch
#

Ok, I dug a bit more, and I think I see what's tripping up pylint... I think it's the from <library> import * where it doesn't see the functions translate and translate_relative, amont others, including the Animation class

serene river
spiral epoch
#

It doesn't seem like gc.mem_free() is standard Python, but rather, a Micro/CircuitPython add

sturdy talon
#

Couldn't TG Techie (Jonah) simply have switched to a new branch from the current commit on the current branch? If they didn't care about the current branch.

topaz whale
#

I think it was that they didn't care about the current upstream/remote

sturdy talon
#

I may have misunderstood the question but it seemed like the suggested answer was more work than necessary. I always read through this channel in case I learn something, and wanted to make sure I was understanding.

topaz whale
#

I think you're right, actually--I misread the combo of "push" and "wrong branch" as meaning the remote was wrong

#

But reading it again, it sounds like the changes were added on top of the wrong place

sturdy talon
#

It was the "I don't care if I destroy the current branch" that made me think you could simply make a new branch and forget about the old one.

#

But now I see where you were coming from.

#

Which is the important thing right now 😄

topaz whale
#

I wasn't coming from anywhere--I was tired!

#

It sounds like they did care about the recent changes--which might be behind the cherry-pick question

#

Cherry-picking a commit or a range will definitely move valued commits. Rebase --onto will also do that: https://womanonrails.com/git-rebase-onto
@fair ingot kattni pointed out that your question was a little different than my reading -- you were on the right track with cherry-pick.

Woman on Rails

Removing commits from a current branch or changing parent branch.

sturdy talon
#

Ah yeah.

#

Ok, thanks for clarifying! I would have not been helpful if I had been around, as you can see. 🙂

topaz whale
#

Well wait a minute--you were helpful, in pointing out that the question was different than the answer

sturdy talon
#

I suppose so. I hadn't thought of that angle.

spiral epoch
#

That's what I was thinking as well kattni, about creating the new branch from the current one. But everyone was already well down the current path, and the person most affected was ok with the solution.

#

Also, that's why I usually visit every channel - might not help, but will probably learn something from it!

#

And because people are so wonderful here, if I ask a seemingly basic question, not being an EE, they'll share what they know 🙂

fierce gate
#

Something really annoying is happening to me

#

And I'd like to make it stop

#

In the beginning of my repository, I accidentally committed useless files. Things in .gradle or .idea and the like

#

And now that they're in the repository base, they keep showing up in my local changes, and they're super annoying

#

It's gotten to the point where I can't commit or checkout, or rebase some times because of file permission errors on those files

#

How do I make the repository "drop" these files?

#

I currently just have them in a separate change list I hide them inside of, but still they cause weird errors and clutter

fierce gate
#

@topaz whale Thank you very much

#

This worked

lone cradle
#

If I am reviewing and older PR for a CP library and want to make changes to the PR. Do I fork the repo, checkout the PR and then push to the same branch-name on my fork or do I push to the upstream(adafruit) repo ?

spiral epoch
#

You'd work in your fork, and checkout the PR/branch

#

Then you could either a) create a PR to the branch of the original PR, or b) create a new PR with both changes against the Adafruit one

lone cradle
#

Thank you @spiral epoch

sturdy talon
#

@lone cradle The GitHub CLI makes it super easy. Check that out next time. It basically does all the git magic for you.

#

But what Hugo said works as well.

lone cradle
#

(I love that tool!)

sturdy talon
lone cradle
#

I'll try it next time, thanks for the tip

sturdy talon
#

You're welcome! Thanks for picking up older PRs!

carmine wedge
#

Related to that, there is the CLI tool in action, both basically you can do both, I did that for this particular test. This is courtesy of @pallid thicket that made that video to explain to me what to do.

topaz whale
sturdy talon
#

I've never needed to force push to deal with updating an existing PR and discourage it if it's not absolutely necessary.

topaz whale
#

It depends how any PR issues are addressed. If any issues in the PR are fixed with additional commits on the branch being reviewed, then it won't need a force-push. But, the commit history will always hold code that was at-issue, followed by fixes.

A different way to address issues is by editing in-place, in the commit history. Any PR feedback is folded into the commit history, so the critiqued/updated code is fixed in the patch where it was introduced. This tells a better story, and the feedback stays in the PR page. Because this second kind of editing rewrites history, if it's pushed to the same branch/PR it will need a force-push. Many of git's features revolve around editing one's own history, to improve and clarify things in response to feedback.

This second way is a common way to edit PRs, and I thought it might be what the questioner might be running into. There's a little more about why/how github supports this kind of review and update cycle:
https://blog.adamspiers.org/2015/03/24/why-and-how-to-correctly-amend-github-pull-requests/
https://github.com/isaacs/github/issues/997

lone cradle
#

My guess is if I wait long enough they will add a command to the github cli so this requires less thinking 😉

spiral epoch
gritty mural
#

just
git commit --amend and git push origin branch --force and you'll be good

#

😉

spiral epoch
#

Alright there, Steven Tyler! 😛
Unless the repo admin prevents for pushes 🤷

gritty mural
#

lol well, they don't at my job because they want a clean commit tree

#

this is why you fork the original repo and you can do it on yours

#

fork, branch, update, amend + force update, and then PR it

spiral epoch
#

There's also the other option - git rebase -i *gasp* Which lets you do local updates, squashes, rewording, etc.

gritty mural
#

Too much work

#

Lol

tawdry kayak
#

I would like to fork a specific example project in the Adafruit repo do I have to fork the whole directory of examples?

spiral epoch
# tawdry kayak I would like to fork a specific example project in the Adafruit repo do I have t...

When you fork a repository, you're making your own copy of the repository under your own account. This is typically for times when you want to make changes to the code and then merge those changes with the "root" project.

It sounds like what you might be trying to do is just get the code for a single project, so that you can work with it, and not really have your changes merged into the original project. Is that correct?

tawdry kayak
#

Yeah.

#

I'm modifying the code to run on a different platform

spiral epoch
#

It sounds like a clone with a sparse structure, since you don't want the whole codebase.

#

You can do that in 3 ways:

  1. Download a .zip of the repo, extract only the file you need and call it good
  2. Clone the repository locally, then delete any directories you don't need
  3. Perform a sparse clone, and checkout the directory you need
tawdry kayak
#

Ok I'll do a read on sparse clone. Thanks

spiral epoch
#

Good luck, and feel free to check back in if you run into any problems 🙂

tawdry kayak
#

Thanks for the education my head exploded a little

#

🤯

spiral epoch
#

Sorry for the mess :/

carmine wedge
#

@spiral epoch 🙂

#

Is there a way to rename a branch once is pushed?

spiral epoch
carmine wedge
#

oh well....

#

Thanks Hugo, 🙂

#

I did that, however the commit I could not rename it

spiral epoch
#

You can do git push --set-upstream <remote-name> <new-branch-name>

waxen hill
#
 $ git checkout -b newname
 $ git push origin newname
 $ git branch -D oldname
spiral epoch
#

Oh, you can edit commits. It's particularly easy if it's just one

#

Don't forget git push -D oldname

#

To delete the remote branch too, if not done through the UI/site/etc

carmine wedge
#

Thank you @waxen hill and @spiral epoch

waxen hill
#

You can

 $ git push origin :oldname
#

that'll delete it on origin

carmine wedge
#

gotcha lets try 🙂

spiral epoch
#

Git, like C/C++, gives you a whole bunch of fun ways to shoot yourself in the foot - sometimes without a way to recover said foot!

waxen hill
#

If you clone from one hard disk directory to another you can practice without penalty.

carmine wedge
#

lol

waxen hill
#
 $ git remote -v > record.of.remotes
 $ git remote add origin <foo>
 $ git remote remove origin
#

origin is the customary for the first one but you can have more than one.

#

I use origin and also localorigin for my hard disk cloned dir.

carmine wedge
#

I see

waxen hill
#

But note that if you clone a hard disk repo it gets named origin in the remote listing.

#

You can immediately git remote remove origin and then git add localorigin <foo>

carmine wedge
#

I see I will try that first

waxen hill
#

That way the preferred name of origin always points to github.

#

(Some times you just don't want 'the public' to see all your mistakes)

carmine wedge
#

lol

#

Agree

#

Thanks @waxen hill

waxen hill
#

;)

#

When I hit a checkpoint (good stopping place) I'll do this:

 $ git checkout main
 $ git checkout -b main-bbb-
 $ git push localorigin main-bbb-
 $ git branch -D main-aaa-
#

That way main-aaa- is only present locally until it's replaced by the next one in sequence.

#

But localorigin has the entire history of those like-named branches.

#

Be sure to use git branch -avv constantly, to keep aware of the current revisions of all branches, everywhere you have them (on all remotes).

midnight quail
#

Hey guys

#

What is git

#

Do you mean git from Github

vague loom
#

Yes but git is a free software independent on github, although its used there

strong hazel
#

Hi. I'm about to push a PR to PlatformDetect, but I made a mistake on a previous commit. Now I'm trying to do a git rebase, but I don't get how to use it. I'm trying to run it with -i but I think I made it worse.

earnest latch
#

Hi!

#

I’m just getting started with Git, but this looks like it can help

#

I am planning to share my Particle IoT projects on GitHub. It is pretty similar to Arduino and uses the same language. The libraries are stored inside the project directory (under lib). Should I include the libraries while pushing it to GitHub, or just add them to .gitignore and put the links to the libraries on readme? Or is there a better way that I’m not aware of? Thanks a lot in advance :))

#

Libraries are all open source BTW, including some Adafruit ones

waxen hill
#

@earnest latch I think the larger projects use git submodules.

 $  pwd ; cat .gitmodules 
/some/path/to/pico-sdk
[submodule "tinyusb"]
        path = lib/tinyusb
        url = https://github.com/raspberrypi/tinyusb.git
        branch = pico
#
 $ git clone -b master https://github.com/raspberrypi/pico-sdk.git
 $ cd pico-sdk
 $ git submodule update --init
earnest latch
#

Now it all makes more sense :))

#

Thanks a lot for your help!

waxen hill
#

;)

autumn ginkgo
waxen hill
#

A good friend of mine won't publish on github .. because they demanded money from him. (needs verification!) -nis

#

That's why people use <foo> (where <foo> might be, say, sourceforge).

#

I had no idea.

night reef
#

github demanding money sounds like a scam. I've never had them demand money from me

tulip beacon
#

In the past certain features (such as private repos) were paid; maybe they're referring to that?

night reef
#

ya, perhaps

barren cloak
sand swift
waxen hill
#

Maybe he's misinformed. I'll ask him again about it.

barren cloak
#

Thank you IOTPanic will try it out in the same way.

#

I tried but I don't think this can be done because when I run west build -b qemu_x86 ~/micropython/ports/zephyr command it is not executed because there is not a port of zephyr in the directory.It can be seen here https://github.com/adafruit/circuitpython/tree/main/ports as opposed to https://github.com/micropython/micropython/tree/master/ports/zephyr. Can anyone please shed some light on this and if it is possible how can it be done?

GitHub

CircuitPython - a Python implementation for teaching coding with microcontrollers - adafruit/circuitpython

lone cradle
cloud hound
#
circuitpython$ git submodule update
From https://github.com/tannewt/esp-idf
 * branch                d97b6863badec4643bf8d1d1058a65d723572882 -> FETCH_HEAD
Fetching submodule components/bt/controller/lib
Fetching submodule components/esptool_py/esptool
fatal: remote error: upload-pack: not our ref 09549c03111a2b330371d361d56227a457af66c5
fatal: the remote end hung up unexpectedly
fatal: remote error: upload-pack: not our ref ca8f5c602ec2948a31146b5f5e429dea369060a4
fatal: the remote end hung up unexpectedly
Fetched in submodule path 'ports/esp32s2/esp-idf', but it did not contain d97b6863badec4643bf8d1d1058a65d723572882. Direct fetching of that commit failed.
#

anyone have any idea what is wrong? this is after a pull from main on circuitpython repo

sturdy talon
#

@cloud hound Did you try it again? Only suggesting that because of the "hung up unexpectedly" message. Wondering if it was a fleeting issue.

cloud hound
#

several times

#

and I checked my network connection, just to make sure, I can access github

sturdy talon
cloud hound
#

time for a fresh clone I guess

sturdy talon
night reef
#

@cloud hound it could be the wrong remote

#

I think I had to do a couple updates in esp-idf too (so recursive)

regal oxide
#

@cloud hound the submodule remote is wrong... it needs to be adafruit/esp-idf...
you can try git submodule deinit -f esp-idf or rm -rf esp-idf and then initialize the submodule again.

cloud hound
#

a fresh clone helped

night reef
#

git submodule sync will sync the remote IIRC

cloud hound
#

thanks, I will try it next time

fierce field
#

I ran my alias alias gitsubupdate='git submodule sync --quiet --recursive && git submodule update --init'
twice and that seemed to fix it. I may have rm -rfd esp-idf in between.

cloud hound
#

magic 🪄

trim escarp
#

can anyone help me with this issue?

wide gate
#

Unlikely unless you specify what script you're trying to run

wide gate
#

And to boot, this doesn't belong here

trim escarp
#

sry if I am posting in the wrong place

#

I am new here

wide gate
trim escarp
#

ok ty ill post it there

jade merlin
#

So, I'm reading thru Kattni's guide on contributing to CP with git/github. I'm a little confused on the concept of branches and updating branches -- Is updating something you should only do BEFORE making changes? Or do you want to update frequently while working on something? And if you're updating after working on something and merge branches, how does it handle differences like things you removed/added vs. things that were removed/added by others?

fierce field
#

before you start on a change (that will turn into a PR), get your repo up to date, before you make the branch. Then usually you can just use that as the base for the PR. However, if there are upstream changes you want or need, to incorporate, then merge from upstream as appropriate, later, as you work on the PR. It is rare you need to do that. Some people rebase from upstream, though I find that rebase often causes more problems than it solves, even though it's a bit cleaner.

#

If there's a merge conflict from upstream, you need to solve it. I use git mergetool to do that, and use a GUI comparison tool. I used to use kdiff3, but it doesn't display that well in non-KDE environments, and now I use meld. I set my .gitconfig to specify that tool.

#

for any conflicting change, you'll need to think about what to take from the upstream change, and what of yours to keep.

jade merlin
#

Ohh, PDF, nice. I'll give that a read too. As Kattni said in the beginning of her guide... it's hard to explain! But I think I understand a bit better now, thanks :D

fierce field
#

the git book explains exactly what a commit really is, and what branches really are, and that was enormously helpful to me early on.

jade merlin
#

Time to break out my Kindle for that book blinka

jade merlin
#

How did Travis CI get the name Travis?

cloud hound
#

possibly when they forked it from Jenkins?

fierce field
#

and Jenkins was originally called Hudson

#

there was a fight over who had the name

jade merlin
#

So Travis was just a random name?

fierce field
#

Hudson and Jenkins were mean to evoke butlers

jade merlin
#

Ha, Travis the Tester instead of Travis the Tractor

#

Yeah, poor butlers, having to trail behind and clean up the code!

jade merlin
#

So... if I submit a PR, and someone else has a PR in for the same file(s), how does that work? Do they get merged during the PR process?

waxen hill
#

I don't know.

#

May get sorted by a human.

#

They can diff your PR to the old one, and also diff the other PR to the old one, then diff those two, maybe.

#

(never mind diff vs patch just the ideas there)

sturdy talon
#

GitHub is pretty smart, and as long as you're not working on the exact same section, there's no issue, each PR gets merged separately, and that's it. If you're working on the exact same thing, you'll end up with a "merge conflict", based on which one gets merged first. In that case, you'll need to rebase or incorporate the new changes into your code before yours, as the second PR, can be merged. It can also be done on GitHub if the conflict isn't too complicated, or manually within an editor.

cloud hound
#

the one that gets approved second needs to be rebased

sturdy talon
#

Until one is merged, neither will show a conflict.

jade merlin
#

Ahh, gotcha. I think I get it, thanks

#

As you said in your guide, it's complex XD

sturdy talon
#

Indeed 🙂 But parts of it become second nature, the more you do it. For me, rebaseing is still nightmare fuel. But I've managed to do it without help a few times at this point.

jade merlin
#

The process from fork to merge doesn't seem too crazy complicated in itself, just a lot of steps and repetition

sturdy talon
#

Exactly.

jade merlin
#

Oh, another question -- is there a way to be set up to move easily between computers while in the process of making changes? Like, working on CP stuff, I have the code either on the machine or on my server, so I'm not tied to one platform

sturdy talon
#

Remote mount.

#

I would say, anyway.

#

Store it on one machine, and share the code out to the other. So you're really always working in one place.

#

OR.... Use Git/Hub how it was meant to be used

#

and always commit and push your code, then pull when you go to the other machine.

#

I'm terrible at doing that, so it's not my first thought 😄

waxen hill
#

I do that all the time.

#

clone to a test directory, make edits, push to github, cd to main directory, git remote update, pull, done.

#

The only scary part would be if I wasn't sure there were pending edits in the main directory that weren't pushed to github.

jade merlin
#

Ahh, ok, I didn't realize commits went to the cloud, I thought it was all local until the final push

#

Maybe I'll just have a Git VM for it, lol

sturdy talon
#

@jade merlin Commits don't go to the cloud unless you push.

#

commit is local, push makes it remote.

waxen hill
#
 $ cd ~/main_project
 $ git remote update

 $ git checkout main
 $ git pull origin main
 $ git push origin main # swap with above line as required

 $ cd ~/some/path/TEST
 $ git clone https://foo/main_project.git
 $ cd main_project
 $ edit myfile.txt
 $ git add myfile.txt
 $ git commit -m 'from test'
 $ git push origin main

 $ cd ~/main_project
 $ git remote update
 $ git pull origin main
jade merlin
#

Ahh

sturdy talon
#

You can push without doing a PR. Two separate concepts.

#

You can push to your fork all day long and folks will only see it if they go to your fork and branch.

#

On GitHub.

jade merlin
#

Ok, that makes sense

sturdy talon
#

So you can commit and push anytime to make sure your changes are safe from something happening locally.

#

And there's tricks to clean up the commit history if you want it to look nicer, but in CircuitPython Land, we welcome messy commit histories 🙂

jade merlin
#

Hehe. I'll try not to get too messy...

sturdy talon
#

Seriously, it's fine.

#

git commit -m "Works but is still ugly" etc. 😄

jade merlin
#

Oh, is there such a thing as too small a thing to work on? My intuition says no (especially for starting out)?

sturdy talon
#

We're currently really bad about labeling "Good First Issue"s. So don't use that to pick something. We need to be better with that.

jade merlin
#

Ok, good, I can leave the big scary stuff for you and the other seasoned folks XD

sturdy talon
#

But yeah, you find a misspelled word or somewhere needing a comma or something, PR it!

jade merlin
#

I shall fix ALL the grammar!

sturdy talon
#

You'll eventually end up writing a library for us 😄

jade merlin
#

Hehe

sturdy talon
#

Alright, I need to step away for a bit. Keep asking questions as you go! We're here to help. We want you to contribute in whatever way works for you, so start wherever makes sense.

jade merlin
#

Thanks! Ttyl ^_^

cyan adder
#

I've been looking around but I'm a bit hopelessly lost. Is there a style-guide or other requirement / recommendation document to reference, if I want to contribute to an Adafruit library? Specifically an Arduino one, in this case.

wide gate
jade merlin
#

So, general question... If you want to ask for/recommend features for something on GitHub, would you open an "issue" for that? Or is there a more appropriate way to do so?

night reef
#

ya, an issue is usually the right way. usually there is an enhancement label to tag it with

#

though you may need to be a maintainer to label it

jade merlin
#

Ok, cool. I have a bunch of suggestions for todbot's Staroids game XD

cyan adder
silent fog
#

I've got a git rebase question.

So, when I'm developing code, I'll sometimes have a couple parallel branches going (say for a bugfix and another for some new features). I'll submit a PR for the bugfix to be implemented, and it'll merge back in to main (All great at this point). However, that feature branch now needs to be synced up with the bugfix code. I typically will rebase the feature branch to start from the updated main branch.

The issue I run into is that I will get some conflicts if I've pushed the feature branch to a remote repo. Usually what I do is delete the remote branch, and then push again. This clears the problem, but feels a bit kludgy. Is there a better way to do this?

night reef
#

You can do --force-with-lease when you push

#

that'll change the remote branch even though it wasn't related to the previous state

#

the lease part of the flag means that git checks to make sure your local copy of the branch still matches the remote one before changing it

silent fog
quick tusk
# silent fog I've got a git rebase question. So, when I'm developing code, I'll sometimes ...

Fwiw, I'm a proponent of making a merge commit unless there's some specific reason not to (and even then I reserve the right to disagree with the reason 😛). I.e., in the above described situation, after the bug fix PR is merged into main, pull those changes into your local main branch, then merge main into your feature branch. This will:

(a) Create a merge commit, which correctly records the history of how your feature branch was developed. By contrast, if you rebase, it makes it look as if you (the author of the feature branch) were looking at the bug-fixed code when you first sat down to write the feature code. If someone later needs to understand the history (e.g. if they are tracking down a second bug that was introduced around that time), the doctored history created by a rebase could confuse them. In addition to the general "what were they thinking?", also (for example) tests that you reported as failing during an early commit of the feature branch may pass for the rebased version of that commit.
(b) References to specific commits (e.g. in later commit messages, or bug reports, or permalinks to code on GitHub/Lab/etc.) stay valid.
(c) No complaints from the remote when you push.

[Hm, I seem to have put most of the meat in (a).]

silent fog
quartz vault
wide gate
#

I think you'd have to fork the source repo. Then you could easily update as needed via git pull.

#

And of course, I should have looked at the PR first. I see it's already been merged, so it's easy to check now...

regal oxide
quartz vault
regal oxide
#

in the case of 5348:

git remote add tannewt https://github.com/tannewt/circuitpython.git
git checkout tannewt/fix_s2_hang
quartz vault
#

*and easily swap between the request and the main of the repo?

regal oxide
#

yes you can easily switch between different forks and their branches
example if you want to switch back to your own branch use git checkout origin/main.
origin is the remote from which the repo was cloned

quartz vault
#

Fantastic! Thank you for the explanation! I just couldn't keep that section of the git workflow clear in my mind, I really appreciate it!

regal oxide
#

happy to help! 🙂

quasi river
#

I'm hoping someone can help me with a big oops. I accidentally committed a change that included a hard coded password that was supposed to be in a non-tracked secrets file. I know big oops. There is a fair amount of history after the commit, but thankfully I haven't pushed so it's only on my computer. How can I remove one line from a commit?

quasi river
#

Nevermind. I figured it out. I created a new branch before I added the secret and cherry picked the commits back into place. Seemed to work okay.

dusk jungle
sturdy talon
# quartz vault What are the steps to follow (or the guide I'd need) if I want to locally run an...

You can use gh for getting PRs checked out as well, using the GitHub CLI. It's a brew install if you're on Mac, not sure for other OS's. It basically does the git checkout magic in the background with a single command. If you click "Open with" which is on the left, opposite the title of the PR, it will tell you the command to type specifically for that PR, such as gh pr checkout 5298 to check out 5298.

#

Then do git switch main or whatever branch you want to get back to when you're done.

quartz vault
full steeple
#

if you were tasked with (or tasked yourself with) setting up an "enterprise" git solution for one or two coders, would you use GitHub Enterprise, SourceTree, or some other method?

fierce field
#

If you want more, Team is quite cheap. Even "Enterprise" is not bad. I think that's the "Enterprise" you mean.

full steeple
full steeple
#

Adafruit seems to use GitHub to store Eagle files successfully. Does it work as well with other CAD programs?

dusk jungle
#

Not always. Eagle uses an XML file format, so it's text-based and has reasonable diffs, which git likes. Many other CAD tools often have some binary blob file format. You can still store them in git, but it can't merge or diff them intelligently.

full steeple
#

Ah ok

#

Are there programs for maintaining CAD files? There must be

dusk jungle
#

Sometimes it's part of the CAD tool itself, so it can handle collaborative editing in a way that makes sense for the design.

full steeple
#

Oh gosh, Fusion 360 has that

#

Which I'm using!

quick tusk
# full steeple if you were tasked with (or tasked yourself with) setting up an "enterprise" git...

Glad you got the advice you did, because this message looked in danger of falling prey to two tech company extortion tropes: (1) calling their product a "solution" without mentioning the problem it is supposed to solve; (2) using the word "enterprise" at all tbh, let alone for 2 people. Theoretically "enterprise software" is a real and useful thing, but afaict, at the current economic moment, its direction is being steered by excited investors and a new wave of tech monetization strategies.

#

🙂

full steeple
#

yeah I don't think I'd have a problem getting my grandboss to pay for the cheapest paid version, but I don't want to pitch any new expensive software, I just asked for a fusion 360 license!

full steeple
#

is Github a good place for long term storage of code? Currently all the code for the projects I'm working on is stored on flashdrives, I would like to correct that

sturdy talon
#

(Short answer: yes.)

full steeple
#

Cool! Just working on a proposal:)

wide iris
#

The nice thing about git is that it is easy to push your code to multiple locations by setting up multiple remote repos and pushing to all of them.

full steeple
#

Does github desktop work well on a pi 3 A+ or should I get comfortable with command line git?

fierce skiff
#

And when I say "same performance" it's because the desktop is simply a UI over top of the command line.

night reef
#

@full steeple I use GitHub as a backup. I prefer the cli because the UI is the same across more OSes and over time.

full steeple
sturdy talon
full steeple
#

Oooh

#

I'll definitely check that ouy

#

out

sturdy talon
quick tusk
#

you might also consider GitLab, which is not owned by Microsoft.

full steeple
#

I'll consider!

full steeple
#

when i git clone a github repository, does my clone automatically have write access to that repo? Does cloning create a fork?

quick tusk
#

No and no

full steeple
#

fun, so how can I use the CLI to get a writeable repo onto my pi?

quick tusk
#

You can always write to your local copy, it's just that you won't be able to push your local changes to GH unless your account has been granted push access to the repo

#

If you own the repo, then you have access

full steeple
#

ahhh so I'd have to set up the pi with my account somehow? Or allow the pi?

quick tusk
#

Wherever you are editing the code, if you want to push from there, you will need to log into your gh account when you push. If the remote is https, then the command line tool gives you a prompt to do this, and I'm sure the GUI does too. If the remote is SSH, then you can authenticate via your SSH key rather than interactive password prompt.

#

See github help docs for "setting up SSH keys"

#

You can see the remotes by running git remote -v. HTTPS remotes start with https://, SSH remotes start with git@github.com

full steeple
#

There doesn't seem to be a GUI for the Pi as of yet. Thanks for the tips, I'll probably need to get more clarification in the future

fierce field
#

It's linked in the pinned messages for this channel.

full steeple
#

Thanks!

sturdy talon
full steeple
#

Thanks. Love this server

cloud hound
#

Anybody else getting this?

Submodule path 'ulab': checked out 'b913d064e525f674d0219524988e6d9d834fe09c'
fatal: remote error: upload-pack: not our ref 531cab9c278c947d268bd4c94ecab9153a961b43
fatal: the remote end hung up unexpectedly
Fetched in submodule path '../lib/axtls', but it did not contain 531cab9c278c947d268bd4c94ecab9153a961b43. Direct fetching of that commit failed.
fierce field
cloud hound
#

ah, thanks

#

for the posterity, doing git submodule sync fixed this

fierce field
#

I am using one of the "colorblind" themes in GitHub, available in Feature Preview. A number of red/green distinctions are replaced with orange and blue and similar colors. It makes it easier for me to spot failed builds. The blue is a little bright but I'm getting used to it.

full steeple
#

I have a colorblind friend, let me check if sourcetree has the same thing

#

Very neat, love accessibility in software

sturdy talon
#

So I wanted to delete all the local branches except main for a local repo. I found the following command. Does this look like it'll do what I want? git branch --merged main | grep -v main | xargs git branch -d

#

@plucky nacelle Your git fu might know the answer to this.

#

There's a lot to do it manually.

plucky nacelle
#

good question... that will be deleting branches locally, is it what you want?

#

as opposed to removing them on github

#

@sturdy talon ^

sturdy talon
#

Correct, I manually removed them from GitHub.

#

Local only.

plucky nacelle
#

OK

sturdy talon
#

Then it's good?

plucky nacelle
#

the only caveat I'd give is, if you had a branch where part of the name was 'main', such as 'romaine-lettuce', this would skip deleting it

#

because the middle part is asking for lines that don't have the substring 'main' in them

sturdy talon
#

Ahh.

#

I suppose that's ok

#

better safe than not

#

I can manually catch any others.

#

hmm, skipped 4. Not sure why. They don't have main in them.

plucky nacelle
#

are they not fully merged?

sturdy talon
#

But better than deleting 25 or whatever.

#

Oh good call.

plucky nacelle
#

hum I went through that process and I still have 119 local branches on my main development computer for circuitpython

sturdy talon
#

I think you're right that they might not have been merged. I decided not to delete them in case I had working stuff in there. @plucky nacelle

quick tusk
#

If you want to think of branches as things under active development and also keep the old stuff just in case, you could tag the head of the old branches and then delete the branch. I once saw someone who had tag names like archive/foo for that purpose.

sturdy talon
#

Hmm. Fair enough. I don't do enough with tags to have anything like that in my workflow, and I feel like it would end up a bit like hoarding, where I would collect all those tags and do nothing with them. Heh. Good to know though.

quick tusk
#

Oh, yeah - I would only do that to get the hoarding out of the way so I have peace of mind to prune the branches 😆

sturdy talon
#

That's entirely fair!

#

I figured most of the code was on GitHub already, and I couldn't think of a reason to need to go back to them, and I'm lazy and wanted to be able to potentially reuse branch names. 😄

#

docs-fix is so easy.... but I've used it so many places already, I have to come up with iterations.

quick tusk
#

docs-fix-final-v2real?

#

I definitely have a retry limit where if the first N obvious names are taken, I stop trying to make a descriptive name and save that for the PR title

full steeple
#

how do I pick between these? It seems they are all public licenses?

#

or do I not need a license if it's a private repo?

dusk jungle
#

Yeah, if you don't plan on publicly releasing things, you don't need a license.

full steeple
#

makes sense

#

Having an issue switching over to my work github account in github desktop. It tells me my global email is wrong (which it is, in green) but when I click update email, nothing changes. I have also gone into Options>Git and updated my email

coarse tiger
full steeple
#

I'm not sure now what I did in desktop mode but somehow I fixed it. My work code is pushing to the right place and everything. Noted for next time though, thx

coarse tiger
#

noice

#

I always trust the console when dealing with weird git stuff. If I'm lazy I use VS Code or Desktop

full steeple
#

Makes sense, I'm still getting used to the cli

waxen raft
#

I was looking for code to rotate my tft in Adafruit GitHub and found a bad link. I did the github thing and cloned the repository, made a new branch and made a pull request but the page was archived so no changes were possible.

#

"This script/repository is deprecated" it said, "go to this page for a newer script". But the link went to 404. ☹️

#

Is there a way to update an archived repository?

waxen hill
#

@waxen raft Not quite sure what you wanted to do.

waxen raft
#

Hi @waxen hill! I was trying to update a link on an archived page

waxen hill
#

hi. ;)

#

Why do you want to update it?

waxen raft
#

It goes to a 404 page

waxen hill
#

So you want to improve an archived resource for others looking at it - is that the only goal?

waxen raft
#

The page says, this is deprecated, go here for new stuff, but the link doesn't go to the new stuff.

#

It would be nice if it did

waxen hill
#

I'm guessing you'd have to email somebody since it's archived and marked read-only.

#

Maybe open an issue if that's not locked.

waxen raft
#

Ooh, I can open an issue, Thanks @waxen hill

waxen hill
#

so to me it looks like github.com redirects the ref to branch master to main by itself.

waxen raft
#

whoops, the issue tab says:This repository has been archived by the owner. It is now read-only.

waxen hill
#

redirect result

waxen raft
#

Yes, but I get a 404 even though the master has been changed to main because the URL ends in .sh instead of .py

waxen hill
#

What exact link/address produces a 404?

waxen raft
waxen hill
waxen raft
#

That one is right.

waxen raft
#

The archived page featured a script, the updated page features a python script.

waxen hill
#

you might try forking both repositories; if that doesn't work, maybe clone the one that can no longer be forked.

waxen raft
#

I have it forked, what should I do with it?

waxen hill
#

I would edit it in parallel with the original to bring it to what changes you wanted.

waxen raft
#

Yes, I did that.

waxen hill
#

Sharing it to the public would be another matter. Maybe contact the read-only repository editor(s) via email to let them know your intents and link to the editted forks/clones.

#

Or file a new issue on the read/write (current) variant.

waxen raft
#

Yep, that's a good idea.

waxen hill
#

Keep in mind that if you have an exact copy of any branch of any repository (unmodified by you) you can git checkout -b newbranch while in the original.

#

Then do anything you want to it.

waxen raft
#

Thank @waxen hill!

waxen hill
#

Just before a merge, I do that on the target branch, to verify I can get a Fast Forward style merge.

#

Much (much) easier to do that to verify merges before committing them to 'permanent' records.

#
 $ git checkout private_idaho
 $ edit thisfile.txt
 $ git add thisfile.txt
 $ git commit -m 'message to document change'
#
 $ git checkout main
 $ git branch # verify you are in maain now
 $ git checkout -b test-main-delete
 $ git branch # verify where you are
 $ git merge private_idaho
#

I use:

 $ git branch -avv

to get an overview of all known branches.

#

also:

 $ git show | sed 3q
#

that gives me info on the branch I'm in now.

full steeple
#

total noob when it comes to github and using the CLI. How can I push code from my pi directly to my main branch of my repo?

sturdy talon
full steeple
#

interesting ok. How can I clone the repo onto my machine?

#

my pi that is

#

ah it would be git-clone something right? I should probably change the default password on the pi first.

sturdy talon
full steeple
#

interesting

#

ok thanks

sturdy talon
#

That's my workflow anyway.

#

Including using kattni so I know what's what.

full steeple
#

How do I know that my pi has read/write privileges?

sturdy talon
full steeple
#

to the repo

sturdy talon
# full steeple to the repo

Oh. When you try to push to it, if you used http for the URL, it will ask for your login creds at that point, and that's how you'll give it access. If you setup SSH, it'll ask for your key or fingerprint verification or whatever once, and then you have access after that.

full steeple
#

ahh ok

#

thanks

sturdy talon
#

I do recommend SSH, as a side note, but it requires some setup.

full steeple
#

ok thanks, how would it help me?

#

eh I can google that

#

how do I push something to the codebase folder with CLI?

full steeple
sturdy talon
#

You make local changes to it, and then git add those changes, git commit those changes, and then when you git push remote-name branch-name it will only update that directory. As long as you only added changes made to that directory.

sturdy talon
full steeple
#

ahhh ok, I need to clone first. also thanks re: https

#

I need to get good at this for me to feel like a real programmer.

sturdy talon
#

You'll get it. It takes time. Repeatedly doing the same few commands. Then it all becomes second nature.

full steeple
#

huh it seems like remote access was disabled on aug 13

#

I need some kind of auth token

#

let me google

sturdy talon
#

Hmm.

#

Ah. ok. So you generate a token, I think, give it perms, and then provide the token to the CLI.

#

I setup SSH ages ago, so I don't remember this part. 😕

full steeple
#

maybe I should change the password and then setup SSH to github

#

this is all kind of confusing, I'll see if setting up SSH fixes the issue.

sturdy talon
#

SSH setup might also be confusing. Hopefully not.

waxen raft
#

Hi folks! I forked a repo then totally messed it up. How can I erase my repo and start over?

full steeple
#

@sturdy talon how did you determine what to put in here:
Idk if I needed to green that out

sturdy talon
waxen raft
#

OOh, thanks @sturdy talon . Nice to meet you, by the way!

sturdy talon
full steeple
#

ahhh thanks

#

yikes, what does this mean? Open TerminalTerminalGit Bash.

sturdy talon
#

Where did that come from?

full steeple
#

first few lines of that article

#

oops nevermind

sturdy talon
#

Ah.

#

Um

full steeple
#

I am just gonna assume I don't have any

sturdy talon
#

I think they mean "Open your terminal program"

#

And that's a safe assumption.

#

In your situation. Plus having a separate key for each thing is better. Then if something is compromised or needs to be deleted, you're not borking multiple things.

full steeple
#

so do I need to save the SSH key somewhere?

sturdy talon
#

Yeah, what I linked should explain.

full steeple
#

also what is 'Git Bash'?

#

in "Open Git Bash"

sturdy talon
#

I think a typo.

#

Because it sounds kinda nonsensical to me.

#

git is the CLI stuff, and bash is a type of CLI.

full steeple
#

yeah it didn't make sense to me, I thought Bash was linux specific? but idk computers

sturdy talon
#

MacOS used to use bash.

#

I use it on my Mac.

#

I think it defaults to zsh now though.

full steeple
#

hmm so just open a windows command line?

sturdy talon
#

I think so, yes. Oh, you're on Windows.

#

um

#

I genuinely have no idea if it works on Windows.

full steeple
#

shoot

sturdy talon
#

Try it!

full steeple
#

can't (probably) hurt

sturdy talon
#

Also, heads up, food arrives in < 20 minutes, so that -5 is how much longer I'm around.

full steeple
#

no worries

#

OK I got this:

sturdy talon
#

Yeah give it a name, similar to what the article suggests I think

full steeple
#

oops my bad, I had moved off the article let me read more. Thanks for your help, enjoy your meal!

sturdy talon
#

I wouldn't let go of the article until you're done - it's a lot of fiddly steps.

#

Thanks! 🙂

full steeple
#

What are you having?

#

I'm on a diet so I'm living vicariously

sturdy talon
#

Turkey, brie and cranberry mayo sandwiches with sweet potato fries. And deep fried cheese curds. And SKOR cheesecake for dessert (SKOR is Canadian Heath bars).

full steeple
#

dang, it doesn't show you your password when you type it in or even indicate how long it is

#

that's some overboard security

sturdy talon
full steeple
#

should I try to save the "key fingerprint"?

sturdy talon
#

I don't remember 😕

full steeple
#

kk thanks

#

it doesn't say to in the guide so I'm not gonna

#

hopefully that doesn't bite me

#

weird, the next step isn't working. I ran ssh-add C:\Users\MyUN/.ssh/id_ed25519 and got "not such file or directory"

sturdy talon
#

Is that what you named your file?

full steeple
#

I didn't name it

sturdy talon
full steeple
#

I just hit enter per the guide, it uses the default

#

I can see the key sitting in the folder rn

sturdy talon
#

oh, is that what the default name was then?

#

ok hmm

#

wait

#

the / are weird for Windows, aren't they?

full steeple
#

I'm not sure

sturdy talon
#

I thought Windows liked \

full steeple
#

Let me try that

sturdy talon
#

I think that's the one Windows likes...

#

otherwise you have to use escape characters or some such....

#

OK, need to go prep for food. Good luck!

full steeple
#

thanks, enjoy!

#

hmm, I fixed the slashes to ssh-add C:\Users\MyUN\.ssh\id_ed25519 and still got the same Error connecting to agent: No such file or directory

#

it seems that the "windows" instructions use non-windows commands >.< e.g. eval

quick tusk
full steeple
#

yeah it's werid

#

weird

#

apparently windows can understand either one?

quick tusk
#

I think that often gets handled correctly yeah. Not sure at what level of tooling the correction gets applied but it might be close to universal

full steeple
#

makes sense

#

Any idea why it's saying the file/directory are not there? I can visit the file and see it just fine

quick tusk
#

So the key generator is saying it doesn't have permission to write the file?

#

On linux, IIRC, the ssh client will not let you use a key unless it is read-only

full steeple
#

it's saying Error connecting to agent: No such file or directory

quick tusk
#

permission mask 400

#

on Windows, afaik there is not such a notion of permission, so idk

full steeple
#

hm

quick tusk
#

also, are you sure the "no such file" is referring to the key file? sounds lke it's looking for ssh-agent and might just be saying it's not running

full steeple
#

yeah I'm totally unsure

quick tusk
full steeple
#

the weird thing is the guide has linux commands, e.g. eval but i'm in the windows section

quick tusk
#

oh yeah I remember ssh-agent (which I don't use) having some step where you eval the output of another command

#

that increases my confidence in the guess that the error you saw means "I'm looking for ssh-agent but it's not running"

#

those microsoft instructions seem to explain how to start ssh-agent

full steeple
#

it's very frustrating. Github is worth millions if not billions. They have to serve enough windows users for it to be worth it to write a working guide. But they seemingly haven't bothered

#

let me try

quick tusk
#

also, I think you can use git SSH keys without ssh-agent.

#

on linux you would do something like

GIT_SSH_COMMAND='ssh -i /path/to/id_ed25519' git push
full steeple
#

so from your first link, would you set up OpenSSH first?

quick tusk
#

on second look, the MS guide looks like not the right page, since it's about running an SSH server, rather than client

#

did you run

net start ssh-agent

as that article says?

#

caveat, I've never done any of this on windows, and for all I know, the windows git installer may also install openssh or something like that.

full steeple
#

let me try that, sorry I'm also tasked with installing smoke monitors but can only run the drill when my boss is on hold on the phone lol

#

my job is weird

quick tusk
#

that'd be the first time I've heard of a situation where holding on the phone is safety-critical

full steeple
#

it's more "audible conversation" critical

full steeple
quick tusk
#

looks at page title which contains the phrase "IoT" oh no...

#

it would be great if they simply explained how to use some particular SSH client in general.

#

maybe Microsoft are not the right people to be asking.

full steeple
#

this seems to be for FactoryOS? What's that?

quick tusk
#

No clue

full steeple
#

dang. I wonder if github support would be able to fix this. Let me see if they have a chat function

quick tusk
#

I would at this point look to the git for Windows docs instead of Microsoft

full steeple
#

yeah that's where I started

quick tusk
#

And see if they give an easy way to set the SSH command, analogous to $GIT_SSH_COMMAND on Linux

#

If there is one, you can set it to 'ssh -i C:\path\to\id_ed25519'

#

But yeah if you can get a github support rep (though git ≠ github) that's even better

cloud hound
#

also, ssh -vvv to see what it does exactly...

full steeple
#

Hmm

full steeple
#

are trailing spaces relevant? I see that it actually says it was saved in C:\Users\me/ .ssh/id_ed25519 and not in C:\Users\me/.ssh/id_ed25519

cloud hound
#

yes

full steeple
#

hm

#

let me try again before finishing my annoyed support message to github

#

same error, "Error connecting to agent: No such file or directory"

quick tusk
full steeple
#

yeah I figure for us paying for a teams license, we're reasonable to expect some support

quick tusk
#

Sure. They might not deserve annoyance on the first message though 🙂

full steeple
#

I toned it down

quick tusk
#

I bet they get lots of customers who already tried tons of things. It's understandable

full steeple
#

I have been on the receiving end of angry emails about things outside of my control, and I wouldn't want to do that to someone

quick tusk
#

Being empathic in moments of frustration can be hard... I'm definitely not perfect in that regard but I try and glad you do too

waxen hill
#

Looks to me like I just copied my public key to my local clipboard, and pasted it into github.com under 'settings'.

#

(In Linux, as always)

#
 $ ssh-agent
SSH_AUTH_SOCK=<foo>
SSH_AGENT_PID=<foo>

paste those into the shell where ssh-agent was invoked. Paste the entire line (both lines) verbatim.

#
 $ ssh-add .ssh/id_rsa
#

That one prompts for the password. In that one instance of the shell (only) you won't have to keep typing in the password associated with that key pair (id_rsa.pub, id_rsa).

full steeple
#

I'm on windows unfortunately and can't reasonably change OS

waxen hill
#

The ssh-agenttag seems to contain useful entries.

#

If you do everything on the Raspberry Pi (under Raspbian or Raspberry Pi OS) that'd give a good model to work from.

#

Raspbian is basically Debian.

#

git is native to Linux as it was designed by the Linux kernel developer (Linus Torvalds).

#

'the' Git book is here:

full steeple
#

thx!

waxen hill
#

;)

full steeple
#

I originally had code in two files, meant to run on different processes on my pi, but I managed to get the simpler of the two combined into the more complex one. Should I leave the old code in my repo or delete it?

sturdy talon
full steeple
#

nice

#

thanks

quick tusk
#

I have no clue how anyone presses backspace with peace of mind unless they're using version control

waxen hill
#

@full steeple If you learn how to do a Release, it locks in the old stuff to a 'permanent' form without an action similar to forking into another subdirectory.

#

I do that when a project is working well but isn't complete (or is suffering from freeping creaturism. ;)

#

Been using this guide for a few years now:

#

I usually stop when Step 16 is completed; Step 17 is just verification, and I do it consistently enough I don't have to do Step 17 (or read any further).

#

removed many messages; transcript before the deletes, just below.

waxen hill
full steeple
#

has anyone used Github LFS (Large File Storage)? Normal github is balking at uploading a 1.3GB shrunk raspberry pi image.

#

I could use my org's google drive but I'd rather have all files in the same place

#

I am confused by this step. I thought bash was not a windows thing

#

do they just mean a windows command prompt? I have found many of their guides say to use bash on windows which really throws me off since I was under the impression that bash was not a windows thing

sturdy talon
full steeple
#

I don't think so? It doesn't make any mention of it

sturdy talon
#

Ah. It was a thought anyway.

#

Who knows, then

#

heh

full steeple
#

dang.

#

thanks

sturdy talon
#

In Windows.

fierce skiff
#

Perhaps it's expecting an installation of Windows Subsystem for Linux (WSL) which provides an Ubuntu terminal window as a Windows application. If you're already a Linux user and either using Windows (or in my case, forced to use Windows) you get a normal Linux command line, bash or whichever shell you want. The filesystems aren't compatible between Windows and WSL which is screwy but it's certainly an easy way to have a git CLI on Windows.

full steeple
#

Hmm I'll just use Google drive for now, too busy with other stuff. I'll look into ichiro's idea later

quick tusk
#

Git bash is indeed a thing

full steeple
#

Is this similar to the WSL that Ichiro mentioned?

fierce skiff
full steeple
#

Hmm, do you have a personal recommendation?

#

On choosing between the two?

fierce skiff
# full steeple On choosing between the two?

Well, I have no experience with the git bash thing, but WSL is basically a terminal window that is actually Ubuntu, from which you can install git and use it on the command line. You by default have bash as your shell but could use csh or tcsh or zsh if you like. The screwy part is that the Ubuntu filesystem and the Windows filesystem are entirely incompatible, such that you should never modify files or directories on the Windows filesystem from WSL, or vice versa. If you're comfortable with that limitation and already have Linux command line experience I'd definitely go with that over a git bash thing. But if you only plan to do git then perhaps it'd be better. Certainly a smaller install, as WSL is an entire Ubuntu installation on your hard drive.

#

I did a whole Java project on WSL as that was all I had available to me as a Linux user forced to use a Windows machine. And given I'm comfortable on the command line (prefer it to UIs, generally) that worked out fine. You can install any command line application via standards like "sudo apt install foo". I believe later versions of WSL may even support X (the windowing part of Linux) but I have no experience with that. I finally got a proper Linux desktop and could stop using WSL as a stop-gap.

junior apex
#

WSL2 is supposed to support Linux GUI applications, but I had already moved back to a linux main system for work and was just using a Windows VM for the few things I needed windows for, and WSL2 doesn't work with every hypervisor (as it's VM in a VM)

fierce skiff
#

Docker Desktop is a Windows application but the Ubuntu kernel in WSL doesn't know that it's running in Windows and there's no binding between them. (this all from memory of a few years ago)

junior apex
#

I personally dislike docker for a multitude of reasons, so I use it as little as possible and wouldn't know.

fierce skiff
junior apex
#

Well, drifting off topic, I'm working on a bunch of different Kubernetes Clusters in azure (aks), and using ArgoCD to manage the containers the engineering teams build. That's as close to docker as I want to get.

eager rivet
full steeple
#

I'm trying to use Git LFS, I downloaded and installed it (it got at least as far as the license acceptance) but git doesn't work as a command in my terminal window (Windows 10)

#

how can I check if it was actually installed?

#

opening the .exe just prompts a window to use the terminal which doesn't work

full steeple
#

I installed what they said to install

leaden fossil
#

My PATH contains this by the way

#

Open a new terminal window

#

and do echo %PATH% in cmd or echo $Env:PATH in Powershell

full steeple
#

now the eternal question: which editor to make default

#

I think I'll go with n++, I'm familiar with it

#

I'm here now: Do I need to move to the repository in question some how?

quick tusk
# full steeple I'm here now: Do I need to move to the repository in question some how?

I've never used git LFS (which as I understand it is a third-party extension, not ordinary git), but that git lfs track command looks like it will search up the directory tree (starting from the working directory of your shell session) until it finds a git repo and apply the command there. That is what the core git commands (add, commit, etc.) do.

#

For ordinary git commands (and probably this one too), the choice of git repo at which to apply the command can be explicitly supplied/overridden with the -C option.

turbid marsh
#

ok, here's a possibly trivial question from a git-newbie: I have forked circuitpython on github and cloned it to my pc in WSL. I set things up according to the instructions and I'm able to build circuitpython. I'm keeping my fork up to date using the 'fetch upstream' button in github and 'git pull --all' in my local repo. That worked fine for a while. Github currently says my main branch is 13 commits ahead (because I added some of my own board definitions) and none behind adafruit:main. Still, my fork is lacking the latest tags (7.1.0-beta.0 and 7.1.0.beta.1) and when I build, I only get the latest 7.0.0 version, not the 7.1.0.beta.1. What am I missing?

turbid marsh
#

great, I overlooked the pinned messages. Thanks for the hint 🙂

waxen hill
#

how to learn git?

cloud hound
#

there are some links pinned in here

full steeple
#

How does one view these on mobile? I'm not seeing a button

#

Oversight from discord?

cloud hound
#

click on the channel name, and then on pins

full steeple
#

Ahhhh

#

Thx

full steeple
#

is there a way to check how fast a push is uploading? I'm using Github LFS (Large File Storage) and I've been "uploading" for over 2 hours. It's a big file to be sure, but I think it may be hung. If it is hung, what can I do?

#

Seems like github is giving a number of people issues. I'll chalk it up to that

wide gate
#

A lot of cloud services have struggled this week, too

onyx tulip
#

Not sure where this question would go but trying to figure out what CAD model would be close to what the SCD-40/SCD-41 (CO2 sensor) is based on .. seems like a common sensor board base which is perfectly square PCB. Trying to bring in the various components into my 3d modeling to work out design

fierce field
#

ok, i proactively answered there

full steeple
#

Hm, there's something weird going on in my Github folder. I renamed a repo to MyNewRepoName, and it shows up that way in Github Desktop's viewer, but when I go to my actual Github folder it's still MyOldRepoName

#

And if I add files to the folder name MyOldRepoName, they show up in Github desktop under MyNewRepoName. Super odd

solid blaze
#

Git doesn't care what the name of the folder containing the repo is. You can rename it at will... and it will have no effect on the repo. The Project name in github, while initially taken from the directory name (or vice-versa) isn't kept in sync.

#

You can, I believe, rename it within GitHub. If you do, though, you'll have to reestablish the remote linkage in your repo on your disk.

quick tusk
solid blaze
#

cool - didn't know they did that!

misty vessel
#

Does the Adafruit github take pull requests? Found a typo in an Adafruit repo and submitted the PR, but not sure if anyone is monitoring for new PR's

sturdy talon
misty vessel
sturdy talon
#

The PCB repos aren't on our radar as much as others, so this definitely would have been missed. Thanks!

misty vessel
#

No problem, glad I asked!

sturdy talon
# misty vessel No problem, glad I asked!

Oh! It looks like I'm wrong on that. Ladyada already notice it and tagged one of our folks to take a look. He'll be able to verify it better than I can - I don't think I have the board. He does.

#

So please be patient and we'll get to it soon!

misty vessel
#

Sounds great, thanks for your help!

serene river
serene river
#

I accidentally commited with git commit -am and all files got committed. I reverted the commit and then lost all my changes. I tried again and made it worse.

serene river
waxen hill
#

I am still learning git, so I always copy my project before commiting 🤣

serene river
#

Too git-frustrated now, will try again in the am....

full steeple
#

If I want to use interact with my Github repos using my pi 3 A+ which really struggles to run programs of any complexity, I'm going to need to git gud at the command line, right?

full steeple
#

shucks

sturdy talon
#

When it comes down to it, there's a basic set of commands you'll use repeatedly, and you'll get them down quickly once you use them a bit.

#

When you have to do a complicated rebase, that's a different story. Heh.

cloud hound
#

rebase -i

sturdy talon
#

Also check out the gh command line tool from GitHub to use in conjunction with git for dealing with GitHub and so on.

full steeple
#

Minor wrinkle is that I want to setup access to a repo that's inside an organization so the repo is say MyCompany/CurrentProject on Github

cloud hound
#

git doesn't really care

full steeple
#

I'm thinking

git config --global user.name "My Name"
git config --global user.email "MyEmail@MyCompany.com
git config --global core.editor geany

is what I want. I don't love Geany but it'll have to do

cloud hound
#

vim for life

sturdy talon
full steeple
#

As long as it has dark mode built in and syntax highlighting I'm happy

sturdy talon
#

vim is super configurable.

cloud hound
#

just wait until you try to exit it ;-)

sturdy talon
#

I am still SUPER bad with it, but it's what shows up when git wants to do things.

cloud hound
#

I was joking, while vim is an excellent code editor, I wouldn't force people to learn it on top of whatever else they are learning

cloud hound
#

@sturdy talon you can configure it to use nano or mcedit or whatever

sturdy talon
cloud hound
#

that's commendable

sturdy talon
#

Also my bash uses vim commands. I know... some.

full steeple
#

Looks cool but I'm on a bit of a deadline

cloud hound
#

try mcedit

full steeple
#

the quit command didn't work lol

cloud hound
#

from midnightcommander

#

it looks like the editor in norton commander, if you remember that

sturdy talon
#

shift+z+z 😄

cloud hound
#

blue background, function keys on the bottom

full steeple
#

So is VIM particularly powerful or do people use it to flex?

cloud hound
#

yeah, vim is there together with emacs

sturdy talon
#

You can do a ton with vim once you have it down.

cloud hound
#

one of the ethernal holy wars

sturdy talon
#

But it's getting there.

cloud hound
#

it's not an editor, it's a lifestyle

full steeple
#

Maybe I'll use it for my next personal project

full steeple
#

sudo apt-get install mc seem right for Midnight Commander?

cloud hound
#

yup

full steeple
#

I'm just looking for an easy to use text editor to pair with git

cloud hound
#

mcedit, nano, pico -- are the popular ones

full steeple
#

lol, it's warning my of 7 MB of disk space used

cloud hound
#

well, midnight commander is a clone of norton commander

#

it comes with a lot of tools

#

mcedit is just one of them

full steeple
#

I meant that that's not much

cloud hound
#

it's a whole file manager

full steeple
#

ahhh so I'm kinda looking for something that isn't run in the command line

cloud hound
#

it was much for me, back when I had 360kB disquettes

full steeple
#

I really wanted Notepad++ but it doesn't exist for Linux, Sublime Text doesn't exist for my pi

cloud hound
#

I suppose geany should work then

#

or mousepad

full steeple
#

geany will have to do, I'll see if I can find a dark mode

full steeple
#

So the guide I'm following is great if you want to create a repo on your machine and push it to github, what if you want to clone a repo onto your machine?

sturdy talon
full steeple
#

ooooh

sturdy talon
#

I always change the remote name so I don't get confused by origin

full steeple
#

what is repo_user_id? my github name?

sturdy talon
#

If it's your repo, yes.

#

For example, here is me cloning Adafruit's CircuitPython repo: git clone -o adafruit git@github.com:adafruit/circuitpython.git

#

So if I cloned my fork of it, it would be git clone -o kattni git@github.com:kattni/circuitpython.git

#

Your repo_url may be HTTPS.

full steeple
sturdy talon
#

Same format for the command though.

sturdy talon
#

Or names the first one origin rather.

#

So, it's unclear what's what when you're pushing back to it if there are multiple remotes involved (such as when you fork)

cloud hound
#

a single repository can have more than one addresses, those are called remotes

sturdy talon
#

To be clear, this is my workflow. It's not necessary for git to work.

cloud hound
#

so you can have for instance both adafruit's and kattni's forks in the same repository on your disk

sturdy talon
#

^^

cloud hound
#

this is especially useful if you need to cherry-pick from one to the other

sturdy talon
#

That way I can work on my fork, but PR back to Adafruit, while staying up to date with Adafruit's repo.

full steeple
#

interesting OK

cloud hound
#

when you push, it will by default push to origin, unless you tell it to push to some other remote

full steeple
#

I'm realizing I want to make a separate repo for my code alone so that way if someone gets access to this pi, I only lose the code and not my EDA/CAD designs

cloud hound
#

you won't lose anything, you will have it all on github too

#

at least everything you pushed

full steeple
#

no but someone could steal our IP

#

the code I'm willing to risk because it took me a day to write, and isn't complex

#

But the EDA/CAD took work

cloud hound
#

that is usually not a problem with the open source projects like circuitpython

full steeple
#

yeah I'm using only a single CP lib, the rest is CPython. I guess I could make mpys but I think the risk of losing the code is relatively low, I have a username/password for SSH and I'll be disabling wifi.

cloud hound
#

"losing"

full steeple
#

having stolen

#

is a better term

cloud hound
#

more like unintentionally publishing

full steeple
#

I'm mostly concerned about someone SSHing or gaining physical access to the pi that's running my code. I think it's unlikely but it could still happen

cloud hound
#

make sure your github repo is not public, then

full steeple
#

It's not

#

now I'm gonna double check

sturdy talon
#

Once someone has physical access to your machine, you have a whole host of other issues.

#

Not much to be done at that point.

cloud hound
#

is the pi exposed to the internet?

#

yeah, with physical access they can just take the sd card and copy it

full steeple
#

Yeah it would be relatively trivial for a bad actor to steal the SD card so it's best to keep as little on there as possible.

cloud hound
#

I would highly recommend not having it exposed to the internet, if you can

full steeple
#

it's not

cloud hound
#

if you must ssh to it from outside, at the least use a non-standard port

full steeple
#

I don't SSH into them

#

Long term I'd like to set up an automated deployment system but that's a ways down the road.

#

So I guess I can just create my Code Only repo here on my pi. On my windows machine I used github desktop and when I set it up it created a GitHub folder. Do I need to do that or will it happen automatically when I make my first repo on the pi?

sturdy talon
#

You will need to manually create the repo on GitHub. Then when you add the remote or clone it, it will know what to talk to.

full steeple
#

I knew they were separate I just assumed some magic happened in between

sturdy talon
#

Nope! If you clone then magic sort of happens because the clone creates the repo locally.

#

But if you git init a repo locally, you have to git remote add user_id repo_url to get them to play nice.

full steeple
#

So the repo I want to clone is under the org MyCompany, so would it be
git clone -o MyCompany URL?

#

or
git clone -o MyCompany/MyRepoName URL?

sturdy talon
#

the first one.

#

the URL identifies the repo name.

full steeple
#

cool thanks, I'll give it a shot

#

Also I did a dumb thing and named our overall Github Org badly. I was warned by Github against renaming an organization, is it a bad idea? Or best done before I have too much stuff stored?

#

I got a permission denied error

sturdy talon
sturdy talon
# full steeple I got a permission denied error

Hmm, is your git configured with the proper credentials? I use SSH, which involves a key and other setup. So I don't remember what's needed for HTTPS.... I think it's supposed to ask you for a username and password...

full steeple
#

oooh must not be, I was expecting a username/password request

#

ooh that's right, GitHub got rid of Username/Password I think

sturdy talon
#

Oh right!

#

API keys.

#

I think.

full steeple
#

Gah their official docs refer to using gh, not git so I assume things are different

full steeple
#

gotta figure out how to install it

#

It's not clear it's available for the pi

sturdy talon
#

Oh hmm.

#

Well, it's possible to do with git though...

#

But I think you need to generate an API key on GitHub, iirc...

full steeple
#

ok so git clone url resulted in a request for username

#

ah password auth really is gone

waxen hill
full steeple
#

They shouldn't offer to take my UN/PW if they aren't going to do anything with it

sturdy talon
#

Oof.

#

Good luck with this... once you're set up, things will be smoother. But sometimes setup is tweaky. I have to head out.

waxen hill
full steeple
#

Can I safely delete a private key and store it somewhere more secure? My pi is not going to be that secure

waxen hill
#

It's just ascii

#

The opposite is the problem.

full steeple
#

should I

waxen hill
#

let me take a quick look.

#

it's basically encoded similarly to base64 or uuencode

#

that's the storage format on your storage medium (SD card probably).

#

You could ssh into the Pi.

#

Then write that file each time you need it.

#

Permissions are -rw------- for ~/.ssh/id_rsa

#

You can truncate it easily enough; though that's maybe not all that secure.

#

I don't worry about that stuff so I don't know the proper way to expunge it.

#

I think rsync over ssh might work for one-off installs of that file.

#

That probably relies on ~/.ssh/known_hosts

#

(This stuff is covered on DigitalOcean in light tutorials; I usually go there when I need to revisit it)

full steeple
#

I'm mostly concerned about someone taking the SD card out of the pi and gaining access to our Github

quick tusk
#

what exactly are you considering doing?

#

if you delete the key, then you can't use it...?

full steeple
#

copy then delete

#

Keep it somewhere more secure where physical access to the data is harder to achieve

waxen hill
#

I suppose with TinyCore (they might have an RPi3 or RPi4 port!) .. you could just load it all into RAM.

quick tusk
#

but you want to be able to push to GH from the pi, right?

full steeple
#

can't I use the public key?

#

oh duh

#

no you can't

#

Sigh I guess I'll have to scrub the pi before I deploy it

quick tusk
#

SSH agent forwarding might be exactly what you're looking for?

waxen hill
#

istr there's a reason why the private key requires a password used with it.

quick tusk
#

SSH agent forwarding can be used to make deploying to a server simple. It allows you to use your local SSH keys instead of leaving keys (without passphrases!) sitting on your server.

#

you'd SSH into the pi from a machine that has the keys (your laptop or whatever), and can use the laptop's credentials (forwarded over the SSH link by this doohickey, AIUI) to push to GH from the Pi

full steeple
#

ahh ok

#

Hmmm, I haven't yet tried SSHing into the pi

#

I guess I might as well try it and see what happens. What should I do with the ssh keys I generated?

quick tusk
#

how did you generate them? ssh-keygen on your laptop?

full steeple
#

no, on the pi

quick tusk
#

well, if you don't trust the pi to be secure, then there isn't much use for the keys sitting on it, eh?

full steeple
#

I don't think they are keys to anything atm

quick tusk
#

yeah, and if the pi is not considered secure, they should never be the keys to anything

#

I'd just delete them

full steeple
#

just have a strong password on SSH into the pi?

#

all of this was in service of me trying to clone a repo onto my pi

quick tusk
#

is the repo secret?

full steeple
#

yup

quick tusk
#

and you want to clone it onto an insecure device

full steeple
#

The repo is just the python code for this project, which is insecure on the device anyways

#

Unavoidable

quick tusk
#

ok then, I don't understand the threat model or the security requirements of the project

full steeple
#

There isn't any sensitive company data on the pi, just code that if it's stolen it's kind of whatever. I wrote it in a day and any competent programmer could in likely less time. What I'm concerned about is someone stealing the SD card and gaining access to our company's Github repos

quick tusk
#

ok then SSH agent forwarding sounsd like a good fit

full steeple
#

sigh, somehow I'm logged into Github in the browser on this machine, but the pi doesn't quite have the oomph to open the dialog box to log out

quick tusk
#

or, like

#

as you said, any data that's cloned onto the stolen pi will also be stolen

full steeple
#

indeed

quick tusk
#

is your concern that the thief would also get other repos that aren't cloned to it?

full steeple
#

Yeah, or through some mechanism I'm ignorant of

quick tusk
#

if so, you could put deploy keys for specific repos on the pi, and the thief would have access only to those repos

#

and, if they stole the keys without your knowledge (copied them off the SD card and you never knew), then they would have access to future changes to the repos for which they have deploy keys, until you find out and revoke the deploy keys

#

so, SSH agent forwarding might be best.

#

a really dedicated thief who wanted to get your company's stuff could probably hijack the pi and set up some kind of man in the middle attack, but like, that would be pretty sophisticated

full steeple
#

yeah I think so. The pi won't be in range of wifi when deployed unfortunately so I may have to set it up with our wifi hotspot in advance

full steeple
#

I ain't curin' cancer

quick tusk
#

yeah, that's kind of why I didn't fully undesrtand your threat model

full steeple
#

I'm just trying to develop good habits

#

and if something does happen I want to be able to say what I considered and what I dismissed.

#

Rather than be caught with my pants down

quick tusk
full steeple
#

ah

#

I'm developing on the pi, but when it's ready to deploy, it will be somewhere without wifi

#

while I'm developing I want to be able to push to the repo

quick tusk
#

yeah that's fine

full steeple
#

this "can't log out of github" thing is a big problem

waxen hill
#

I didn't know that was a thing.

#

Apparently git integration into gee-whiz stuff has a cost. ;)

reef flame
#

Hi All, sorry for what is probably a dumb question, but I am a total noob to using git. I submitted a pull request and one of the CI checks failed, and I cant figure out what the problem is.

#

is the log of the failure.

#

Is there documentation somewhere on what these errors mean?

fierce field
reef flame
fierce gate
#

Do you guys think just getting used to a Git integration is a bad idea?

#

Recently I've been forcing myself to live in Git Bash

#

And I just find my work somewhat more versatile, it's just off my comfort zone, though it keeps getting more comfortable

dusk jungle
fierce gate
#

I meant the distinction between just using IDE Git GUIs vs using Git Bash itself

#

Yeah, version control is great

#

But I've gotten the impression that raw Git Bash is rather efficient to become comfortable with, vs IDE GUIs

#

Since they're all implemented on wrapped Git Bash principles, so just understanding Git at its core is better in the end, right?

dusk jungle
#

Ah, gotcha. Yeah, that would be more of a general "command line versus IDE" preference, so I'll refrain from entering that holy war, heh heh, since I use both.

fierce gate
#

It seems like a generational gap, doesn't it

#

Which is understandable. Much has changed, and many people don't like too much change

fierce field
#

@fierce gate git has a relatively terrible CLI: consider how many commands give you hints about what to type next. Nevertheless, it is useful to understand what git is actually doing. I read the Git book https://git-scm.com/book/en/v2 a long time ago and it was quite illuminating about what commits and branches really were, etc.

fallow fractal
#

I do almost all of my Git work from the command line. I rarely use the Git extension for VSCode, but it can be pretty helpful when working through conflicts.

waxen hill
#

I do a lot of redundant typing on the CLI to use git. ;)

#

I use a hard disk repository called localorigin for all projects, in addition to the regular remote, origin.

#

I use the seven-digit hex commit representation of 'git branch -avv' to checkpoint work often, in new branches named for that commit shred - only in remote: localorigin.

#

Generally when I'm feeing good about the work - so those represent safe places to branch from, if and when.

#

I keep the output of 'git branch' (which does not point to a remote) quite brief; usually five entries or less.

'git branch -D <repos>' to get rid of stale ones, after first pushing to the 'localorigin' repository (on-disk).

#

🔸
I use a simple recipe to make copies of files, complete with their edit histories, incrementing the directory name from '<foo>-aa' to '<foo>-bb' &c.

#

The recipe iterates 'git mv' as the core of how it works.

#

Move from old to new; commit, restore what was moved, merge. Uses two branches, one of which gets deleted after the merge. Result is two copies of the work, the copy in a new directory.

inner lagoon
#

hey has anyone tried to git clone rpi-rgb-led-matrix repository and then pip install the python binding?

cloud hound
#

can I somehow list all commits between two tags?

#

git log tagA...tagB easy

pallid thicket
#

I'm not sure if this is a git question or more of a terminal question but git is the only thing I've noticed it happening with so here goes:

Does anyone know what could cause git submodule foreach "git grep -n something&true" to cause the terminal that it runs inside of to be broken. After running this (in the CircuitPython library bundle if that matters) My terminal no longer shows anything I type at the prompt.

#

But it is still receiving the things I type i.e. if I type ls and press enter. I don't see "ls" in the prompt but I do see the output from that command.

#

I have used this before to search all of the libraries for things and I don't recall running into this issue. I tried in multiple different terminal programs and all behave the same. I also have a terminal prompt thingy called starship and I tested with it disabled to rule it out as the issue and I get the same result.

Is anyone else able to try running a submodule foreach git grep command like this and let me know if you see the same issue after it executes?

sturdy talon
#

Did you try restarting your terminal? Or your terminal environment? I imagine so, but figured I'd ask anyway.

#

running it now.

#

No issue running it here.

pallid thicket
#

Yep, I've restarted a few times inside of pycharm and restarted once outside pycharm in gnome-terminal. After restarting it works normally (I do see things as I type) but if I run a similar command again I get back into the same state.

#

Okay thank you! I'll mess with it later, it's not too big of a hindrance because it's easy to just launch a new one. I am planning to show people this trick while talking about the bundle but would shy away from it if it is broken/confusing across the board. Probably just something wonky in my environment. I'll try updating some things later and maybe it'll sort itself out.

sturdy talon
#

You're welcome!

cosmic saddle
# pallid thicket Yep, I've restarted a few times inside of pycharm and restarted once outside pyc...

When it's in that state, try just tapping [enter], or issuing the "reset" or "clear" command and see if that fixes it. Especially with the "reset" command, if that fixes it, that means your git command is doing something funky - including probably not printing/echoing a newline after the input. I get similar behavior with Curl sometimes. My work-around is generally to just hit the [enter] key afterwards, but if I accidentally run "cat" on a binary file, I often need to use "reset".

pallid thicket
cosmic saddle
pallid thicket
#

Good to know, thank you.

quick tusk
#

@pallid thicket Yeah, there are special characters that can mess with the terminal state:
https://en.m.wikipedia.org/wiki/ANSI_escape_code
Maybe git grep found a line in that particular repo that matched your query and also contained some wonky escape codes. In my book, that would not be a bug in anything, it would be correct behavior.

ANSI escape sequences are a standard for in-band signaling to control cursor location, color, font styling, and other options on video text terminals and terminal emulators. Certain sequences of bytes, most starting with an ASCII escape character and a bracket character, are embedded into text. The terminal interprets these sequences as command...

#

I would expect redirecting grep output to a file (git grep foo > myfile.txt), then opening the file in a pager or editor that doesn't trip on weird bytes, to be one possible workaround. I think almost any viewer (e.g., less) will work, as long as you don't specifically tell it to do things with escape sequences (e.g., less -R).

near oyster
#

@pallid thicket try “-l” (that’s an el not a one) instead of “-n”, to see just a list of matching files because compiled files or non-text files don’t really have lines. “.pyc” files are compiled python for example.

hexed ferry
#

stty sane can rescue a messed up terminal sometimes.

#

Maybe run a file through the strings utility before going to grep? So it keeps only printables. not sure how you interact with git grep there though.

waxen hill
#

ag (the Silver Searcher) highlights its output; newer compiler toolchains do so as well.

#

In each case, just pipeline through /usr/bin/cat to catch that stuff.

#
 $ ag sizeof | cat
#
 $ ag sizeof | cat -n
#

reset is useful, as mentioned.

For ssh, to one server where it's a problem, I use:

 $ stty -isig
#

Also the terminal program itself may have a protective switch you can use.

#

pipelining through /usr/bin/cat is my usual strategy, though.

humble vessel
#

Can anyone recommend what GUI client I should install on my windows PC for GitHub use

full steeple
humble vessel
#

I'll try that. thanks

full steeple
#

np

pallid thicket
#

@winter sierra It looks to me like it's thinking that all or most of the files in the whole repo were modified. I'm not sure why it would be seeing changes on most of them.

#

Honestly I am not the best with git outside of the specific workflow that I've gotten into for library PRs. My ability to troubleshoot git is limited. So usually when I end up in a weird state and am unable to figure out exactly why or how to get back I end up just making a whole seperate new clone and starting fresh. It's probably possible to recover from the state you're in but I'm probably not able to help get it back all the way...

If you're willing / interested to start a fresh one though I can try to walk you through from there.

winter sierra
#

Maybe the best thing to do is to delete the whole fork and create a new one. It's just these five examples that I created

pallid thicket
#

It might have been possible to keep the fork. But deleting will end up being easier in this case I think.

winter sierra
#

your last text part between () I don't understand. Can you rephrase pse

pallid thicket
#

@winter sierra Ah, one thing I noticed is that your fork is created from my fork instead of from the Adafruit one. So actually I do think it'll be easier to delete the fork and make a new one starting from Adafruit.