zoukankan      html  css  js  c++  java
  • 项目上传至Github

    https://github.com/ 注册用户,然后点 Start a project,创建仓库

     

    记住这个 地址。

    再去 https://git-scm.com/downloads 下载git 安装到本地,(安装时最好选择修改PATH)

    例如我的C盘下有个项目叫 MyDemo,右击MyDemo,选择 “Git Bash Here”

    1.      git init       建立Git仓库(该目录下会多出个".git"的隐藏目录)

    2.      git add .   添加当前目录中的所有文件到索引中(add+空格+点)

    3.      git commit -m "first commit"  确认加信息

    4.      git remote add origin https://github.com/likehc/Test.git       关联地址

    5.      git pull origin master        拉取防冲突

    6.      git push -u origin master 推送

     

     

    (过程中会让你输入github的用户名与密码)

     

    上传成功后 如上图片所示。

    VS如何与这个代码同步呢

    VS安装GitSccProvider.vsix,PC上安装GitExtensions

     

     

    例如,我想 把项目下载到E盘的MyProjects 目录下

    可以在命令提示符进入E:MyProjects ,然后

     git clone https://github.com/likehc/Test.git 下载到本地

     

    PS:每次push时,总会要用户名与密码,可以输入

    git config --global credential.helper store

    会修改 当前用户下的.gitconfig,加入

    [credential]

             helper = store

  • 相关阅读:
    debian修改crontab默认编辑器为vim
    正确用DD测试磁盘读写速度
    西数WD2T硬盘分区对齐的方法
    优化UITableView
    登录功能验证处理
    登录注册界面
    navigationbar
    tab bar controller
    ios之coretext
    ios之coredata
  • 原文地址:https://www.cnblogs.com/likehc/p/8270126.html
Copyright © 2011-2022 走看看