Using bitbucket with Magento 2
Bitbucket is an alternative of git which is also free. You can create your private repository for free. In this tutorial we will see how to start with bitbucket and how we can use bitbucket for managing magento 2 code.
How to start with bitbucket
Step 2: Setup project on your local store
i) Run below command if you want to download source code from repository to your machine
cd --Your local directory git init . git remote add origin <repository-url> git pull origin master
ii) Run below command to create local copy of workspace
git clone –REPOSITORY-URL— git add . git commit -m “initial version of core commit”
Step 3:Once you committed your core code in git. Its time to test your core code if its really working to do that
- we need to clone it to another folder like git clone https://email@example.com/cutehits/m2demo-core.git try to see what is the difference between your running code and this committed code (we already know that there are several files we have ignored).. Create a list of files which we have created and copy it.
- Get committed code on your local and use composer update (make sure sample data is not there—if you see any memory error)
- Now go to command line and run the command php bin/magento setup:upgrade (this will update db schema if any)
- Change the site path under DB. Modify unsecure and secure db url under core_config_data
- Flush magento cache from command line: php bin/magento cache:clean
Step 4 In case you need to delete any folder/file try command as below:-
Steps to remove directory and commit folder
git rm -r --cached FolderName git commit -m "Removed folder from repository" git push origin master
Step 5The same way we can configure a phpmyadmin and import and export to dev machine whenever its required.
fatal: The remote end hung up unexpectedly
then run the command
git config –global http.postBuffer 104857600
See all branches of git repo after clone
Git branch -a
How to clear cache of composer