zoukankan      html  css  js  c++  java
  • SAE如何使用Git

    了解Git及远程git仓库

    请先看博文《Git入门及上传项目到github中》,弄懂了之后我相信我下面说的就相当于废话了。

    SAE的git远程仓库就相当于github。

    向SAE的远程仓库上传文件

    1、进入到本地仓库,如进入到Demo,并将要上传的代码复制到本目录

    2、进入到SAE的某个项目代码管理,找到git仓库地址

    3、在Demo目录下右键点击"Git Bash Here"进入git终端,如果再Demo的目录结构后没有显示"(master)"则要运行下列命令初始化仓库

    git init#若有显示"(master)"则不用运行此命令

    4、获取远程仓库连接,运行命令

    $ git remote add sae https://git.sinacloud.com/$appname #其中$appname要换成你的app的名字https://git.sinacloud.com/$appname就是你的git仓库地址,如https://git.sinacloud.com/demo

    5、提交文件到sae仓库

    $ git add . #提交Demo目录下所有文件

    $ git commit -am "这是注释哦"

    6、命名版本

    $ git push sae master:1 #将此次上传的代码命名为版本1

    7、一会后出现"Username for 'https://git.sinacloud.com':",在冒号后输入SAE的安全邮箱(不是新浪微博的登陆邮箱)

    8、出现"Password for 'https://oldinaction@qq.com@git.sinacloud.com':",在冒号后输入SAE安全密码(是看不到输入的哦),确认正确后回车,不要再动了,以免上传中断。

    9、看到上传代码出现"Writing objects: 100%" ,则表示上传成功。

    10、现在就可以通过该项目的网址测试了




  • 相关阅读:
    python 代码片段8
    python 代码片段7
    python 代码片段6
    python 代码片段5
    python 代码片段4
    django 代码片段3
    python 代码片段2
    Redis事物
    Redis的java客户端jedis
    Redis五大数据类型
  • 原文地址:https://www.cnblogs.com/oldinaction/p/5167454.html
Copyright © 2011-2022 走看看