Git mv重命名存储库中的文件或目录。如何重命名Git存储库本身?
当前回答
“重命名git存储库本身”的含义不明确,但有一种解释是更改远程git存储库的URL。
git remote set-url origin url
https://www.commands.dev/workflows/change_url_of_remote_git_repository
我收藏^页,它告诉我命令,并允许我玩周围的参数。超级有用,我觉得。
其他回答
这是一个非常简单的解决方案,尽管有些人可能会认为它“不优雅”或“黑客”,它掩盖了我的git不专业。
Verify that your local repo has everything committed and pushed (to remote origin). Go to the website of the remote host (for example, https://github.com/User/project-original-name). Follow the host's instructions to rename the repo (will differ from host to host, but usually Settings is a good starting point). (For the purposes of this guide, suppose you renamed your repo to "project-new-name".) Locally remove your whole repo (e.g., rm -r project-original-name). Do a "fresh checkout": git clone https://github.com/User/project-new-name
注意:如果回购的另一个用户不遵循这些说明,只是在未来进行拉取,我不知道这会产生什么影响。
@Parison
Server Side: mv oldName.git newName.git
Client Side: ./.git/config change [remote "origin"] | url to newName.git
“重命名git存储库本身”的含义不明确,但有一种解释是更改远程git存储库的URL。
git remote set-url origin url
https://www.commands.dev/workflows/change_url_of_remote_git_repository
我收藏^页,它告诉我命令,并允许我玩周围的参数。超级有用,我觉得。
简单来说,只需删除Eclipse项目(不要选择磁盘上的内容),然后重新导入该项目。
Eclipse将识别连接到Git的项目,并将其放入Git透视图中。
这招很管用。
主要更改的名称是这里(img 1),也更改readme。Md (img 2)
推荐文章
- 为什么我需要显式地推一个新分支?
- 如何撤消最后的git添加?
- Rubymine:如何让Git忽略Rubymine创建的.idea文件
- Gitignore二进制文件,没有扩展名
- Git隐藏错误:Git隐藏弹出并最终与合并冲突
- 了解Git和GitHub的基础知识
- 没有。Git目录的Git克隆
- Git与Mercurial仓库的互操作性
- 忽略git中修改(但未提交)的文件?
- “git restore”命令是什么?“git restore”和“git reset”之间有什么区别?
- Git合并与强制覆盖
- Git拉另一个分支
- 在Bash命令提示符上添加git分支
- 如何更改Git日志日期格式
- git pull -rebase和git pull -ff-only之间的区别