Automate git repository initialization on your local machine
Option 1: Existing remote repository
#! /bin/bash/# Initialise a git repo on a local machine
# Link it to a remote repository on github
# TO run: bash script_name.sh "first commit" inside your working directoryclear
echo "# git-new-repo-bash-script" >> README.mdgit init
git add README.md
git commit -m $1git remote add origin https://github.com/Banzyme/git-new-repo-bash-script.git
git push -u origin master
Update remote repository with local changes
#! /bin/bash/
# This script will update changes to an existing remote repository
# Run command: bash update.sh "Fist change"git add .
git commit -m $1
git push -u origin master
Option 2: Push existing local repository to a remote repository
#! /bin/bash
# Run: bash local_to_remote.shgit remote add origin https://github.com/Banzyme/git-new-repo-bash-script.git
git push -u origin master