git
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git [2018/05/09 16:00] – thekojukinator | git [2019/05/08 16:08] (current) – [PowerShell Visual Studio Code Template] thekojukinator | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| I was using '' | I was using '' | ||
| Line 34: | Line 35: | ||
| </ | </ | ||
| + | A complementary setting in //Visual Studio Code// when developing on Windows is to enforce CRLF. | ||
| + | |||
| + | <code css settings.json> | ||
| + | { | ||
| + | // this assumes Windows dev environment with Git config option " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| ==== Pretty Log Alias ==== | ==== Pretty Log Alias ==== | ||
| Line 42: | Line 51: | ||
| <code bash> | <code bash> | ||
| git log --pretty=format:" | git log --pretty=format:" | ||
| + | # or without pagination | ||
| + | git --no-pager log --pretty=format:" | ||
| </ | </ | ||
| Line 48: | Line 59: | ||
| <code bash> | <code bash> | ||
| git config --global alias.hist "log --pretty=format:' | git config --global alias.hist "log --pretty=format:' | ||
| + | # unfortunately these won't work... | ||
| + | git config --global alias.hist " | ||
| + | git config --global alias.hist "!git --no-pager log --pretty=format:' | ||
| + | # but, this will disable pagination for all calls to ' | ||
| + | git config --global pager.log false | ||
| + | |||
| + | # I've recently discovered some prettier log outputs, so my .gitconfig aliases are like so... | ||
| + | hist = log --graph --abbrev-commit --decorate --format=format:' | ||
| + | hist1 = log --graph --abbrev-commit --decorate --format=format:' | ||
| + | hist2 = log --pretty=format:' | ||
| + | # first two are courtesy of https:// | ||
| </ | </ | ||
| Line 89: | Line 111: | ||
| git config -l | git config -l | ||
| # show global settings only | # show global settings only | ||
| + | # these live in the user profile | ||
| git config --global -l | git config --global -l | ||
| # show system settings only | # show system settings only | ||
| + | # these live in the git installation path | ||
| git config --system -l | git config --system -l | ||
| - | # show repo settings only (must be in repo folder) | + | # show local settings only |
| + | # these live in the repo | ||
| git config --local -l | git config --local -l | ||
| </ | </ | ||
| Line 275: | Line 300: | ||
| git remote set-branches --add origin dev1 | git remote set-branches --add origin dev1 | ||
| </ | </ | ||
| + | |||
| + | When a tag is removed from the local **repo** it will not be removed from the remote **repo** via standard '' | ||
| + | |||
| + | <code bash> | ||
| + | # delete <tag> from < | ||
| + | git push < | ||
| + | # ex: | ||
| + | git push origin :v1.0 | ||
| + | </ | ||
| + | |||
| + | Alternatively, | ||
| ===== Stage, Confirm, Commit, and Tag ===== | ===== Stage, Confirm, Commit, and Tag ===== | ||
| Line 522: | Line 558: | ||
| !*/ | !*/ | ||
| - | # allow .gitignore | + | # allow .git* at top level |
| - | !.gitignore | + | !.git* |
| - | # whitelist these file types everywhere | + | # allow .md at top level |
| - | !**/*.ps1 | + | !*.md |
| - | !**/*.psm1 | + | |
| - | !**/*.psd1 | + | # whitelist VSCode settings at the top level |
| - | !**/*.xml | + | !/.vscode/ |
| + | |||
| + | # whitelist contents of these folders at the top level | ||
| + | !/ | ||
| + | |||
| + | # regardless of above, ignore these folders and files everywhere | ||
| + | **/_logs* | ||
| + | **/_testing* | ||
| - | # regardless of above, ignore ' | ||
| - | **\.vscode/ | ||
| </ | </ | ||
git.1525896047.txt.gz · Last modified: 2018/05/09 16:00 by thekojukinator