Lore

If it's worth remembering, it's worth writing down, if I find the time, and remember...

User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
git [2018/08/23 11:22] – [Pretty Log Alias] thekojukinatorgit [2019/05/08 16:08] (current) – [PowerShell Visual Studio Code Template] thekojukinator
Line 35: Line 35:
 </code> </code>
  
 +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 "core.autocrlf=true"
 +    "files.eol": "\r\n"
 +}
 +</code>
 ==== Pretty Log Alias ==== ==== Pretty Log Alias ====
  
Line 58: Line 66:
  
 # I've recently discovered some prettier log outputs, so my .gitconfig aliases are like so... # I've recently discovered some prettier log outputs, so my .gitconfig aliases are like so...
-hist = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all +hist = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''          %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' 
-hist1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all +hist1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' 
-hist2 = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short --all+hist2 = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
 # first two are courtesy of https://stackoverflow.com/a/9074343 # first two are courtesy of https://stackoverflow.com/a/9074343
 </code> </code>
Line 550: Line 558:
 !*/ !*/
  
-# allow .gitignore at top level +# 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/settings.json 
 + 
 +# whitelist contents of these folders at the top level 
 +!/ProjectFolderContainingAllTheGoodies/** 
 + 
 +# regardless of above, ignore these folders and files everywhere 
 +**/_logs
 +**/_testing*
  
-# regardless of above, ignore '.vscode' folder everywhere 
-**\.vscode/ 
 </code> </code>
  
git.1535037743.txt.gz · Last modified: 2018/08/23 11:22 by thekojukinator