BLOG

Git command


Shopify CLI Login
1>shopify version
2> shopify login --store tierliebhaber-animagus.myshopify.com
or
shopify theme dev --store [store url]
3> to download theme file use command >> shopify theme pull

1>https://github.com/blicksolutions/tierliebhaber.git

2> git remote set-url origin https://yourusername@github.com/user/repo.git
Example:  git remote set-url origin https://ShahnawazRock@github.com/blicksolutions/tierliebhaber.git

>to get remote permission >> git clone https://github.com/blicksolutions/tierliebhaber/tree/bugfix/search-result-bug-fix

3>to check code status use command >>git status

3>to add file on staus green status use command >>git add .

3>to check current branch use command >>git branch

4> to change branch use command >> git checkout bugfix/search-result-bug-fix

5> to add comment on changes file use command >> git commit -m "add your comment"  

6> to push your file on repo use command >> Git push

<aside> 🔍 Content

</aside>

Basic requirements

  • Shopify Partners Account 
  • GitHub Account Follow the invitation link and create a new account at GitHub with the companies email
  • Install IDE (Integrated Development Environment). Recommendation: [VS Code] (https://code.visualstudio.com/download), otherwise use WebStorm or Atom as desired.
  • Necessary extensions for the IDE such as: Install Liquid code highlighting, GIT Plugins etc.
  • Install Shopify CLI for local theme development https://shopify.dev/themes/tools/cli/getting-started

General

Repositories contain the theme of a Shopify store.

The branch ’main' should always be linked as a live theme in Shopify.

<aside> ⚠️ Änderungen an der main branch sind somit final und sofort im Livebetrieb zu sehen.

</aside>

Changes to the main branch are thus finally and immediately visible in live operation.

assets
config
layout
locales
sections
snippets
templates

If no JavaScript Task Runner such as GULP or Grunt is used, no additional folders should be added.

<aside> 💡 Subfolders are ignored by Shopify https://shopify.dev/themes/architecture#directory-structure-and-component-types

</aside>

Commit and merge messages can be relatively concise, but should accurately describe what has been changed in the commit.

Format

Automated formatting of code, as well as removing console.log, should also be done on your own branch. The code should be indented after 4 tab stops. Line endings should be consistent in the repository, preferably LF and not CRLF.

Workflow

  1. After receiving the task, log in to Shopify Partners, select shop and log in

    https://lh6.googleusercontent.com/_FuuwvlNbxvIGqvdq4P7SkN43ga_Cf7uemATNgewJHTzH3Z5D2zKgySHVX1MK7zgLEr4fCNoDDUR1H-HV_ioV68pcIE-QuT4bNhOrpA1jfrO_DDxryJZWFO0oshQO6QcwqHwi79TB8wKx7XLgPa3YcTwRYfPrNeMIa870MvDYHPYtHQ9iIIjTLBoQA

  2. Log into GitHub and search for the repository

  3. If the desired repository does not yet exist, please contact Client

  4. If the repository exists, check it out via SSH or HTTPS

  5. Create New Branch

    Note:

<aside> ⚠️ Always leave from the main branch.

</aside>

Feature If it is a new feature, the branch should be named after the feature/[name] schema. Where [name] should be a useful name.

<aside> 💡 Example: feature/example-component

</aside>

Bugfix If it is a bug, the branch should be named after bugfix/[name]. Where [name] should be a useful name.

<aside> 💡 Example: bugfix/example-bug

</aside>

  1. Start Shopify CLI for Local Theme Development: ****In the terminal in the root directory of the theme, run the following commands:

    shopify login --store=SHOPIFY_SHOP_URL
    shopify theme serve
    

    <aside> 💡 For information: it may well be that Shopify requires a Staff Member Account for this (for questions: contact @Martin Herd or @Marcel)

    </aside>

  2. After development: current status needs to be committed and pushed

  3. In the shop (Onlineshop/Themes) click on the select field Add Theme and select from Connect Github

    connect theme from GitHub

    connect theme from GitHub

  4. Select the repository and connect to the previously created branch. The branch is now automatically added to Shopify as a theme.

    Select repository from GitHub

    Select repository from GitHub

  5. Thoroughly test development on any browsers and devices using Browserstack.

  6. Create Pull Request Pull requests should be accompanied by a short message to make it clear what is to be remembered.

    Before creating a PR, it should be checked that no changes are included that are not necessary for the implemented feature. The code should be formatted and unnecessary code fragments like console.log should have been removed. A pull request should have been reviewed by at least one other developer.

    <aside> ⚠️ ⚠️ A merge into the main branch is immediately online and should be considered irreversible.

    </aside>

  7. Set the task in Clickup to check intern

Share:

Post a Comment!