0

As stated in Magento Docs for Development System and in Magento Docs for Build and Production System (Quote from Build Server explanation):

All Magento code is under source control in the same repository as the development and production systems

Then there are two different .gitignore files (Docs), one for development, and for for build and production.

I am struggeling to keep up with that. How to keep everything in the same repo, but use different .gitignore files?

On Build Docs, they explain it this way:

  1. Retrieve the Magento code from source control.
  2. If you use Git, open .gitignore in a text editor.

  3. Start each of the following lines with a # character to comment them out: [...]

  4. Save your changes to .gitignore and exit the text editor.

  5. If you use Git, use the following commands to commit the change:

    git add .gitignore && git commit -m "Modify .gitignore for build and production"

So, wouldn't this effectively change the .gitignore file also for the development environment? There are using the same repo.

0

Please Create 3 separate branch development, build and production in GIT repository.

When we Create a new GIT repository with git init repository has olny master Branch.follow below stept to create new branchs

1.Check Avaible Branch and current Brach run below command git Branch

Output like will like below * development master staging

Here * development is cuurent branch, now Swich to master brach with run command git checkout master

2.Create a New brach Name 'build' from Master with run below command

git checkout -b build

3.Create a New brach Name 'development' from build run below command

git checkout -b development

Note:Update your code changes into development branch with add, commit and push command then merge your 'development' Branch with Branch 'build'. now checkout to build branch and run git pull origin build command

After merge your 'build' Branch to Branch 'master'. now checkout to Master branch and run git pull origin master command

For more information please check https://www.atlassian.com/git/tutorials/using-branches

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.