Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

#############################################
# GitHub Repository Initialization Commands #
#############################################

# Step 1: Initialize a new Git repository
git init

# Step 2: Stage all files for commit
git add .

# Step 3: Commit the staged files with a message
git commit -m "init"

# Step 4: Rename default branch to 'main'
git branch -M main

# Step 5: Add your GitHub repository as a remote
# Replace <URL> with your actual GitHub repository URL
git remote add origin <URL>

# Step 6: Push the 'main' branch to GitHub
git push origin main

# Step 7 (Optional): Force push to override existing history
# ⚠️ Use with caution!
git push origin main --force

💡 Tip: Replace <URL> with the HTTPS or SSH URL of your GitHub repository, e.g., https://github.com/username/repo.git

✅ This script sets up your project and publishes it to GitHub with a clean main branch.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors