github 上传代码并且提交和维护

    xiaoxiao2024-04-18  5

    1.首先注册github帐号,不用多说了把,

    网址:https://github.com/

    2.进入你要上传的代码库,添加git仓库,注意所有上传和维护的工作都是使用命令来完成的。

     

    git init git add . git commit -m "注释" 3.去自己github帐号上创建自己的 Repository :

    点击 Create repository 按钮 新建完成,

    4.进入自己项目Repository 的仓库的 https地址:

    5.重点来了,将本地仓库关联到github上:

    git remote add origin https://github.com/yusheng-jia/GithubTest

    6.上传之前,pull下远程代码:

     

    git pull origin master

    7.上传代码: git push -u origin master 然后让你输入username 和 password ,没有问题的话就可以正常上传了。

    8.关于代码的维护:

    如果我们修改了代码,执行以下命令来提交:

    git add xxx git commit -m "注释" git push -u origin master 就可以了。

    谢谢

    转载请注明原文地址: https://ju.6miu.com/read-1288122.html
    最新回复(0)