bluettt

1 Github上创建仓库

image-20200601203831845

image-20200601205449896

2 cd进入本地工程文件夹

3 在代码工程文件夹生成.git目录,将当前目录变成git可以管理的目录。

git init

4 添加文件到暂存区:

单个文件

git add README.md

整个目录下的文件:

git add .

5 将暂存区里的改动给提交到本地的版本库

双引号里面的内容表示你对这次提交的注释

git commit -m "注释"

6 配置账户

git config --global user.email betterwanglu@sina.com
git config --global user.name lrw998

7 提交到远程仓库

(第一次连接)

本地仓库与远程仓库连接

git remote add origin https://github.com/lrw998/mysqrt.git

将代码提交到远程仓库

git push -u origin master

(第二次以后)

git push

分类:

技术点:

相关文章:

  • 2021-08-15
  • 2021-06-06
  • 2022-12-23
  • 2021-10-11
  • 2021-05-05
  • 2022-02-03
  • 2021-05-27
  • 2021-11-03
猜你喜欢
  • 2022-01-14
  • 2021-11-02
  • 2021-08-21
  • 2021-11-28
  • 2021-07-09
  • 2021-10-11
  • 2022-12-23
相关资源
相似解决方案