Skip to content

Instantly share code, notes, and snippets.

@prashantdsala
Created December 9, 2024 11:16
Show Gist options
  • Save prashantdsala/58efb9eb79f1ff35d0f66ec3c33838b9 to your computer and use it in GitHub Desktop.
Save prashantdsala/58efb9eb79f1ff35d0f66ec3c33838b9 to your computer and use it in GitHub Desktop.
Push non-git project to git repo
cd /path/to/your/project
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/username/repo-name.git
git branch -M main
git push -u origin main
git config pull.rebase true // For rebase to reconcile the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment