Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_init [2021/06/02 16:08] – mgupton | git_init [2025/12/30 16:20] (current) – mgupton | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Git Init ====== | ====== Git Init ====== | ||
| + | |||
| + | < | ||
| + | git init -b main # Set the name of the default branch to " | ||
| + | |||
| + | git config user.name "Your Name Here" | ||
| + | git config user.email your@email.com | ||
| + | |||
| + | git commit --allow-empty -m " | ||
| + | </ | ||
| + | < | ||
| + | git checkout -b working | ||
| + | </ | ||
| + | < | ||
| + | git remote add origin <remote url> | ||
| + | git push -u origin < | ||
| + | </ | ||
| ==== Powershell ==== | ==== Powershell ==== | ||
| + | |||
| + | === git-init.ps1 === | ||
| <code powershell> | <code powershell> | ||
| Line 8: | Line 26: | ||
| | | ||
| git config --global core.excludesFile ~/ | git config --global core.excludesFile ~/ | ||
| - | git config user.name " | + | git config |
| - | git config user.email mg@infostar.me | + | git config |
| - | git commit --allow-empty -m " | + | git commit --allow-empty -m " |
| git checkout -b working | git checkout -b working | ||
| } | } | ||
| </ | </ | ||