Wednesday, January 26, 2022

Install Git

git config --global user.name "your-name"

git config --global user.email "your-email@gmail.com"

git config --global --list

ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com"

cat ~/.ssh/id_rsa.pub (generate SSH key)

ssh -T git@github.com (Check and see if it worked)

Install Git

 

git init

git status

git add .

git commit -m 'first commit'

# https://github.com/new

git remote add origin https://github.com/your-github-name/your-github-repo.git

git push -u origin master

 

// delete last commit from github

git reset HEAD^ --hard

git push -f


※TIPS: Push to github without re-entering password (connect SSH key)

No comments:

Post a Comment