Blogger Information
Blog 37
fans 0
comment 1
visits 28415
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
如何在vs code提交到git
kong
Original
512 people have browsed it

git的基本操作

网址

网址: https://gitee.com/

基本原理

本地版本库 ——> 远程仓库git ——> 下载
暂存区 —— 本地仓库 —— 提交
(零存) —— (整取) —— 提交

本地仓库

初始化命令

git init

当文件后缀出现 U 代表仓库创建成功,但是文件并没有提交到仓库状态

提交到暂存区/索引区

文件多个提交

git add demo1.html demo2.html…

文件一次性多个提交

git add .

当文件后缀出现 A 代表提交到暂存区/索引区

提交到本地版本库/仓库中

git commit -m ‘写入备注信息’

提交到远程仓库

Git 全局设置:

git config —global user.name “name”
git config —global user.email “xxx.com”

设置远程仓库地址

git remote add origin https://gitee.com/xxx/demo.git

将本地与远程仓库进行关联

git push —set-upstream origin master

提交

git push

文件更新

提交暂存区——写入备注信息——提交

git add .
git commit -m ‘写入备注信息’
git push

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:一个作业提交一个博客就行了
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!