Skip to content

hitesh7424/HowToGit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

HowToGit

Main Commands

git clone https://github.com/<username>/<repo>.git
git add .
git commit -a -m "message"
git push

To create ssh keys

    ssh-keygen -t ed25519 -C "your_email@example.com"

or

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

how to add ssh keys to github

Profile > settings > SSH and GPG keys > Add ssh key

copy contents of "/c/Users/YOU/.ssh/sshKey.pub" or "/home/YOU/.ssh/sshKey.pub"

Paste it to "Key" text area

click on "Add SSH key"

Check SSH agent and key passphrase:

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519

Add Remote URL for ssh

git remote set-url origin git@github.com:<username>/<repo>.git
  • now git push will work on http cloned repo

About

git commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published