HarmonyOS鸿蒙Next中Git常见命令有哪些

HarmonyOS鸿蒙Next中Git常见命令有以下这些:

命令 说明
git init 初始化本地仓库
git clone <url> 克隆远程仓库到本地
git add <file> 添加文件到暂存区
git add . 添加所有修改到暂存区
git commit -m "message" 提交暂存区内容到本地仓库
git status 查看工作区和暂存区状态
git remote -v 查看远程仓库地址
git fetch 从远程获取最新版本(不自动合并)
git pull 拉取远程变更并合并(=fetch+merge
git push 推送本地提交到远程
git push --set-upstream origin <branch> 推送并建立远程分支关联

初始化仓库

git init

下载远程仓库

git clone https://gitee.com/itying2/music.git

把新建的文件提交到远程

1、git add 文件名

git add product.ets

2、commit

git commit -m "备注信息"

推送到远程

配置远程地址

git remote add origin https://gitee.com/itying2/music.git   
git push -u origin "master"

拉取远程数据

git pull

更多关于HarmonyOS鸿蒙Next中Git常见命令有哪些的实战教程也可以访问 https://www.itying.com/category-93-b0.html

回到顶部