git

发布时间 2023-10-27 23:58:17作者: PEAR2020

1. initialize a repo on github
echo "# newweb" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/sabertobihwy/newweb.git
git push -u origin main

2. wants to remove the local git repo???
delete the .git folder
3. remove the file before push??
git rm -r --cached .idea/
git commit --amend
(enter commit message)