User Tools

Site Tools


how_to_adapt_to_git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
how_to_adapt_to_git [2020/08/17 09:28]
A User Not Logged in old revision restored (2020/08/16 17:13)
how_to_adapt_to_git [2020/08/17 09:29] (current)
A User Not Logged in old revision restored (2019/11/22 02:21)
Line 1: Line 1:
 ====== How To Adapt To Git ====== ====== How To Adapt To Git ======
  
-If you started modifying your platform's core files and did not want to use vQmod for soft modifying it. Then you probably think upgrading the platform is hundreds of hours of work. That does not need to be the case.+If you started modifying your platform's core files and don'want to use vQmod for soft modifying it. Then you probably think upgrading the platform is hundreds of hours of work. That does not need to be the case.
  
-Adapt your current platform to Git for easily pulling future updates. In this example we are using BitBucket for the private repository. Here is what to do: +Adapt your current platform to Git for easily pulling future updates. In this example we are using BitBucket for  the private repository. Here is what to do:
- +
-===== Initialize Project =====+
  
 1. Sign in to BitBucket and create a new private Git repository. 1. Sign in to BitBucket and create a new private Git repository.
Line 15: Line 13:
 <code> <code>
 # Navigate to the project folder # Navigate to the project folder
-cd "c:\path\to\my project\"+cd c:\path\to\myproject\
  
 # Make this directory a Git project # Make this directory a Git project
Line 26: Line 24:
 git remote add litecart https://github.com/litecart/litecart.git git remote add litecart https://github.com/litecart/litecart.git
  
-Fetch branches and tags from LiteCart's repository +Pull everything from LiteCart's repository 
-git fetch litecart+git pull litecart
  
-# Pull everything from LiteCart's repository branch named master +# Revert back to a certain version number (stated by it's tagname) e.g. 2.1.6
-git pull litecart master +
- +
-# Revert back to the version number matching your project (stated by it's tagname) e.g. 2.1.6+
 git reset --hard 2.1.6 git reset --hard 2.1.6
  
-# Push the current content to your new repository's main branch named master, use that as default for future push requests+# Push all your content to your new repository's main branch named master
 git push -u origin master git push -u origin master
 </code> </code>
  
-3. Copy all your files from your project to this new project folder. Overwrite any existing files in your new repository. You can use the command line interface to view all your changes:+3. Copy all your files from your previous project folder to the new project folder. Overwrite any existing files in your new repository. You can use the command line interface to view all your changes:
  
 <code> <code>
Line 52: Line 47:
 git commit -m "My big initial commit" git commit -m "My big initial commit"
  
-# Push your commit(s) to your default upstream repository (origin) +# Push your commit(s) to your repository named origin 
-git push</code> +git push -u origin master</code>
- +
-===== Pull Updates =====+
  
 5. Now begins the fun. Pull all updates from Github. 5. Now begins the fun. Pull all updates from Github.
  
 <code># Pull all updates from the Github repository we called litecart <code># Pull all updates from the Github repository we called litecart
-git pull litecart master</code>+git pull litecart</code>
  
-6. Solve any merge conflicts. (This guide will not teach you how to solve conflicts. But TortoiseGit Resolve is a good tool.)+6. Solve any merge conflicts. (This guide will not teach you how to solve conflicts. But we recommend using TortoiseGit Resolve)
  
 7. Use your browser to navigate to the installation folder and run the upgrade script. This will perform all changes necessary to update files and database. 7. Use your browser to navigate to the installation folder and run the upgrade script. This will perform all changes necessary to update files and database.
Line 75: Line 68:
  
 <code># Commit all changes <code># Commit all changes
-git commit -m "My merged update"+git commit -m "Initial commit"
  
 # Push commit to repository # Push commit to repository
-git push</code>+git push -u origin master</code>
  
 11. All done! You should now be running the latest update of LiteCart merged with all your modifications. 11. All done! You should now be running the latest update of LiteCart merged with all your modifications.
how_to_adapt_to_git.txt · Last modified: 2020/08/17 09:29 by A User Not Logged in