Skip to content

Instantly share code, notes, and snippets.

@addohm
Last active July 21, 2025 08:41
Show Gist options
  • Save addohm/fe39188cdd9e762d94f4dda8068324e4 to your computer and use it in GitHub Desktop.
Save addohm/fe39188cdd9e762d94f4dda8068324e4 to your computer and use it in GitHub Desktop.
Git Starts from CLI

Pulling an exisitng repository into a new folder

git init

git remote add origin https://{YOUR_GITHUB_TOKEN}@github.com/{REPO_OWNER_USER_NAME}/{REPO_NAME}.git

git pull origin main

Pushing a local repository to a newly created github repo

git init -b main

git add .

git commit -m "Initial commit"

git remote add origin https://{YOUR_GITHUB_TOKEN}@github.com/{REPO_OWNER_USER_NAME}/{REPO_NAME}.git

git push -u origin main

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