使用git上传github代码

    xiaoxiao2023-10-18  161

    第一次使用git上传github的代码,记录一下使用步骤。

    1.找到自己代码根目录,右键点击Git Bash here

    2,git init

    3.git status

    4.git cheakout -b **                                               //**为自己的命名分支

    5.git add .

    6.git commit -m "记录的代码版本笔记"

    7.git remote add origin https://github.com/......         // 输入要增加分支的github项目

    8.git fetch origin                                               //先同步远程的项目代码

    9.git checkout master                                     //先把master里面的代码合并过来

    10. git pull origin master:master

    11.git checkout **                                        //切回到自己新建的分支

    12.git merge master --allow-unrelaterd-histories                                  //将master中的代码合并过来

    13.把出现的conflict都解决

    14.git push origin linbin:linbin

    最新回复(0)