这将把您的当前工作目录更改为`/path/to/parent/directory`。 3. 使用`mkdir`命令创建新文件夹。例如: “`bash mkdir new_folder “` 这将在当前工作目录中创建名为`new_folder`的新文件夹。 4. 您可以使用`ls`命令查看新文件夹是否已成功创建: “`bash ls “` 这将列出当前工作目录中的所有文件和文件夹...
git commit -m “Add new directory” “` 现在,你已经成功地在Git中创建了一个新的目录,并将其添加到版本控制中。 另外,如果你想在创建目录的同时添加一些文件,可以使用touch命令创建一个空白文件,然后使用git add命令将其添加到版本控制中。例如: “` touch new_directory/file.txt git add new_directory/fi...
git add newfile.txt# 添加文件到暂存区git status# 查看状态,显示 newfile.txt 已暂存 已提交(Committed): 使用git commit命令将暂存区的更改提交到本地仓库后,这些更改被记录下来,文件状态返回为已跟踪状态。 git commit-m"Added newfile.txt"# 提交更改git status# 查看状态,工作目录干净 ...
(use"git add/rm <file>..."to update what will be committed) (use"git restore <file>..."to discard changesinworking directory) deleted: test.txt no changes added to commit (use"git add"and/or"git commit -a") 我们可以使用提交这次修改: $ git add test.txt $ git commit -m"de...
使用add命令将新建的文件加入到暂存区--->Staged 使用commit命令将暂存区的文件提交到本地仓库--->Unmodified 如果对Unmodified状态的文件进行修改---> modified 如果对Unmodified状态的文件进行remove操作--->Untracked 四个工作区域 Git本地有四个工作区域:工作目录(Working Directory)、暂存区(Stage/Index)、资源库...
new file: README Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: CONTRIBUTING.md 文件CONTRIBUTING.md出现在Changes not staged for commit这行下面,说明已跟踪文件...
$ git add Documentation/\*.txt Note that the asterisk*is quoted from the shell in this example; this lets the command include the files from subdirectories ofDocumentation/directory. Considers adding content from allgit-*.shscripts: $ git add git-*.sh ...
COPYING Update COPYING with GPLv2 with new FSF address Jan 18, 2010 GIT-BUILD-OPTIONS.in GIT-BUILD-OPTIONS: propagate project's source directory Feb 19, 2025 GIT-VERSION-FILE.in Makefile: refactor GIT-VERSION-GEN to be reusable Dec 7, 2024 ...
1、点击右上角头像的下拉菜单,点击“Your repositories”,进去之后点击“New”按钮新建仓库。 Repository name是仓库的名字, Description是该仓库的描述(可以不填), Public表示所有人都能看到该仓库,Private表示只有自己可以看到, Add a README file:如果勾选了这个选项,那么它就代表着GitHub会自动初始化仓库并且设置RE...
directory:本地目录。 比如,要克隆 Ruby 语言的 Git 代码仓库 Grit,可以用下面的命令: $ git clone git://github.com/schacon/grit.git 执行该命令后,会在当前目录下创建一个名为grit的目录,其中包含一个 .git 的目录,用于保存下载下来的所有版本记录。