Car*_*rum 69
要复制文件夹:
$ git checkout work
Switched to branch 'work'
$ git checkout master -- utils
$ git add utils
$ git commit -m "Adding 'utils' directory from 'master' branch."
[work 9fcd968] Adding 'utils' directory from 'master' branch.
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 utils/file
Run Code Online (Sandbox Code Playgroud)
如果你想在master之后删除它:
$ git checkout master
Switched to branch 'master'
$ git rm -r utils
rm 'utils/file'
$ git commit -m "Removing 'utils' directory."
[master c786f95] Removing 'utils' directory.
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 utils/file
Run Code Online (Sandbox Code Playgroud)
然后你可以git push根据需要.Git在您项目中的输出可能会有所不同; 我刚刚在这里做了一个简单的测试回购,utils目录中只有一个文件.
| 归档时间: |
|
| 查看次数: |
24711 次 |
| 最近记录: |