This repository has been archived on 2024-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
joomla/bin/inc_new_project/git_setup.sh

19 lines
601 B
Bash

#!/bin/bash
# This Bash script initializes a new Git repository, removes existing Git info, creates a README.md with the project name, and makes an initial commit.
PROJECTNAME=$(basename "$(pwd)")
rm -rf .git # Remove existing Git repository information
# New readme for Project
rm README.md
touch README.md
echo "# ${PROJECTNAME}" > README.md
echo "" >> README.md
echo "Created a fresh repo for your ${PROJECTNAME} project." >> README.md
# Initialize a new Git repository
echo -e "\n\e[32mSetup Git Locally\e[0m\n";
git init
git add .
git commit -m "Initial commit of new project $PROJECTNAME"