惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - 卡车司机

macOS系统下修改hosts文件,安装homebrew & nvm How to see log files in MySQL? git 设置和取消代理 使用本地下载和管理的免费 Windows 10 虚拟机测试 IE11 和旧版 Microsoft Edge 在Microsoft SQL SERVER Management Studio下如何完整输出NVARCHAR(MAX)字段或变量的内容 windows 10 x64系统下在vmware workstation pro 15安装macOS 10.15 Catelina, 并设置分辨率为3840x2160 群晖NAS(Synology NAS)环境下安装GitLab, 并在Windows 10环境下使用Git windows 10 专业版安装VMware虚拟机碰到的坑 PDF.js实现个性化PDF渲染(文本复制) Java平台下利用aspose转word为PDF实现文档在线预览 Razor Page Library:开发独立通用RPL(内嵌wwwroot资源文件夹) 杂记 Code First Migrations in Team Environments SQL Server UPDATE JOIN visual studio 使用正则表达式实现代码批量查找和替换 AngularJs - Calling Directive Method from Controller Entity Framework Power Tools 执行数据库反向工程时报错.... SVN-无法查看log,提示Want to go offline,时间显示1970问题 windows server安装dotnet-sdk-2.2.108-win-x64.exe时报dll找不到
在Windows 10系统下将Git项目签出到磁盘分区根目录的方法
卡车司机 · 2020-04-09 · via 博客园 - 卡车司机

2020-04-09 15:29  卡车司机  阅读(313)  评论()    收藏  举报

我有一个特别的需求, 想把一个git项目签出到磁盘分区的根目录, 有什么作用? 好像没什么特别的作用...

如果直接在磁盘分区根目录下执行以下命令会报错, 即使你的磁盘分区上什么也没有(其实是有的, 是windows的系统文件, 这些是隐藏文件), 仍旧会报: fatal: destination path ‘.’ git clone already exists and is not an empty directory

git clone ssh://git@gitlab.mydomain.com:30001/root/myproject.git .

上面这个命令的最后有一个小数点, 如果不输入这个小数点, 那么git项目会被克隆到myproject目录下, 这个需要特别注意.

如何解决这个问题呢? 早就有高手为我提供了解决方法. 在根目录下执行以下命令即可

git init

git remote add origin ssh://git@gitlab.mydomain.com:30001/root/myproject.git

git fetch

git branch master origin/master

git checkout master

参考:

1. http://blog.sina.com.cn/s/blog_6b1ed4fb0101ixa3.html