git 初始化

cd 到需要提交的项目目录下,执行git init

 

配置用户名和邮箱

git config --global user.name "codingID" git config --global user.email"coding邮箱"

 

添加文件到缓存区

git add filename // 添加文件到缓存区,可单一文件或全部文件

 

缓存区提交

git commit -m "备注"

 

远程仓库关联

git remote add origin 仓库地址

 

提交至仓库master分支

git push origin master

 

查看本地分支

git branch

 

查看本地/远程分支

git branch -a

 

切换分支

git checkout branch 

相关文章:

  • 2022-12-23
  • 2021-04-13
  • 2021-04-30
  • 2021-06-29
  • 2021-10-31
  • 2022-01-21
  • 2022-12-23
  • 2021-07-27
猜你喜欢
  • 2021-11-14
  • 2021-08-27
  • 2021-07-07
  • 2021-12-24
  • 2021-10-24
  • 2021-08-18
  • 2021-10-02
相关资源
相似解决方案