Last active
May 26, 2024 08:31
-
-
Save abhitrueprogrammer/2928a66df334c31b197653a1618a3469 to your computer and use it in GitHub Desktop.
Guide to setting up github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global user.name "Your Name" | |
git config --global user.email "yourname@example.com" | |
git config --global init.defaultBranch main | |
ssh-keygen -t ed25519 -C <youremail> | |
cat ~/.ssh/id_ed25519.pub | |
#copy the whole output | |
#Add SSH key to github [https://github.com/settings/keys] | |
#Copy your repo's SSH url. | |
git clone git@github.com:USER-NAME/REPOSITORY-NAME.git | |
#TO ADD LOCALLY CREATED FOLDER | |
git init -b main | |
git add . && git commit -m "initial commit" | |
or git remote add origin git@github.com:USER-NAME/REPOSITORY-NAME.git | |
#Pushing is as simple as | |
git push origin {branch_name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prefer creating a new repo then cloning its .git file and then pushing using it to avoid headaches.