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.


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

  1. What is it and how does it work
    1. Git Credential Manager, a how to at github,com, and their documentation page.
    2. https://github.com/GitCredentialManager/git-credential-manager. the code  page, hads a wiki obvs
    3. This page documents the environment variables.
  2. Installing the Binaries
    1. 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
    2. Credential stores, on Linux, the GCM has helpers. This page documents how to install gpg and pass as helpers. The man pass page at linux.die.net
    3. 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.
    4. 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
      1. https://github.com/GitCredentialManager/git-credential-manager/releases/tag/v2.0.877, hosts the code, .deb or in tar or source.
    5. Will I need this, .NET from MS? Or this? The GCM compiles without installing .net in Ubuntu 22.
  3. Configuring GCM
    1. This page documents the environment variables.
    2. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
    3. About remote repositories, or about-remote-repositories#cloning-with-https-urls how to get access tokens FFS, and Fine-grained personal access tokens (Beta)
    4. 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

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

  1. https://itnext.io/the-github-development-workflow-fb48d9bb63f9
  2. https://gist.github.com/nzakas/7633640
  3. https://nvie.com/posts/a-successful-git-branching-model/
  4. https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell

6 Replies

  1. 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

  2. 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,

  3. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.