README.md
: Provide a clear description of your project, usage instructions, and any relevant details.LICENSE
: Specify the terms under which your code can be used..gitignore
: Exclude unnecessary files (e.g., logs, build artifacts) from the repository..gitkeep
: Include empty directories in the repository (Git doesn’t track empty folders).v1.0.0
).README.md
# Project Name
A brief description of the project.
## Installation
Steps to install the project.
## Usage
Examples of how to use the project.
LICENSE
.gitignore
# Logs
*.log
# Node.js
node_modules/
# Python
__pycache__/
.gitkeep
.gitkeep
file to an otherwise empty folder.git init
git add .
git commit -m "Message"
git branch branch-name
git checkout branch-name
git merge branch-name
git push origin branch-name
git pull origin branch-name
#!/bin/bash
# filepath: c:\Users\Utente\OneDrive\Documenti\GitHub\miniguide\init_git_repo.sh
# Initialize a new Git repository
mkdir "$1"
cd "$1" || exit
git init
# Create essential files
echo "# $1" > README.md
echo "Add your license text here." > LICENSE
echo -e "# Logs\n*.log\n\n# Node.js\nnode_modules/\n\n# Python\n__pycache__/" > .gitignore
# Add files to Git
git add .
git commit -m "Initial commit"
echo "Git repository initialized in $1"
# filepath: c:\Users\Utente\OneDrive\Documenti\GitHub\miniguide\init_git_repo.ps1
# Initialize a new Git repository
param (
[string]$RepoName
)
New-Item -ItemType Directory -Path $RepoName
Set-Location -Path $RepoName
git init
# Create essential files
Set-Content -Path "README.md" -Value "# $RepoName"
Set-Content -Path "LICENSE" -Value "Add your license text here."
Set-Content -Path ".gitignore" -Value "# Logs`n*.log`n`n# Node.js`nnode_modules/`n`n# Python`n__pycache__/"
# Add files to Git
git add .
git commit -m "Initial commit"
Write-Host "Git repository initialized in $RepoName"
init_git_repo.sh
.chmod +x init_git_repo.sh
../init_git_repo.sh MyNewRepo
init_git_repo.ps1
..\init_git_repo.ps1 -RepoName "MyNewRepo"
Note: Ensure you have Git installed and available in your system’s PATH before running the scripts.