I finally got a git account, my site is here. This page is about how to, but does not have any command runes. They are held elsewhere. This page was started in 2011 and I have returned to using git at several times over the years. I tidied up the page in Feb 2019 and Nov 2022, transferring some out of date text to comments. This page is mostly about github.
My page https://davelevy.info/wiki/using-git/ documents the old CLI, pre 2FA and will be amended to document using branches in git, and thus github.
This page is being updated to document how to use 2FA.
2FA
Git introduced 2FA at some time, I didn’t really notice as I don;t use git every day and drag and drop still works.
So do do it in batch it seems you need the Git Credential Manager
- What is it and how does it work
- Git Credential Manager, a how to at github,com, and their documentation page.
- https://github.com/GitCredentialManager/git-credential-manager. the code page, hads a wiki obvs
- This page documents the environment variables.
- Installing the Binaries
- Install instructions inc package repos at github.com, there is no Raspberry Pi/arm version, I may need to use the source code version. I have asked for help at https://forums.raspberrypi.com
- Credential stores, on Linux, the GCM has helpers. This page documents how to install
gpg
andpass
as helpers. The man pass page at linux.die.net - https://github.com/GitCredentialManager/git-credential-manager/blob/release/docs/install.md#.NET-tool, how to install a Linux .NET tool, I have not done this yet as I am testing it on an Ubuntu VM.
- https://github.com/GitCredentialManager/git-credential-manager/blob/release/docs/install.md, how to install by OS, we need Debian for Ubuntu; we would for
- https://github.com/GitCredentialManager/git-credential-manager/releases/tag/v2.0.877, hosts the code, .deb or in tar or source.
- Will I need this, .NET from MS? Or this? The GCM compiles without installing .net in Ubuntu 22.
- Configuring GCM
- This page documents the environment variables.
- https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
- About remote repositories, or about-remote-repositories#cloning-with-https-urls how to get access tokens FFS, and Fine-grained personal access tokens (Beta)
- https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git, does this mean if one uses
git clone https
, it obviates the need for all this shite
I was trying to make a pull on a pi, and was told I had to stash the build. I need to take some care on pulling the repo’s from github, it gets quite tricky although a correspondent on the pi forums recommends using ssh protocol.
Some Links
I found these links
- This would seem to be the Git home page, and has a windows version download feature.
- Everyday GIT With 20 Commands Or So from http://kernel.org because its one of Linus’ systems.
- https://github.com/GitCredentialManager/git-credential-manager/blob/main/README.md
To find these I did, a google “how to use git”, I also read the man page, I should check this out, http://rogerdudler.github.io/git-guide/ , it looks very good but does not contain a how to use 2FA. I originally created a commands page and posted them to my Using GIT page ; it is now out of date, since github introduced 2FA.
This page documents the environment variables.
On Branches & Versions
Also posted on Using GIT
How to add a revision
git clone $URL
make the changes and test, include version control block
git status
git add {filename}
git commit -m ‘commit message’
git push # to update the master
I copied the links from the macports page.
I updated the git client on my windows machine as the one installed failed due to an ssh version issue. I installed from git scm.
I removed this comment today, it explained how I got the links in the link list. “These comments have been moved from the Planet Planet page and the comments there simplified. (They were written probably in 2011). They were written while installing Planet Venus for the first few times. I used git to install Venus, and plan to use it to update it. I found the following links useful, or ought to have,”
I also removed this, “from http://wiki.davelevy.info/macports/ in April 2018.” which implies that my original git documents were on the macports page as I wrote a script to manage ‘port’ and when I retired the Mac, I posted the code to github and mde this article it seems,
I added the link on branch & merge.
I updated the page today, retiring some content, or copying it here at least. I also inserted some links about 2FA. I note that one of the drivers for git’s adoption was its community size, and that the download interface is now much easier than sourceforge. It has a Wikipedia page, https://en.wikipedia.org/wiki/Git and I moved http://doc.norang.ca/git-howto.html & http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup to this comment.