From 5a1ba0e700028d67893e0c89ea0aa2abcd43b99b Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sat, 09 Jan 2016 19:48:30 -0500 Subject: git page: make commands easier to copy/paste --- (limited to 'site/git/index.php') diff --git a/site/git/index.php b/site/git/index.php index e99dd88..d091447 100644 --- a/site/git/index.php +++ b/site/git/index.php @@ -248,17 +248,17 @@


- $ git config --global user.name "Your Name"
- $ git config --global user.email your@emailaddress.com
+ git config --global user.name "Your Name"
+ git config --global user.email your@emailaddress.com
NOTE: you do not have to use your legal name; we don't care what name you use. Pseudonyms (alternative names) are OK. If you wish to be anonymous (no name), you can also use Libreboot Contributor as your name, and noname@libreboot.org as the email address. We will happily accept anonymous contributions in the libreboot project.


- $ git config --global core.editor nano
- $ git config --global color.status auto
- $ git config --global color.branch auto
- $ git config --global color.interactive auto
- $ git config --global color.diff auto + git config --global core.editor nano
+ git config --global color.status auto
+ git config --global color.branch auto
+ git config --global color.interactive auto
+ git config --global color.diff auto

NOTE: the above steps for colour make git use red/green font colours for showing diffs. If you are red/green colour-blind, please ignore the above steps. The default configuration in git is no-colour (all one colour, usually the default that your terminal uses). If you are colour-blind, git can display in other colours; refer @@ -271,23 +271,23 @@

When working with git, you will need your current working directory to be inside the libreboot directory that was just created.
- $ cd libreboot/ + cd libreboot/


- $ git status + git status

git add path/to/file. You should also add any other files that are listed as modified in the git status. If there are deleted files in the git status, you can use git rm path/to/file. As long as you have added all the untracked files, it is generally easier to use:"); ?>
- $ git commit -a
+ git commit -a
git commit)"); ?>


- $ git commit --amend
+ git commit --amend

- $ git commit -a --amend + git commit -a --amend

@@ -298,19 +298,19 @@

Check once more that everything you want is added. Use the git status command to check for untracked changes/files, and adapt accordingly. Once you've committed everything, your changes will appear in a diff format, using this command:
- $ git show
+ git show
Use PgUp/PgDown to navigate the diff output. This uses the less utility, so all the features from that (e.g. keyword search) are also available.


- $ git log + git log


- $ git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"
+ git config --global --add alias.lol "log --graph --decorate --pretty=oneline --abbrev-commit --all"

- $ git lol
+ git lol
git log, but it's much better and shows branches, etc."); ?>

-- cgit v0.9.1