Skip to content

Instantly share code, notes, and snippets.

@mkows
Created June 22, 2018 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkows/ccf91ed64f30107dd0a9cc673d638100 to your computer and use it in GitHub Desktop.
Save mkows/ccf91ed64f30107dd0a9cc673d638100 to your computer and use it in GitHub Desktop.
Initialize git repository in a current dir (with .gitignore, README.md)
#!/bin/bash
# Usage: ./init-git.sh
# NOTE: Run within your project directory
# .gitignore
cat > .gitignore << EOF
target/
.DS_Store
.idea
.idea_modules
EOF
# README.md
cat > README.md << EOF
# About
Hello
EOF
# init git
git init
git add .
git commit -m "Initial commit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment