首页 > 其他 > 详细

使用Git在团队内共享配置信息

时间:2021-04-17 17:49:56      阅读:22      评论:0      收藏:0      [点我收藏+]

Git的本地的仓库:working directory, staging area, repository

初始化Git

git config --global user.name <>
git config --global user.email <>

创建Git仓库

git init

Git命令

git status
// working directory -> staging area
git add <filename>
git add . // all
// staging area -> repository
git commit -m "<information>"
// log
git log (--oneline)
// diff working directory and staging area
git diff
// rollback, changes out of stage
git reset
// back to the latest commit
git reset --hard
// back to the pointed version
git reset --hard <commit ID>

创建远程仓库并推送

git remote add <remote repository‘s name> <url>
git push -u <remote repository‘name> <local repository‘name>

将远程仓库克隆到本地仓库

git clone <url>

将远程仓库中的修改推送到本地

git pull

确认分支状态,创建新分支

git branch
git branch <new branch‘s name>

在分支之间切换

git checkout <branch‘s name>

使用Git在团队内共享配置信息

原文:https://www.cnblogs.com/leapxx/p/14670683.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!