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
Next revision
Previous revision
how_to_adapt_to_git [2020/02/14 22:20]
admin
how_to_adapt_to_git [2020/02/15 23:24] (current)
admin [How To Adapt To Git]
Line 1: Line 1:
 ====== How To Adapt To Git ====== ====== How To Adapt To Git ======
  
-If you started modifying your platform'​s core files and don'​t ​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 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.
  
-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 ===== ===== Initialize Project =====
Line 15: Line 15:
 <​code>​ <​code>​
 # Navigate to the project folder # Navigate to the project folder
-cd c:\path\to\myproject\+cd "c:\path\to\my project\"
  
 # Make this directory a Git project # Make this directory a Git project
Line 26: Line 26:
 git remote add litecart https://​github.com/​litecart/​litecart.git git remote add litecart https://​github.com/​litecart/​litecart.git
  
-# Pull everything from LiteCart'​s repository +# Pull everything from LiteCart'​s repository ​branch named master 
-git pull litecart+git pull litecart ​master
  
-# Revert back to a certain ​version number (stated by it's tagname) e.g. 2.1.6+# 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 all your content to your new repository'​s main branch named master+# Push the current ​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 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:+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:
  
 <​code>​ <​code>​
Line 57: Line 57:
  
 <​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</​code>​+git pull litecart ​master</​code>​
  
 6. Solve any merge conflicts. (This guide will not teach you how to solve conflicts. But we recommend using TortoiseGit Resolve) 6. Solve any merge conflicts. (This guide will not teach you how to solve conflicts. But we recommend using TortoiseGit Resolve)
Line 72: Line 72:
  
 <​code>#​ Commit all changes <​code>#​ Commit all changes
-git commit -m "Initial commit"+git commit -m "My merged update"
  
 # Push commit to repository # Push commit to repository
how_to_adapt_to_git.1581715257.txt.gz · Last modified: 2020/02/14 22:20 by admin · Currently locked by: 172.69.25.200,162.158.78.16