Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to work git in magento 2 project update and commit

Git cmd command for magento 2 project

1. git status (Check List of which are staging files)

2. git add .(add stage all of the files in the current directory)

3. git commit -m "add you task comment" (adding changes to the local repository)

4. git push (transfer the last commit to a remote server)

5. git checkout developer* (checkout to a particular branch -- *developer is example branch name)

6. git merge (Your changes merge to main branch)

7. git pull origin developer* (your local branch update if any changes in main branch) -- *developer is example branch name)

8. git push origin developer (your local changes commit in main branch)

9. git checkout your branch{move to your branch}

after you move your branch please clean cache --> php bin/magento cache:clean

How to create new branch in git ?

Use this code : git checkout -b

This post first appeared on Smita-tech, please read the originial post: here

Share the post

How to work git in magento 2 project update and commit


Subscribe to Smita-tech

Get updates delivered right to your inbox!

Thank you for your subscription