Update all pages to include language for code blocks

Also add a standard editorconfig, and hide the book directory from VS Code.
This commit is contained in:
James Skemp 2019-11-23 10:05:04 -06:00
parent 63ebf08957
commit ce7c593088
14 changed files with 31 additions and 18 deletions

8
.editorconfig Normal file
View File

@ -0,0 +1,8 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
charset = utf-8
insert_final_newline = true

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"files.exclude": {
"book/**": true
}
}

View File

@ -1,5 +1,5 @@
# Branching
```
```bash
# Create a new branch.
git branch <branchName>

View File

@ -1,5 +1,5 @@
# Collaboration
```
```bash
# Pull from default remote.
git pull

View File

@ -1,5 +1,5 @@
# Commits
```
```bash
# Use a basic GUI. Actually works quite well for staging hunks that can't be split.
git gui

View File

@ -1,5 +1,5 @@
# Fixing commits
```
```bash
# Revert the last commit.
git revert HEAD
@ -12,4 +12,4 @@ git revert --no-commit HEAD~3..
# Reset working files to match master (or another branch), removing local changes and commits.
git fetch --all
git reset --hard origin/<branchName>
```
```

View File

@ -1,8 +1,8 @@
# Git configuration
```
```bash
# See where configuration options are set.
git config --list --show-origin
# Edit system/global/local.
git config --system --edit
```
```

View File

@ -1,5 +1,5 @@
# Repository information
```
```bash
# List config details, including remotes, for the current repo.
git config --local -l
@ -32,4 +32,4 @@ git count-objects -v
# Runs database clean-up.
git gc
```
```

View File

@ -1,5 +1,5 @@
# User information
```
```bash
# Pull user information.
git config user.name
git config user.email
@ -10,4 +10,4 @@ git config --global user.name "Your Name"
# Update individual repository user name / email.
git config user.name "Your Name"
git config user.email "your_email@example.com"
```
```

View File

@ -1,7 +1,7 @@
# Example: Create a new repo from a subdirectory
Useful if you want to pull a directory, and its commit history, out into a new repo.
```
```bash
# Clone the repository into a new directory.
git clone _.git

View File

@ -1,6 +1,6 @@
# Example: Updating a fork
```
```bash
# On the fork:
git checkout master

View File

@ -1,5 +1,5 @@
# Logging
```
```bash
# View the last few commits.
git log
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'

View File

@ -1,5 +1,5 @@
# Stashing changes
```
```bash
# If you can't pull/merge due to a file conflict, stashes changes, does a pull, and then puts the changes back, dropping the stash.
# git stash pop = git stash apply && git stash drop
git stash
@ -22,4 +22,4 @@ git stash show 'stash@{0}'
# Show individual changes in a particular stash.
git stash show -p 'stash@{0}'
```
```

View File

@ -1,5 +1,5 @@
# Tags
```
```bash
# List all tags.
git tag
@ -11,4 +11,4 @@ git tag -d TagName
# Push a tag to a remote (local by default).
git push origin TagName
```
```