Github: 从github上拉取别人的源码,并推送到自己的github仓库
生活随笔
收集整理的這篇文章主要介紹了
Github: 从github上拉取别人的源码,并推送到自己的github仓库
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
比如說,將https://github.com/lizhenliang/tomcat-java-demo 遷移到 https://github.com/lousia001/tomcat-java-demo
步驟如下:
#從https://github.com/lizhenliang/tomcat-java-demo拉取代碼
[root@192 ~]# git clone https://github.com/lizhenliang/tomcat-java-demo Cloning into 'tomcat-java-demo'... remote: Enumerating objects: 229, done. remote: Counting objects: 100% (229/229), done. remote: Compressing objects: 100% (205/205), done. remote: Total 229 (delta 25), reused 180 (delta 5), pack-reused 0 Receiving objects: 100% (229/229), 4.52 MiB | 46.00 KiB/s, done. Resolving deltas: 100% (25/25), done. [root@192 ~]# ls anaconda-ks.cfg tomcat-java-demo tomcat-java-demo.bak [root@192 ~]# cd tomcat-java-demo [root@192 tomcat-java-demo]# ls doc Dockerfile LICENSE pom.xml README.md src
# 修改隱藏的 .git/config文件,替換掉一樣
[root@192 tomcat-java-demo]# vi .git/config
[root@192 tomcat-java-demo]# git remote add origin https://github.com/lousia001/tomcat-java-demo.git [root@192 tomcat-java-demo]# git push -u origin master Username for 'https://github.com': lousia001 Password for 'https://lousia001@github.com': Counting objects: 229, done. Compressing objects: 100% (185/185), done. Writing objects: 100% (229/229), 4.52 MiB | 1.32 MiB/s, done. Total 229 (delta 25), reused 229 (delta 25) remote: Resolving deltas: 100% (25/25), done. To https://github.com/lousia001/tomcat-java-demo * [new branch] master -> master Branch master set up to track remote branch master from origin.
到此, 代碼遷移成功。
作者:梅梅~
出處:https://www.cnblogs.com/keeptesting
關于作者:專注軟件測試,測試運維相關工作,請多多賜教!
本文版權歸作者和博客園共有,歡迎轉載,但未經作者同意必須保留此段聲明,且在文章頁面明顯位置給出,原文鏈接歡迎溝通交流加微信聯系。 微信:yangguangkg20140901 暗號:博客園.
總結
以上是生活随笔為你收集整理的Github: 从github上拉取别人的源码,并推送到自己的github仓库的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Ubuntu-Docker】ubunt
- 下一篇: 【人脸对齐-Landmarks】人脸关键