git小乌龟+gitee码云配置步骤(只做参考)

git小乌龟+gitee码云配置,需要进行以下步骤:

  • 注册Gitee账号并创建仓库
  • 安装Git客户端:
  • 在Git Bash Here中完成配置Git客户端的用户名和邮箱:
    git config --global user.name “Your Name”
    git config --global user.email “your_email@example.com”

  • 生成SSH密钥
    ssh-keygen -t rsa -C “your_email@example.com”

  • 将公钥添加到Gitee账号中。在Gitee账号的个人设置中,找到“SSH公钥”选项,将公钥复制进去

  • 在本地仓库中使用SSH协议连接到Gitee仓库,使用以下命令:
    git remote add origin git@gitee.com:username/repo.git"
    其中,username为Gitee账号名,repo.git为仓库名

  • 在本地仓库中使用HTTP协议连接到Gitee仓库,使用以下命令:
    git remote add origin https://gitee.com/username/repo.git
    https://gitee.com/username/repo.git为仓库地址

  • 将本地仓库的内容推送到Gitee仓库:
    git push -u origin master
    这将把本地仓库的master分支推送到Gitee仓库中。
    至此,Git和Gitee的配置就完成了。可以使用Git客户端进行版本控制、推送和拉取Gitee仓库中的代码。