git基本命令

你有一个空的仓库

要开始使用,您需要在终端中运行这些命令。

第一次使用Git? 学习基本的Git命令

第一次配置Git

git config --global user.name "你的名字"
git config --global user.email "你的邮箱"

使用您的存储库

我只想克隆这个存储库

如果要简单地克隆此空存储库,请在终端中运行此命令。

git clone https://******.git
我的代码已经准备好推送

如果你代码已经准备好推送到仓库,请在终端中执行该命令

cd existing-project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin https://****/***.git
git push -u origin master
我的代码已经由Git跟踪

如果你的代码已经由Git跟踪,然后设置这个仓库作为你的“origin”推送。

cd existing-project
git remote set-url origin https://****/****.git
git push -u origin --all
git push origin --tags

相关推荐

  1. git基本命令

    2023-12-21 01:12:01       50 阅读
  2. git基本命令

    2023-12-21 01:12:01       18 阅读
  3. git基础命令(二)

    2023-12-21 01:12:01       31 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-21 01:12:01       17 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-21 01:12:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-21 01:12:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-21 01:12:01       18 阅读

热门阅读

  1. 用Python制作二维码

    2023-12-21 01:12:01       37 阅读
  2. VGG卷积神经网络:深度学习中的强大工具

    2023-12-21 01:12:01       38 阅读
  3. Golang 内存分配机制详解

    2023-12-21 01:12:01       37 阅读
  4. goland的debug模式修复

    2023-12-21 01:12:01       46 阅读
  5. CUDA编程示例:CPU预处理->GPU处理->CPU后处理

    2023-12-21 01:12:01       29 阅读
  6. centos 7.x 安装docker最新版

    2023-12-21 01:12:01       47 阅读