Eric Tu
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
Learn Doctrine === # GUIDE http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/getting-started.html This guide covers getting started with the Doctrine ORM. After working through the guide you should know: How to install and configure Doctrine by connecting it to a database Mapping PHP objects to database tables Generating a database schema from PHP objects Using the EntityManager to insert, update, delete and find objects in the database. # install PHP Composer http://idroot.net/tutorials/how-to-install-php-composer-on-centos-7/ http://www.jianshu.com/p/4f1df61179e6 ```bash= [eric_tu@localhost ~]$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" [eric_tu@localhost ~]$ php composer-setup.php --install-dir=/usr/bin --filename=composer All settings correct for using Composer The installation directory "/usr/bin" is not writable [eric_tu@localhost ~]$ sudo php composer-setup.php --install-dir=/usr/bin --filename=composer [sudo] password for eric_tu: All settings correct for using Composer Downloading... Composer (version 1.4.1) successfully installed to: /usr/bin/composer Use it: php /usr/bin/composer [eric_tu@localhost ~]$ php -r "unlink('composer-setup.php');" [eric_tu@localhost ~]$ composer -v ... ``` # [Doctrine & Symfony](http://www.newlifeclan.com/symfony/archives/491) https://symfony.com/pdf/Symfony_book_2.8.pdf http://symfony.com/blog/introducing-the-symfony-doctrine-book Project Setup ``` [eric_tu@localhost ~]$ mkdir DoctrineToutorial [eric_tu@localhost ~]$ cd DoctrineToutorial/ ``` ```bash= [eric_tu@localhost DoctrineToutorial]$ vim composer.json 1 { - 2 "require": { - 3 "doctrine/orm": "2.4.*", - 4 "symfony//yaml": "2.*" | 5 }, - 6 "autoload": { - 7 "psr-0": {"": "src/"} 2 8 } 9 } ``` ```bash= [eric_tu@localhost DoctrineToutorial]$ composer install Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 13 installs, 0 updates, 0 removals - Installing symfony/polyfill-mbstring (v1.3.0): Downloading (100%) - Installing psr/log (1.0.2): Downloading (100%) - Installing symfony/debug (v2.8.20): Downloading (100%) - Installing symfony/console (v2.8.20): Downloading (100%) - Installing doctrine/lexer (v1.0.1): Downloading (100%) - Installing doctrine/inflector (v1.1.0): Downloading (100%) - Installing doctrine/collections (v1.3.0): Downloading (100%) - Installing doctrine/cache (v1.5.4): Downloading (100%) - Installing doctrine/annotations (v1.2.7): Downloading (100%) - Installing doctrine/common (v2.5.3): Downloading (100%) - Installing doctrine/dbal (v2.5.12): Downloading (100%) - Installing doctrine/orm (v2.4.8): Downloading (100%) - Installing symfony/yaml (v2.8.20): Downloading (100%) symfony/polyfill-mbstring suggests installing ext-mbstring (For best performance) symfony/console suggests installing symfony/event-dispatcher () symfony/console suggests installing symfony/process () Writing lock file Generating autoload files [eric_tu@localhost DoctrineToutorial]$ ``` Add the following directories: ```bash= [eric_tu@localhost DoctrineToutorial]$ mkdir config;mkdir src; cd config; mkdir xml; mkdir yaml ``` # Obtaining the EntityManager¶ Doctrine’s public interface is the EntityManager, it provides the access point to the complete lifecycle management of your entities and transforms entities from and back to persistence. You have to configure and create it to use your entities with Doctrine 2. I will show the configuration steps and then discuss them step by step: ```php= <?php // bootstrap.php use Doctrine\ORM\Tools\Setup; use Doctrine\ORM\EntityManager; require_once "vendor/autoload.php"; // Create a simple "default" Doctrine ORM configuration for Annotations $isDevMode = true; $config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), $isDevMode); // or if you prefer yaml or XML //$config = Setup::createXMLMetadataConfiguration(array(__DIR__."/config/xml"), $isDevMode); //$config = Setup::createYAMLMetadataConfiguration(array(__DIR__."/config/yaml"), $isDevMode); // database configuration parameters $conn = array( 'driver' => 'pdo_sqlite', 'path' => __DIR__ . '/db.sqlite', ); // obtaining the entity manager $entityManager = EntityManager::create($conn, $config); ``` 啟動doctrine時失敗 ```bash= [eric_tu@localhost DoctrineToutorial]$ php vendor/bin/doctrine PHP Fatal error: Call to undefined function GetEntityManager() in /home/eric_tu/DoctrineToutorial/config/cli-config.php on line 9 ``` 解決辦法 ```php= 1 <?php 2 3 // config/cli-config.php 4 //use Doctrine\ORM\Tools\Console\ConsoleRunner; 5 6 // replace with file to your own project bootstrap 7 require_once 'bootstrap.php'; 8 9 // replace with mechanism to retrieve EntityManager in your app 10 //$entityManager = GetEntityManager(); 11 12 13 //return ConsoleRunner::createHelperSet($entityManager); 14 return \Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet($entityManager); 15 ``` # File mapping drivers must have a valid directory path, however the given path [/path] seems to be incorrect! ```bash= [eric_tu@localhost DoctrineToutorial]$ vendor/bin/doctrine orm:schema-tool:create [Doctrine\Common\Persistence\Mapping\MappingException] File mapping drivers must have a valid directory path, however the given path [/path] seems to be incorrect! orm:schema-tool:create [--dump-sql] ``` 解決方法 http://stackoverflow.com/questions/18771107/how-to-configure-doctrine-file-mapping-driver-in-zf2 新增一個空的資料夾給他存放實體資料 ``` 6 down vote I had exactly the same problem. I solved it by creating an empty Entity directory in the location where doctrine expect me to store my entities. All you have to do is create in following location an empty Entity directory: __DIR__ . '/../src/Realez/Entity'. ``` You can easily recreate the database: ```bash= $ vendor/bin/doctrine orm:schema-tool:drop --force $ vendor/bin/doctrine orm:schema-tool:create ``` Or use the update functionality: ```bash= $ vendor/bin/doctrine orm:schema-tool:update --force ``` http://stackoverflow.com/questions/17473225/doctrine2-no-metadata-classes-to-process ```bash= [eric_tu@localhost DoctrineToutorial]$ vendor/bin/doctrine orm:schema-tool:update --force --dump-sql No Metadata Classes to process. ``` # Generating the Database Schema --- # 使用symfony 學習doctrine http://symfony.com/doc/current/doctrine.html 設定 app/config/parameters.yml 設定 app/config/config.php run ```bash= php bin/console doctrine:database:create``` ```bash= [eric_tu@localhost MyProject]$ php bin/console doctrine:database:create Created database `test_project` for connection named default ``` 可以透過 generate 做設定 ```bash= [eric_tu@localhost MyProject]$ php bin/console doctrine:generate:entity Welcome to the Doctrine2 entity generator This command helps you generate Doctrine2 entities. First, you need to give the entity name you want to generate. You must use the shortcut notation like AcmeBlogBundle:Post. The Entity shortcut name: ``` 也可以手動產生 使用metadata的格式 要注意的是一個bundle裡面只能吃一個metadate 不能同時放YAML XML annotations 如果省略tabel name 的話 就會自動使用Class Name 代替 You'll provide this mapping information in the form of "metadata", a collection of rules that tells Doctrine exactly how the Product class and its properties should be mapped to a specific database table. This metadata can be specified in a number of different formats, including YAML, XML or directly inside the Product class via DocBlock annotations: ```php= // src/AppBundle/Entity/Product.php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity * @ORM\Table(name="product") */ class Product { /** * @ORM\Column(type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\Column(type="string", length=100) */ private $name; /** * @ORM\Column(type="decimal", scale=2) */ private $price; /** * @ORM\Column(type="text") */ private $description; } ``` ```bash= [eric_tu@localhost MyProject]$ php bin/console doctrine:schema:validate [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5BAppBundle%5CEntity%5CProduct%24id%40%5BAnnot%5D%5D%5B1%5D" (array) {"key":"%5BAppBundle%5CEntity%5CProduct%24id%40%5BAnnot%5D%5D%5B1%5D","type":"array","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/E/6/U4H0BHL2EQ88g3YmK+ph): No such file or directory at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5B%5BC%5DAppBundle%5CEntity%5CProduct%24id%40%5BAnnot%5D%5D%5B1%5D" (integer) {"key":"%5B%5BC%5DAppBundle%5CEntity%5CProduct%24id%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/L/H/az+nTSFt3kwu3RNMZ1Hi): Permission denied at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5BAppBundle%5CEntity%5CProduct%24name%40%5BAnnot%5D%5D%5B1%5D" (array) {"key":"%5BAppBundle%5CEntity%5CProduct%24name%40%5BAnnot%5D%5D%5B1%5D","type":"array","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/U/9/egp-EjlPnVg5UDIFWK43): No such file or directory at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5B%5BC%5DAppBundle%5CEntity%5CProduct%24name%40%5BAnnot%5D%5D%5B1%5D" (integer) {"key":"%5B%5BC%5DAppBundle%5CEntity%5CProduct%24name%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/6/1/BU3ZLPGkSwQFthLVVdjY): No such file or directory at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5BAppBundle%5CEntity%5CProduct%24price%40%5BAnnot%5D%5D%5B1%5D" (array) {"key":"%5BAppBundle%5CEntity%5CProduct%24price%40%5BAnnot%5D%5D%5B1%5D","type":"array","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/Q/I/OQPYJjmpYaXeDnUw5S6v): No such file or directory at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5B%5BC%5DAppBundle%5CEntity%5CProduct%24price%40%5BAnnot%5D%5D%5B1%5D" (integer) {"key":"%5B%5BC%5DAppBundle%5CEntity%5CProduct%24price%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/6/7/AvQvZmgc3JFW8DVeG2Uk): Permission denied at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5BAppBundle%5CEntity%5CProduct%24description%40%5BAnnot%5D%5D%5B1%5D" (array) {"key":"%5BAppBundle%5CEntity%5CProduct%24description%40%5BAnnot%5D%5D%5B1%5D","type":"array","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/B/Q/TwPVg2PfAZ2FkFHvduqi): No such file or directory at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [2017-05-11 09:11:34] cache.WARNING: Failed to save key "%5B%5BC%5DAppBundle%5CEntity%5CProduct%24description%40%5BAnnot%5D%5D%5B1%5D" (integer) {"key":"%5B%5BC%5DAppBundle%5CEntity%5CProduct%24description%40%5BAnnot%5D%5D%5B1%5D","type":"integer","exception":"[object] (ErrorException(code: 0): rename(/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/59141cb6b03849.50113194,/home/eric_tu/MyProject/var/cache/dev/pools/Xegxnk3wGb/W/G/tNsnVcaUbc7V5CWxgMJG): No such file or directory at /home/eric_tu/MyProject/vendor/symfony/symfony/src/Symfony/Component/Cache/Adapter/FilesystemAdapterTrait.php:93)"} [Mapping] OK - The mapping files are correct. [Database] FAIL - The database schema is not in sync with the current mapping file. [eric_tu@localhost MyProject]$ ``` # [Database] FAIL - The database schema is not in sync with the current mapping file. 解法: https://www.orocrm.com/forums/topic/doctrineschemavalidate-always-return-database-is-not-in-sync https://github.com/doctrine/doctrine2/issues/3810 This happens because MySQL does not have a native type for DateTimeTz, therefore the mapping always falls back to the native DATETIME type. ```bash= [eric_tu@localhost MyProject]$ php bin/console doctrine:schema:update --force ... Updating database schema... Database schema updated successfully! "1" query was executed ``` ```bash= [eric_tu@localhost MyProject]$ php bin/console doctrine:schema:validate ... [Mapping] OK - The mapping files are correct. [Database] OK - The database schema is in sync with the mapping files. ``` 成功把資料映射 之後我們還區樣建立CURD的方法例如 getName(), setName($name) 等等, 不過幸運的是docrtine可以幫助我們快速建立。 ```bash= [eric_tu@localhost MyProject]$ php bin/console doctrine:generate:entities AppBundle/Entity/Product ...bash= > backing up Product.php to Product.php~ > generating AppBundle\Entity\Product ``` 更新 ```bash= php bin/console doctrine:schema:update --force ``` # Persisting Objects to the Database 再來要把我們產生的資料表作為實體儲存到資料庫中 新增一些function到Controller中 Persisting Objects to the Database¶ Now that you have mapped the Product entity to its corresponding product table, you're ready to persist Product objects to the database. From inside a controller, this is pretty easy. Add the following method to the DefaultController of the bundle: ```php= // src/AppBundle/Controller/DefaultController.php // ... use AppBundle\Entity\Product; use Symfony\Component\HttpFoundation\Response; // ... public function createAction() { $product = new Product(); $product->setName('Keyboard'); $product->setPrice(19.99); $product->setDescription('Ergonomic and stylish!'); $em = $this->getDoctrine()->getManager(); // tells Doctrine you want to (eventually) save the Product (no queries yet) $em->persist($product); // actually executes the queries (i.e. the INSERT query) $em->flush(); return new Response('Saved new product with id '.$product->getId()); ``` 用完大概長這樣 ```php= 1 <?php 2 3 namespace AppBundle\Controller; 4 5 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; 6 use Symfony\Bundle\FrameworkBundle\Controller\Controller; 7 use Symfony\Component\HttpFoundation\Request; 8 9 use AppBundle\Entity\Product; 10 use Symfony\Component\HttpFoundation\Response 11 12 class DefaultController extends Controller 13 { - 14 /** | 15 * @Route("/", name="homepage") | 16 */ | 17 public function indexAction(Request $request) | 18 { - 19 // replace this example code with whatever you need 2 20 return $this->render('default/index.html.twig', [ - 21 'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR, 4 22 ]); | 23 } 24 } 25 26 public function createAction() 27 { - 28 $product = new Product(); | 29 $product->setName('Keyboard'); | 30 $product->setPrice(19.99); | 31 $product->setDescription('Ergonomic and stylish!'); | 32 | 33 $em = $this->getDoctrine()->getManager(); | 34 | 35 // tells Doctrine you want to (eventually) save the Product (no queries yet) | 36 $em->persist($product); | 37 | 38 // actually executes the queries (i.e. the INSERT query) | 39 $em->flush(); | 40 | 41 return new Response('Saved new product with id '.$product->getId()); 42 } ``` # Fetching Objects from the Database

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully