git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
git [2018/05/10 14:37] – 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 278: | 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 525: | 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/ | ||
</ | </ | ||
Line 580: | Line 618: | ||
# End of https:// | # End of https:// | ||
- | </ | ||
- | |||
- | ===== GitHub ===== | ||
- | |||
- | ==== Pushing via SSH ==== | ||
- | |||
- | After following [[https:// | ||
- | |||
- | <code bash> | ||
- | git remote set-url origin git+ssh:// | ||
- | # ex: | ||
- | git remote set-url origin git+ssh:// | ||
</ | </ | ||
{{tag> | {{tag> |
git.1525977421.txt.gz · Last modified: 2018/05/10 14:37 by thekojukinator