Skip to content

Instantly share code, notes, and snippets.

@keithmorris
Created June 19, 2014 21:14
Show Gist options
  • Save keithmorris/f4881fff00689e49131e to your computer and use it in GitHub Desktop.
Save keithmorris/f4881fff00689e49131e to your computer and use it in GitHub Desktop.
Simple shell script to initialize a Git repository, create an initial commit, add origin server, create a develop branch and push to the server
#!/usr/bin/env bash
git init .
touch .gitignore
git add --all
git commit -m"initial commit"
git remote add origin $1
git branch develop
git push origin --all
git push origin --tags
echo "Done."
@Anu671998
Copy link

create full programm nitialize a New Git Repository (10 Minutes)

  1. Create a new directory named VersionControl_Practical.
  2. Navigate to the directory and initialize a Git repository.
  3. Create a file named README.md and add the following content:
    # Version Control System Practical
    This repository is for practical tasks on Git basics.
  4. Stage and commit the file with the commit message:
    "Initial commit with README file"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment