Pycharm with SAE git

假设您刚刚创建了应用newapp。

首先,创建一个新的Git仓库并且添加一个Git远程仓库sae,地址为:https://git.sinacloud.com/newapp 。

$ cd newapp
$ git init
$ git remote add sae https://git.sinacloud.com/newapp

上传代码。如部署Git的主分支(master)的代码到SAE服务器上的版本1中:

$ touch index.py
$ git add index.py
$ git commit -m"initial commit"
$ git push sae master:1

从SAE服务器上删除版本1的代码。

$ git push sae :1

以上是git command bash,也就是没有借助pycharm的git
下面讲pycharm里面的git,这样借助IDE可能更快点,英文要好:

先提交到本地

To commit changes to a local repository

  1. Open the Version Control tool window by pressing Alt+9 or choosing View | Tool Windows | Version Control.
  2. In the Local Changes tab, select the files or folders you want to commit.
  3. Open the Commit Changes dialog box by doing one of the following:
    • On the tool window toolbar, click the Commit Changes button Icon.
    • On the main menu, choose VCS | Commit Changes.
    • On the main menu, choose VCS | Git | Commit File.
    • Press Ctrl+K.
  4. The Commit Changes dialog lists all files that have changed since the last commit. Select the check boxes next to the files you want to commit now.
  5. Add a comment in the Commit Message section and select the Before Commit options you want PyCharm to perform on the files before committing them to the local repository.

  6. In the Git section, configure the following settings:
    • Use the Author drop-down list to specify the person who created the changes to be committed.
    • If you want to replace already published commit, select the check box Amend commit, see Git Basics: Undoing Things for details.
  7. Click Commit.

接着向SAE提交(这里master要填写1,即master -> sae:1):

To push changes

  1. On the main menu, choose VCS | Git | Push . The Git Push dialog box opens listing all commits made in the current branch since the last
    push

    .

  2. Select the commit to push. The right-hand pane shows the changes included in the selected commit. Use the toolbar buttons to examine the commit details.
  3. Select which files you want to upload. To select all files, click the Select All toolbar button svnSelectAll.png or press Ctrl+A.
  4. Specify the target remote branch to push the changes to. If you want to upload the current branch to an alternative branch, rather than its tracked branch, click the branch name to edit it (note that completion is available for branch names).You can also click the Edit all targets link in the bottom right corner to edit all branch names simultaneously.
  5. Click the Push button, when ready. PyCharm starts the upload.
  6. If
    push

    is rejected due to lack of synchronization, update the local branch in one of the following ways:

One thought on “Pycharm with SAE git

  1. Cialis 20 Efficacite Viagra Listino Prezzi Comprar Levitra Generico Foros Donde Comprar Viagra Remanso De Propecia Achat Finasteride Propecia viagra Resultados De Propecia Venta De Viagra En Gibraltar Buy Xenical America Cephalexin For Poison Ivy Levitra Sin Agua

发表评论