0


git 拉取远程代码(小白教程)以及一些小问题

简洁版
首先用 [ git clone (url) ] 克隆 项目

拉取修改后项目文件用 [ git pull ]

修改文件后 [ git add . ] 并

提交和注释 [ git commit -m ]

最后将文件推送到项目 [ git push ]

=========================================================

在本地用命令行创建一个git仓库,并推送到远程

  1. [ git init ]

在gitStore目录下 初始化一个git仓库

  1. [ git add . ]

复制一个文件到gitStore目录下,然后执行[ git add . ]将“修改”从当前工作区存放到暂存区

  1. [ git commit -m "first commit" ]

将暂存区中存放的文件提交到git仓库

4.在远端新建一个git代码库:https://github.com/*******

5.git remote add origin https://github.com/********

将本地代码库的当前分支与远程的代码库相关联

6.[ git push -u origin master ]

将本地代码库的当前分支推送到远程的代码库

git checkout *** 切换分支

git status 命令用于查看在你上次提交之后是否有对文件进行再次修改

git branch -al 查看本地和远程的所有分支。

git init --创建.git 目录(该目录默认是隐藏的,若没有看到.git目录,使用

ls -ah)

VUE 推送流程

npm run build

git pull

git add .

git commit -m '自己修改的分支项目名'

git push

遇到一些小问题:

error Irregular whitespace not allowed no-irregular-whitespace

这是项目提交时需要某个验证可能是某个包引起的.

可以用 git commit -m "update" --no-verify 跳过验证进行提交

   modified:   static/js/header.js
    modified:   template/pages/baidu-map.html

git pull 报错 有改动文件可以用**线上文件覆盖本地文件 **

**命令: git checkout -- **static/js/header.js emplate/pages/baidu-map.html

git commit -m '***' 出现以上问题是没有cmmoit的上,可以用:

git commit -m "***" --no-verify 来解决

标签: 大数据

本文转载自: https://blog.csdn.net/qq_33565046/article/details/125706966
版权归原作者 释胤 所有, 如有侵权,请联系我们删除。

“git 拉取远程代码(小白教程)以及一些小问题”的评论:

还没有评论