Last active
August 6, 2022 18:04
-
-
Save Farid-NL/34cf961df98c99f6f7982d92362c1cdb to your computer and use it in GitHub Desktop.
Configuración básica para Git con VSCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default editor | |
| # (If you do not have program in the PATH environment variable use the absolute path of the program) | |
| [core] | |
| editor = vim | |
| #editor = code --wait | |
| #editor = "C:/Users/Farid/AppData/Local/Programs/Microsoft\\ VS\\ Code/Code.exe" --wait | |
| # Name & Email | |
| [user] | |
| email = [email protected] | |
| name = Carlos Farid Nogales López | |
| # Merge tool | |
| [merge] | |
| tool = vscode | |
| [mergetool "vscode"] | |
| cmd = code --wait $MERGED | |
| #cmd = "C:/Users/Farid/AppData/Local/Programs/Microsoft\\ VS\\ Code/Code.exe" --wait $MERGED | |
| # Diff tool | |
| [diff] | |
| tool = vscode | |
| [difftool "vscode"] | |
| cmd = code --wait --diff $LOCAL $REMOTE | |
| #cmd = "C:/Users/Farid/AppData/Local/Programs/Microsoft\\ VS\\ Code/Code.exe" --wait --diff $LOCAL $REMOTE | |
| # Prevent prompt from appearing: Launch 'vscode' [Y/n]: | |
| [difftool] | |
| prompt = false | |
| # Useful aliases | |
| [alias] | |
| # Values for log: | |
| # Color => %C(attribute color) => Colors: normal, black, red, green, yellow, blue, magenta, cyan, white. | Attributes: bold, dim, ul, blink, reverse, italic, strike | |
| # Color_reset => %C(reset) | |
| # New_line => %n | |
| # Hash => %h | |
| # Author_date => %aD | |
| # Author_date (relative) => %ar | |
| # Commiter_date => %cD | |
| # Branches => %d | |
| # Message => %s | |
| # Name_author => %an | |
| # Email_author => %ae | |
| # Name_commiter => %cn | |
| # Email_commiter => %ce | |
| #lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(auto)%d%C(reset) %C(bold green)(%ar)%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)[A] %an: %aD <%ae>%C(reset)%n'' %C(dim white)[C] %cn: %cD <%ce>%C(reset)%n' | |
| #lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(auto)%d%C(reset) %C(bold green)(%ar)%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(bold cyan)[A]%an: %aD%C(reset) %C(dim white)<%ae>%C(reset)%n'' %C(bold cyan)[C]%cn: %cD%C(reset) %C(dim white)<%ce>%C(reset)%n' | |
| cge = config --global -e | |
| s = status | |
| Acm = !git add -A && git commit -m | |
| acm = !git add . && git commit -m | |
| fd = !git fetch && git difftool | |
| sw = switch | |
| st = stash | |
| stpop = stash pop | |
| stpush = stash push | |
| diffstash = difftool stash@{0}^! | |
| aliases = !git config --get-regexp ^alias\\. | less | |
| # Show branches without using LESS | |
| [pager] | |
| branch = false | |
| # Only update to the new history if there is no divergent local history | |
| [pull] | |
| ff = only | |
| # Default branch name ('main' instead of 'master') | |
| [init] | |
| defaultBranch = main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment