AngularJs/GitHub :如何在没有任何历史记录的情况下将角度种子克隆到我的新项目中
AngularJs/GitHub : How do i clone angular-seed to my new project without any history?
我已经按照以下文档中的步骤从angular-seed github页面创建了一个新项目,并将我的项目作为https://github.com/selvaonline/StickyTodos
推送到github,但我仍然看到了旧的远程angular-seed的历史和贡献者的历史。我已经完成了不浅的旧克隆存储库,但我仍然得到了旧的历史。
从我关注的角种子文档中...如果你只是想要 在没有角度种子提交历史记录的情况下启动一个新项目,然后 你可以做:
git 克隆 --深度=1 https://github.com/angular/angular-seed.git depth=1 告诉 git 只下拉一个提交 值得的历史数据。
创建 github 项目所涉及的步骤
步骤 1:将角度种子克隆到我的本地存储库
C:'Projects'StickyTodos>git clone --depth=1 https://github.com/angular/angular-seed.git
我已经创建了 ssh 密钥并添加到我的 github 帐户中。 然后我按照以下步骤操作。
Selva@SelvaOnline MINGW64 ~/.ssh
$ ssh-add git_rsa
Identity added: git_rsa (git_rsa)
Selva@SelvaOnline MINGW64 ~/.ssh
$ ssh -T git@github.com
Warning: Permanently added the RSA host key for IP address '192.XX.XXX.XXX' to the list of known hosts.
Hi selvaonline/StickyTodos! You've successfully authenticated, but GitHub does not provide shell access.
Selva@SelvaOnline MINGW64 /c/projects/StickyTodos (master)
$ git remote set-url origin https://github.com/selvaonline/StickyTodos.git
Selva@SelvaOnline MINGW64 /c/projects/StickyTodos (master)
$ git remote add old https://github.com/angular/angular-seed.git
Selva@SelvaOnline MINGW64 /c/projects/StickyTodos (master)
$ git fetch --unshallow old
remote: Counting objects: 2555, done.
remote: Compressing objects: 100% (983/983), done.
remote: Total 25Receiving objects55 (de: lt 99% (a 14254129), reused 25/229 (555), delta 111.7403), 7 paMiB ck| 340.00-reu Ksed iB0[K
Receiving objects: 100% (2555/2555), 11.91 MiB | 340.00 KiB/s, done.
Resolving deltas: 100% (1429/1429), completed with 14 local objects.
From https://github.com/angular/angular-seed
* [new branch] master -> old/master
* [new branch] move-bower -> old/move-bower
* [new branch] v0.10.x -> old/v0.10.x
$ git remote set-url origin https://github.com/selvaonline/StickyTodos.git
Selva@SelvaOnline MINGW64 /c/projects/StickyTodos (master)
$ git add .
Selva@SelvaOnline MINGW64 /c/projects/StickyTodos (master)
$ git commit -m "First Commit"
[master a4667c4] First Commit
1 file changed, 1 deletion(-)
delete mode 160000 angular-seed
Selva@SelvaOnline MINGW64 /c/projects/StickyTodos (master)
$ git push origin
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Counting objects: 2590, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (994/994), done.
Writing objects: 100% (2590/2590), 11.92 MiB | 606.00 KiB/s, done.
Total 2590 (delta 1438), reused 2558 (delta 1424)
To https://github.com/selvaonline/StickyTodos.git
* [new branch] master -> master
所以我有我的角度种子克隆本地存储库,它已被推送到 github 远程存储库。你能给我最好的解决方案是什么,从我的项目中删除角种子的历史记录?
angular-seed github文档页面上的角度语法存在问题。
git 克隆 --depth=1 https://github.com/angular/angular-seed.git(根据文档)
git 克隆 --深度 1 https://github.com/angular/angular-seed.git(语法正确)
感谢@Jeff奥里埃玛(http://jdauriemma.com/)
- 如何在未直接触发的情况下停止事件
- 在不使用JQuery的情况下隐藏DOM中的选定元素
- 在不使用jquery的情况下查找页面中的所有锚点并附加函数
- 在不打开聊天屏幕的情况下制作Zopim-ding代理
- 在不阻止默认行为的情况下检测IE10中的缩放
- 如何在不传递此信息的情况下查找被调用的元素
- 如何在不刷新页面的情况下更新显示框
- 有没有一种方法可以在控制台关闭的情况下让console.log()在IE中记录消息
- JavaScript-在手机上不工作的情况下,在外部单击时隐藏元素
- 在我的情况下,如何进行http请求
- 在不知道深度或父属性的情况下从对象中删除属性
- 在不破坏未定义函数的情况下,对多个视图使用单个js文件
- ROR:如何在不重新加载浏览器的情况下从控制器获取参数
- 如何在不影响其他元素的情况下扩展DIV
- 如何在内联依赖项并将图像转换为dataURI的情况下完全提取网页
- 在不移动内部文本的情况下缩放元素的效果
- 在不设置协议的情况下,使用javascript/jquery更改iframe-src
- 默认情况下折叠和展开嵌套列表
- 如何在不单击javascript中的按钮的情况下触发事件
- AngularJs/GitHub :如何在没有任何历史记录的情况下将角度种子克隆到我的新项目中