- Git教程
- Linux命令大全——GIT命令
- 如要进入F:/Git/learngit, 在git bash中用cd /f/git/learngit. 删除learngit目录,用rm -r learngit,参考linux rm命令。关于cd命令。
touch a.txt
新建文件。 - linux命令大全
- Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools. See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with
man gittutorial
orgit help tutorial
, and the documentation of each command withman git-<commandname>
orgit help <commandname>
or<commandname> --help
. You can also download the git master .zip file - git log, 按q退出。
- 删除本地git中的repository,直接在本地删除文件夹。在GitHub上删除repository,先打开该repository,如下图,点开settings,拉倒最下面,找到delete。
- vi编辑文件内容,参考linux vi命令。eg:
vi readme.txt
. 按a进入insert状态,编辑完成后,按ESC键 跳到命令模式,然后:
:w 保存文件但不退出vi
:w file 将修改另外保存到file中,不退出vi
:w! 强制保存,不推出vi
:wq 保存文件并退出vi
:wq! 强制保存文件,并退出vi
q: 不保存文件,退出vi
:q! 不保存文件,强制退出vi
:e! 放弃所有修改,从上次保存文件开始再编辑。 - 创建仓库用init或clone。下面列举出了init的三种方式:
使用git clone http://myrepo.xxx.com/project/.git
只能克隆master分支,要clone其他分支,使用git checkout -b dev origin/dev
,得到并转到dev分支。如果只想clone dev分支,不需要master,可以使用git clone -b dev origin
。 - 10.
Git & GitHub
最新推荐文章于 2022-12-16 16:12:18 发布