当前位置:   article > 正文

利用pycharm将代码pash推送到远程gitlab_pycharm 写了新的代码,想推到远程master

pycharm 写了新的代码,想推到远程master

目录

方法 一

  1. 新建 gitlab项目haha
    在这里插入图片描述

简略步骤:

(base) E:\09-code\02-wind_profile>git remote add origin http://12.36.171.165/zhaoxiaozheng/haha.git
(base) E:\09-code\02-wind_profile>git push -u origin master
  • 1
  • 2

复杂过程:

(base) E:\09-code\02-wind_profile>git remote add origin http://12.36.171.165/zhaoxiaozheng/haha.git
error: remote origin already exists.

(base) E:\09-code\02-wind_profile>git remote -v
origin  http://12.36.171.165/zhaoxiaozheng/wind_profile_cluster.git (fetch)
origin  http://12.36.171.165/zhaoxiaozheng/wind_profile_cluster.git (push)
orign   http://12.36.171.165/zhaoxiaozheng/test.git (fetch)
orign   http://12.36.171.165/zhaoxiaozheng/test.git (push)

(base) E:\09-code\02-wind_profile>git remote rm origin

(base) E:\09-code\02-wind_profile>git remote rm orign
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
(base) E:\09-code\02-wind_profile>git remote -v
origin  http://12.36.171.165/zhaoxiaozheng/haha.git (fetch)
origin  http://12.36.171.165/zhaoxiaozheng/haha.git (push)

(base) E:\09-code\02-wind_profile>git push -u origin master
Enumerating objects: 1239, done.
Counting objects: 100% (1239/1239), done.
Delta compression using up to 8 threads
Compressing objects: 100% (1214/1214), done.
Writing objects: 100% (1239/1239), 12.70 MiB | 2.75 MiB/s, done.
Total 1239 (delta 151), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (151/151), done.
To http://10.35.161.175/zhaoxiaozheng/haha.git
 * [new branch]      master -> master
branch 'master' set up to track 'origin/master'.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

在这里插入图片描述
push 成功!!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/470089
推荐阅读
相关标签
  

闽ICP备14008679号