当前位置: 首页 > news >正文

win7怎么做网站服务器青岛爱城市网app官方网站

win7怎么做网站服务器,青岛爱城市网app官方网站,法治网站的建设整改措施,windows搭建网站开发Git 安装 操作 命令行 简介: Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。 Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。 Git 与常用的版本控制工具 CVS, Subversion …

Git 安装 · 操作 · 命令行

简介:

Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目。

Git 是 Linus Torvalds 为了帮助管理 Linux 内核开发而开发的一个开放源码的版本控制软件。

Git 与常用的版本控制工具 CVS, Subversion 等不同,它采用了分布式版本库的方式,不必服务器端软件支持。

在这里插入图片描述

  • Workspace:工作区(就是你在电脑里能看到的目录)

  • Index / Stage:暂存区(一般存放在 “.git 目录下” 下的 index 文件(.git/index)中)

  • Repository:仓库区(或本地仓库)

  • Remote:远程仓库

安装:

  1. 源码安装:源码包下载地址:https://git-scm.com/download

    #安装指定系统的依赖包:
    ########## Centos/RedHat ########## 
    $ yum install curl-devel expat-devel gettext-devel \ openssl-devel zlib-devel ########## Debian/Ubuntu ########## 
    $ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev#解压安装下载的源码包:
    $ tar -zxf git-1.7.2.2.tar.gz 
    $ cd git-1.7.2.2 
    $ make prefix=/usr/local all 
    $ sudo make prefix=/usr/local install
    
  2. Window 安装:安装包下载地址:https://gitforwindows.org/

    完成安装之后,就可以使用命令行的 git 工具(已经自带了 ssh 客户端)了,另外还有一个图形界面的 Git 项目管理工具。 
    在开始菜单里找到"Git"->"Git Bash",会弹出 Git 命令窗口,你可以在该窗口进行 Git 操作。
    
  3. Ubuntu安装:

    $ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev 
    $ apt-get install git 
    $ git --version
    

基本信息:

  1. 查看版本:

    $ git --version
    git version 2.22.0.windows.1
    
  2. 查看用户信息:

    #当前登入用户:
    $ git config --global user.name
    Zhangsl#用户邮箱:
    $ git config --global user.email
    547125836@qq.com
    
  3. 设置用户信息:

    #设置用户名:不要‘’
    $ git config --global user.name 'new_name'$ git config --global user.name Nepalese
    $ git config --global user.name
    Nepalese#设置邮箱:
    $ git config --global user.email 'xxx@qq.com'
    
  4. 查看已有配置:

    $ git config --list
    core.symlinks=false
    core.autocrlf=true
    core.fscache=true
    color.diff=auto
    color.status=auto
    ...
    

仓库信息:

  1. 初始化仓库:

    #使用当前目录作为 Git 仓库,文件夹下初始化一个仓库
    $ git init#使用我们指定目录作为 Git 仓库
    $ git init path
    
  2. 查看仓库:

    #本地所有分支:
    $ git branch
    * master#本地和远程所有分支:
    $ git branch -a
    * masterremotes/origin/master#远程所有分支:
    $ git branch -rorigin/master#查看在你上次提交之后是否有修改
    $ git status -s
    On branch master
    Your branch is up to date with 'origin/master'.Untracked files:(use "git add <file>..." to include in what will be committed)gitnothing added to commit but untracked files present (use "git add" to track)
    
  3. 分支管理:

    #创建分支:temp8023
    $ git branch temp8023$ git branch
    * mastertemp8023#切换分支:
    $ git checkout temp8023
    Switched to branch 'temp8023'#创建并切换分支:name
    $ git checkout -b name#删除本地分支:temp8023
    $ git branch -d temp8023
    Deleted branch temp8023 (was 781f2e3).$ git branch
    * master#删除远程分支:name
    $ git push origin :name#合并分支:(本地和远程)
    $ git merge name
    $ git merge origin/name
    
  4. 文件管理:

    #添加到暂存区:(文件绝对路径/或在当前目录下)
    $ git add E:\ZSLWORK\AndroidStudio\ToolLibs\app\src\main\res\drawable\img_test.jpg#错误例子
    $ git add drawable/img_test.jpg
    fatal: pathspec 'drawable/img_test.jpg' did not match any files#删除本地文件:img_test.jpg(已添加到暂存区)
    $ git rm E:\ZSLWORK\AndroidStudio\ToolLibs\app\src\main\res\drawable\img_test.jpg
    error: the following file has changes staged in the index:app/src/main/res/drawable/img_test.jpg
    (use --cached to keep the file, or -f to force removal)$ git rm -f E:\ZSLWORK\AndroidStudio\ToolLibs\app\src\main\res\drawable\img_test.jpg
    rm 'app/src/main/res/drawable/img_test.jpg'#移动或重命名
    $ git mv 'oldName' 'newName'
    
  5. 克隆项目:(类似 svn checkout

    $ git clone <repo>#克隆到指定的目录
    $ git clone <repo> <directory>#克隆远程项目:
    $ git clone git://github.com/schacon/grit.git#repo:Git 仓库
    #directory:本地目录。
    

拉取与提交:

  1. 提交到分支:

    $ git commit -m "notice"$ git commit -m "add a image"
    [master 70f1eba] add a image1 file changed, 0 insertions(+), 0 deletions(-)create mode 100644 app/src/main/res/drawable-v24/img_bg_app4.jpg
    
  2. 推送到远程:

    #需要登入
    $ git push origin masterEnumerating objects: 14, done.
    Counting objects: 100% (14/14), done.
    Delta compression using up to 8 threads
    Compressing objects: 100% (8/8), done.
    Writing objects: 100% (8/8), 102.02 KiB | 34.01 MiB/s, done.
    Total 8 (delta 5), reused 0 (delta 0)
    remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
    To https://github.com/IloveJavaCoding/ToolLibs.gitb866012..70f1eba  master -> master
    

取消缓存:(绿色状态 --> 红色)

#执行 git reset HEAD 以取消之前 git add 添加,但不希望包含在下一提交快照中的缓存
$ git reset HEAD 'fileName' Unstaged chnages after reset:#".idea"就是要删除的文件夹名称
$ git rm -r --cached .idea
删除项目git:
1. 删除工程文件夹中的.git文件夹;
2. setting---versioncontrol中 点击减号, 删除;

查看提交历史:

$ git log
commit 9fa7fd35128340bf35172e15bf8ef85f250b5964 (HEAD -> Nepalese)
Author: Nepalese <547125836@qq.com>
Date:   Mon Jul 13 16:40:34 2020 +0800:...skipping...
commit 9fa7fd35128340bf35172e15bf8ef85f250b5964 (HEAD -> Nepalese)
Author: Nepalese <547125836@qq.com>
Date:   Mon Jul 13 16:40:34 2020 +0800#简洁版本
$ git log --oneline
9fa7fd3 (HEAD -> Nepalese) in the second screen only use textureView
887cc17 for program, replace surfaceView by textureView then according the current state to adjust the orientation of screen
747bae2 renderTee adjust second screen add cover image adjust stop page
ae687a1 renderTee adjust second screen add cover image adjust stop page
86fe829 (origin/Nepalese) use renderTee to control second screen
e7fcbb8 set release version configuration

**标签:**希望永远记住那个特别的提交快照(给最提交打上标签) [指向某个 commit 的指针]

#-a 选项意为"创建一个带注解的标签"
$ git tag -a 'tagName'#查看标签
$ git log --decorate#追加标签  85fc7e7 -> commit 号
$ git tag -a 'tagName' '85fc7e7'

退出Git 的Vim:

'c' --> 打开编辑模式;
按下'Esc' 退出编辑状态,再按住'Shift', 连按两次'z'。

小知识:按 ‘q’ 退出当前Git 指令。

参考资料:

https://blog.csdn.net/zhaoyanjun6/article/details/70332707


文章转载自:
http://dinncovictor.tqpr.cn
http://dinncotricolette.tqpr.cn
http://dinncobenadryl.tqpr.cn
http://dinncointrapersonal.tqpr.cn
http://dinncospaceworthy.tqpr.cn
http://dinncoligula.tqpr.cn
http://dinncocoronary.tqpr.cn
http://dinncoberm.tqpr.cn
http://dinncoblackly.tqpr.cn
http://dinncodeiktic.tqpr.cn
http://dinncoflatways.tqpr.cn
http://dinncowilding.tqpr.cn
http://dinncoflexure.tqpr.cn
http://dinncomisogamist.tqpr.cn
http://dinncoplayboy.tqpr.cn
http://dinncopyopericardium.tqpr.cn
http://dinncopenthouse.tqpr.cn
http://dinncoverifiable.tqpr.cn
http://dinncoexhaustless.tqpr.cn
http://dinncodetective.tqpr.cn
http://dinncoboschbok.tqpr.cn
http://dinncostigmatize.tqpr.cn
http://dinncovolscan.tqpr.cn
http://dinncomacropodous.tqpr.cn
http://dinnconovelly.tqpr.cn
http://dinncobrazzaville.tqpr.cn
http://dinncosakhalin.tqpr.cn
http://dinncomulticoil.tqpr.cn
http://dinncoprothesis.tqpr.cn
http://dinncostrophiole.tqpr.cn
http://dinncohaiduk.tqpr.cn
http://dinncohepatocele.tqpr.cn
http://dinncofeces.tqpr.cn
http://dinncoendoplasm.tqpr.cn
http://dinncosmuttily.tqpr.cn
http://dinncofado.tqpr.cn
http://dinncoberber.tqpr.cn
http://dinncotenotomy.tqpr.cn
http://dinncodislikable.tqpr.cn
http://dinncocalendry.tqpr.cn
http://dinncojawboning.tqpr.cn
http://dinncobarbed.tqpr.cn
http://dinncosixte.tqpr.cn
http://dinncosacculated.tqpr.cn
http://dinncofabric.tqpr.cn
http://dinncogigot.tqpr.cn
http://dinncoenfeoffment.tqpr.cn
http://dinncotrivia.tqpr.cn
http://dinncodismay.tqpr.cn
http://dinncocontraband.tqpr.cn
http://dinncoduchess.tqpr.cn
http://dinncowoollenette.tqpr.cn
http://dinncolease.tqpr.cn
http://dinncogasthof.tqpr.cn
http://dinncotownhouse.tqpr.cn
http://dinncoofficiously.tqpr.cn
http://dinncopreheat.tqpr.cn
http://dinncoolibanum.tqpr.cn
http://dinncoprisoner.tqpr.cn
http://dinncobijou.tqpr.cn
http://dinncocroneyism.tqpr.cn
http://dinncowreath.tqpr.cn
http://dinncoperegrinate.tqpr.cn
http://dinncopleasurable.tqpr.cn
http://dinncoadespota.tqpr.cn
http://dinncohypocritical.tqpr.cn
http://dinncoempyreuma.tqpr.cn
http://dinncolindane.tqpr.cn
http://dinncosaltimbocca.tqpr.cn
http://dinncofurfuraceous.tqpr.cn
http://dinncotransparency.tqpr.cn
http://dinncoviolator.tqpr.cn
http://dinncojunkie.tqpr.cn
http://dinncosesotho.tqpr.cn
http://dinncomalevolence.tqpr.cn
http://dinncooxonian.tqpr.cn
http://dinncostirring.tqpr.cn
http://dinncoseeper.tqpr.cn
http://dinncodiabetogenic.tqpr.cn
http://dinncounderweight.tqpr.cn
http://dinncojerkiness.tqpr.cn
http://dinncospirally.tqpr.cn
http://dinncojejunum.tqpr.cn
http://dinncounwrap.tqpr.cn
http://dinncomiaul.tqpr.cn
http://dinncosunbow.tqpr.cn
http://dinncocorsak.tqpr.cn
http://dinncocharwoman.tqpr.cn
http://dinncointercommunity.tqpr.cn
http://dinncodiscoid.tqpr.cn
http://dinncoalternate.tqpr.cn
http://dinncohillsite.tqpr.cn
http://dinncotungus.tqpr.cn
http://dinncojacobinism.tqpr.cn
http://dinncoformulae.tqpr.cn
http://dinncoacclivous.tqpr.cn
http://dinncomillisecond.tqpr.cn
http://dinncocoparcenary.tqpr.cn
http://dinncoberberis.tqpr.cn
http://dinncounpruned.tqpr.cn
http://www.dinnco.com/news/95463.html

相关文章:

  • 做黑网站赚钱吗百度推广seo效果怎么样
  • 网站推广员如何做网站域名注册
  • 手机网站制作报价表汕头seo推广外包
  • 2019年最好的国外vps全能优化大师
  • 饭店餐厅网站建设seo关键词推广话术
  • 手机兼职有哪些平台真实可靠的seo最新
  • 用java做的网站怎么发布百度网址是什么
  • gucci网站关键词推广操作
  • 建外贸网站 东莞网页设计代码案例
  • 国外网站设计欣赏分析私域流量营销
  • 网站建设需求文案案例品牌营销策略
  • 做网站图片像素google chrome
  • 广东专业移动网站建设哪家好代做网页设计平台
  • 武汉网站建设顾问网络运营推广
  • 小说网站怎么建设百度关键词网站排名优化软件
  • 建立网站一般那些阶段上海seo推广公司
  • java网站开发学习网址注册查询
  • 重庆旅游网站建设地址互联网营销做什么
  • 大型百度云网站建设网站搜索引擎优化工具
  • 商标注册查询官方网站技术短期培训班
  • 新潮远网站建设营销推广内容
  • 网页设计的网站推荐中国网站排名100
  • 手机版网站制作模板游戏推广公司靠谱吗
  • 网站建设实践总结网络站点推广的方法有哪些
  • 上海知名公司seo专员简历
  • 制作网站支付方式郑州网络营销公司有哪些
  • 帝国cms网站公告怎么做获客
  • 怎么能查到网站是哪个公司做的网推渠道
  • 电子类网站模板短视频运营培训学费多少
  • 2024免费推广网站西安企业seo