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:
parent
63ebf08957
commit
ce7c593088
|
@ -0,0 +1,8 @@
|
||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"book/**": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
# Branching
|
# Branching
|
||||||
```
|
```bash
|
||||||
# Create a new branch.
|
# Create a new branch.
|
||||||
git branch <branchName>
|
git branch <branchName>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Collaboration
|
# Collaboration
|
||||||
```
|
```bash
|
||||||
# Pull from default remote.
|
# Pull from default remote.
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Commits
|
# Commits
|
||||||
```
|
```bash
|
||||||
# Use a basic GUI. Actually works quite well for staging hunks that can't be split.
|
# Use a basic GUI. Actually works quite well for staging hunks that can't be split.
|
||||||
git gui
|
git gui
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Fixing commits
|
# Fixing commits
|
||||||
```
|
```bash
|
||||||
# Revert the last commit.
|
# Revert the last commit.
|
||||||
git revert HEAD
|
git revert HEAD
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Git configuration
|
# Git configuration
|
||||||
```
|
```bash
|
||||||
# See where configuration options are set.
|
# See where configuration options are set.
|
||||||
git config --list --show-origin
|
git config --list --show-origin
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Repository information
|
# Repository information
|
||||||
```
|
```bash
|
||||||
# List config details, including remotes, for the current repo.
|
# List config details, including remotes, for the current repo.
|
||||||
git config --local -l
|
git config --local -l
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# User information
|
# User information
|
||||||
```
|
```bash
|
||||||
# Pull user information.
|
# Pull user information.
|
||||||
git config user.name
|
git config user.name
|
||||||
git config user.email
|
git config user.email
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Example: Create a new repo from a subdirectory
|
# 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.
|
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.
|
# Clone the repository into a new directory.
|
||||||
git clone _.git
|
git clone _.git
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Example: Updating a fork
|
# Example: Updating a fork
|
||||||
|
|
||||||
```
|
```bash
|
||||||
# On the fork:
|
# On the fork:
|
||||||
git checkout master
|
git checkout master
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Logging
|
# Logging
|
||||||
```
|
```bash
|
||||||
# View the last few commits.
|
# View the last few commits.
|
||||||
git log
|
git log
|
||||||
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
|
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Stashing changes
|
# 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.
|
# 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 pop = git stash apply && git stash drop
|
||||||
git stash
|
git stash
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Tags
|
# Tags
|
||||||
```
|
```bash
|
||||||
# List all tags.
|
# List all tags.
|
||||||
git tag
|
git tag
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue