Git

Chapter 5½ - Git. #

The above link does a better job of covering the vast majority of what I’d say than I could hope to put here. Just check it out. But do come back here!

Oh, hai! Welcome back.

So, a lot of people conflate Git and Github, the largest git cloud service on the internet. This isn’t totally without out reason: Github is actually super nice to use, and is often the only way a lot of people use git. For better or worse, you’ll probably want to know how to use it and use it well.

One of the first things you should have to do when using Github is setup authentication, that is a method for logging in from the command line so that you can push your changes in your code to Github’s servers. For security reasons, you can’t just use a password (This is a good thing) and instead need to setup key based authentication.

I’m going to save the nitty gritty about how public-private key based authentication works for the Security & Exploitation chapter, but for now what you need to know is having a key pair will let you securely access git and ssh services on various servers, so we need to get keys setup.

[TODO]


Bit, an alternative git cli (Github)

learngitbranching.js.org (more than just branching)

μGit- DIY Git in python

[TODO] Show how to setup SSH keys for Git

SSH keys article on the (Arch Wiki)

ssh-keygen

After you have a key generated, you’ll need to add the public key to github,

keysongithub

you may need to change existing repo to use a git based origin rather than an https one:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
╭─vega@lyrae ~/git/local/opguides  ‹master› 
╰─➤  git remote -v
origin	https://github.com/VegaDeftwing/opinionatedguide (fetch)
origin	https://github.com/VegaDeftwing/opinionatedguide (push)
╭─vega@lyrae ~/git/local/opguides  ‹master› 
╰─➤  git remote set-url origin git@github.com:VegaDeftwing/opinionatedguide.git
╭─vega@lyrae ~/git/local/opguides  ‹master› 
╰─➤  git remote -v
origin	git@github.com:VegaDeftwing/opinionatedguide.git (fetch)
origin	git@github.com:VegaDeftwing/opinionatedguide.git (push)

[TODO] show graphical git tools

https://desktop.github.com

https://extrawurst.itch.io/gitui

https://aurees.com

https://gitfiend.com

http://cong.tools (Windows only)

https://gitahead.github.io/gitahead.com/

https://github.com/FredrikNoren/ungit

https://gitextensions.github.io (Windows only)

https://tortoisegit.org/download/ (Windows only)

[TODO] comparison of Bit, Git, GithubCLI

[TODO] .gitignores

[TODO] show git log --all --graph --decorate --oneline and adding it to the gitconfig

[TODO] git diff

https://github.com/dandavison/delta

[TODO] Git on not-github, diy hosting

https://dhwthompson.com/2019/my-favourite-git-commit

[TODO] Files Git works with

https://blog.martinfenner.org/2014/08/25/using-microsoft-word-with-git/

[TODO] Not commiting private info to Git

What will happen when you commit secrets to a public Git repo?

https://onlywei.github.io/explain-git-with-d3/

Notes on GitHub and competition #

Stop using number of git commits as any metric (u/Sajjon on Reddit)

trophy

generated using https://github.com/ryo-ma/github-profile-trophy, the above are the stats on my github profile

Vegas git contrib graph

badmetric

ahh, much better. Made using https://github.com/gelstudios/gitfiti, inspired by someone else that wrote the same thing, but I can’t find the original.

Other Version Control Systems #

Git is by far the most used VCS out there. If you want to use something else I encourage you to try it and learn it, but realize if the point is to work with others it might be a pain

[TODO]

Subversion

Mercurial

CVS

Fossil

Weird Git #

https://radicle.xyz

CSS in Github READMEs

Further Reading #

./missing-semester - Metaprogramming

Chapter 6¾ - Documentation #

Lets talk about changelogs, or, how I loathe ‘bugfixes and performance improvements’ (Remy van Elst’s Blog)


If you would like to support my development of OpGuides, please consider supporting me on Patreon or dropping me some spare change on Venmo @vegadeftwing - every little bit helps ❤️