GIT简明命令

学习资源——知乎

GIT网页创建project

  1. create blank project

  2. 注意setting -》repository -》Protected branches -》unprotected

提交程序到GIT

  1. cd 待提交的文件

  2. git init

  3. git add .

  4. git commit -m ‘model’

  5. git remote add origin https://x/x/x.git

  6. git branch -M main

  7. git push -uf origin main

跟新已提交文件到GIT

  1. cd 待提交的文件

  2. git add .

  3. git commit -m ‘model’

  4. git pull --rebase origin main

  5. git push -uf origin main

PS

删除GIT —— rm -fr .git

空文件GIT不识别,人工创建名称为 .gitkeep 文件

你可能感兴趣的:(GIT,git,github)