“Your book stinks. What other references can I use?”
Here are more! I found these by searching the Internet for Git book recommendations. The only ones I’ve used are the man pages and Pro Git.
If you have the manual pages (historically known as the “man pages”) installed on your system, and you probably do, you can get help for particular Git commands right from the command line.
For example, if you want to know about git config
, you can type:
$ man git-config
(The minus between “git” and “config” might or might not be required depending on your system, but I’ve never found a place where it doesn’t work.)
Once you’re in there, the arrow keys, space bar, and page up/down probably work to navigate, and hitting q
or Escape
probably quits. It depends on the pager your system uses.
These manual pages are very comprehensive, and don’t tend to be easy to read. But all the information is there! They can also be found in The Git Reference Manual, below.
If you know of more, mail them to beej@beej.us.
https://learn.microsoft.com/en-us/windows/wsl/↩︎
https://beej.us/guide/bggit/↩︎
https://github.com/↩︎
https://gitlab.com↩︎
https://docs.gitea.com/↩︎
https://learn.microsoft.com/en-us/windows/wsl/↩︎
https://www.vim.org/↩︎
https://github.com/↩︎
https://cli.github.com/↩︎
https://github.com/cli/cli#installation↩︎
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent↩︎
https://www.baeldung.com/linux/ssh-private-key-git-command↩︎
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens↩︎
https://en.wikipedia.org/wiki/Hexadecimal↩︎
https://git-scm.com/book/en/v2/Git-Tools-Submodules↩︎
https://github.com/github/gitignore↩︎
The --staged
flag is more modern. Older versions of Git used git diff --cached
.↩︎
https://docs.github.com/en/enterprise-server@3.9/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository↩︎
https://en.wikipedia.org/wiki/Stack_(abstract_data_type)↩︎
https://github.com/beejjorgensen/git-example-repo↩︎
https://en.wikipedia.org/wiki/XZ_Utils_backdoor↩︎
A diff shows the difference between two files.↩︎
https://en.wikipedia.org/wiki/Social_Security_number#SSNs_used_in_advertising↩︎
https://support.github.com/request?q=pull+request+removals↩︎
Git cleans up “unreachable” commits after some time has elapsed, so they won’t be instantly destroyed. But they’re on borrowed time unless you create a new branch to hold them.↩︎
You can leave off the --mixed
since it’s the default.↩︎
No guarantees. You shouldn’t rewrite commit history that is already public!! It makes a big mess!↩︎
Perhaps using git reflog
and git cherry-pick
or git cherry-pick -n
and potentially git add -p
, all of which are covered in later chapters. Along with judicious use of rebase, old commits or parts of old commits can be applied while keeping the commit history clean.↩︎
https://en.wikipedia.org/wiki/Battle_of_Mobile_Bay#“Damn_the_torpedoes”↩︎
By default it’s 90 days. You can configure this with the gc.reflogExpire
config option.↩︎
Keeping in mind to never rewrite history on anything you’ve pushed, of course.↩︎
Even if the changes were identical, the UUID would still be different because the hash takes all kinds of other metadata into account.↩︎
https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work↩︎
https://git-scm.com/docs/git-config#_variables↩︎
https://git-scm.com/docs/git-config#_conditional_includes↩︎
https://git-scm.com/docs/git-config#_deprecated_modes↩︎
https://git-scm.com/docs/git-log#_pretty_formats↩︎
https://superuser.com/questions/232373/how-to-tell-git-which-private-key-to-use↩︎
Setting the PATH
is outside the scope of this tutorial, but the short of it is if you can run the diff tool command on the command line (e.g. by running vimdiff
), then it is in the PATH
. If it says command not found
or some such, then it is not in the PATH
. Search the Intertubes for how to add something to the PATH
in Bash. Or set the Git path config explicitly, as shown in the following paragraph.↩︎
https://www.araxis.com/merge/index.en↩︎
https://www.scootersoftware.com/↩︎
https://sourcegear.com/diffmerge/↩︎
https://kdiff3.sourceforge.net/↩︎
https://apps.kde.org/kompare/↩︎
https://meldmerge.org/↩︎
https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge↩︎
https://www.vim.org/↩︎
https://winmerge.org/?lang=en↩︎
https://www.araxis.com/merge/index.en↩︎
https://www.scootersoftware.com/↩︎
https://www.devart.com/codecompare/↩︎
https://invent.kde.org/sdk/kdiff3↩︎
https://meldmerge.org/↩︎
https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge↩︎
https://www.vim.org/↩︎
https://winmerge.org/↩︎
https://www.openvim.com/↩︎
https://git-scm.com/book/en/v2↩︎
https://git-scm.com/docs↩︎
https://shafiul.github.io/gitbook/index.html↩︎
https://learngitbranching.js.org/↩︎
https://github.com/apps/github-learning-lab↩︎
https://www.codecademy.com/learn/learn-git↩︎
https://www.atlassian.com/git/tutorials↩︎
https://gitimmersion.com/↩︎
https://github.com/pluralsight/git-internals-pdf?tab=readme-ov-file↩︎
http://sethrobertson.github.io/GitPostProduction/gpp.html↩︎
https://www.manning.com/books/learn-git-in-a-month-of-lunches↩︎
https://www.amazon.com/Introducing-GitHub-Non-Technical-Peter-Bell/dp/1491949740↩︎
https://www.amazon.com/Git-Pocket-Guide-Working-Introduction/dp/1449325866↩︎
https://www.amazon.com/Version-Control-Git-collaborative-development/dp/1449316387↩︎
https://www.amazon.com/Git-Practice-Techniques-Mike-McQuaid/dp/1617291978↩︎
https://www.amazon.com/Git-Teams-User-Centered-Efficient-Workflows/dp/1491911182↩︎
https://pragprog.com/titles/tsgit/pragmatic-version-control-using-git/↩︎
https://www.amazon.com/Mastering-Git-proficiency-productivity-collaboration/dp/1783553758↩︎