git 本地存在的工程上传到指定仓库

来源:互联网 发布:淘宝信用卡付款手续费 编辑:程序博客网 时间:2024/06/15 18:27
1.新的代码cd existing-projectgit initgit add --allgit commit -m "Initial Commit"git remote add origin ssh://git@stash1.wtvdev.com:7999/tvclien/wasup2p.gitgit push origin master
2.被git跟踪过的代码,重置远程仓库urlcd existing-projectgit remote set-url origin ssh://git@stash1.wtvdev.com:7999/tvclien/wasup2p.gitgit push origin master3.从另外一个分支抓取一个commitgit cherry-pick commitid例如:git cherry-pick a3dd504a06d188f4b87e5d0f84c869f10501013b




                                             
0 0