【Git】【1】简单介绍
前言:
Git:资源管理,版本控制;其实我之前用的是SVN,据说是不好管理分支,不过我做的项目参与人数不多,所以SVN其实是够用的
Git客户端:下载地址:https://git-scm.com/downloads,默认安装即可。
安装完成后,在开始菜单里找到“Git”->“Git Bash”,蹦出一个类似命令行窗口的东西,就说明Git安装成功。
还需要配置:
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
TortoiseGit工具:安装后,可以直接在文件夹进行管理,不需要用命令行形式管理了。代码clone下来后,其他基础操作我是在IDEA内做的
链接:https://pan.baidu.com/s/1tvoqybeNISXbbohSQ7gYdA
提取码:7dqi
Git命令:
lenovo@LAPTOP-LG72BB3R MINGW64 / $ git usage: git [--version] [--help] [-C <path>] [-c name=value] [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path] [-p | --paginate | --no-pager] [--no-replace-objects] [--bare] [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>] <command> [<args>] These are common Git commands used in various situations: start a working area (see also: git help tutorial) clone Clone a repository into a new directory init Create an empty Git repository or reinitialize an existing one work on the current change (see also: git help everyday) add Add file contents to the index mv Move or rename a file, a directory, or a symlink reset Reset current HEAD to the specified state rm Remove files from the working tree and from the index examine the history and state (see also: git help revisions) bisect Use binary search to find the commit that introduced a bug grep Print lines matching a pattern log Show commit logs show Show various types of objects status Show the working tree status grow, mark and tweak your common history branch List, create, or delete branches checkout Switch branches or restore working tree files commit Record changes to the repository diff Show changes between commits, commit and working tree, etc merge Join two or more development histories together rebase Reapply commits on top of another base tip tag Create, list, delete or verify a tag object signed with GPG collaborate (see also: git help workflows) fetch Download objects and refs from another repository pull Fetch from and integrate with another repository or a local branch push Update remote refs along with associated objects 'git help -a' and 'git help -g' list available subcommands and some concept guides. See 'git help <command>' or 'git help <concept>' to read about a specific subcommand or concept. lenovo@LAPTOP-LG72BB3R MINGW64 / $ pwd / lenovo@LAPTOP-LG72BB3R MINGW64 / $ ls bin/ cmd/ dev/ etc/ git-bash.exe* git-cmd.exe* LICENSE.txt mingw64/ proc/ ReleaseNotes.html tmp/ unins000.dat unins000.exe* unins000.msg usr/ lenovo@LAPTOP-LG72BB3R MINGW64 / $
参考博客:
Git教程 - 廖雪峰的官方网站
https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
Git学习系列之Windows上安装Git详细步骤(图文详解) - 大数据和AI躺过的坑 - 博客园
https://www.cnblogs.com/zlslch/p/7985285.html