0

I am working on magento. beginning of the project I have installed magento 2 on windows laptop and worked on it.later I made one repository in git and pushed the code to git.

now I got the one Ubuntu production server.I have cloned that git repository.due to platform changes I have run the command "composer install" and changed some configuration .so here is the problem from next on words when I pull the repository from git hub it should pull only one folder named app from git hub

If all files pulled from git hub, configuration files will be changed so it won't work again in my Ubuntu server.

I hope magento developers are more familiar with this.please help me how to achieve this?

Shivkumar kondi
  • 6,458
  • 9
  • 31
  • 58
vijay b
  • 459
  • 1
  • 13
  • 30
  • So instead the configuration files should go in `.gitignore` but that will also delete the files from your git repo. – Deepesh Jan 10 '17 at 14:06
  • Yeah I have tried.but it's deleting files from git repo. – vijay b Jan 11 '17 at 05:30
  • Generally we keep and example files of config in the repo. Like in rails we have a database.yml so we keep database.yml.example in the repo and the database.yml in gitignore. Would this be possible for you? – Deepesh Jan 11 '17 at 05:33

2 Answers2

0

To resolve the same issue, you will have to follow below steps:

Step 1- git init

Step 2- git remote add [REMOTE_NAME] [GIT_URL]

Step 3- git fetch REMOTE_NAME

Step 4- git checkout REMOTE_NAME/BRANCH -- path/to/directory

Abhinav Kumar Singh
  • 2,325
  • 1
  • 10
  • 11
0

How to ignore new files

Globally

Add the path(s) to your file(s) which you would like to ignore to your .gitignore file (and commit them). These file entries will also apply to others checking out the repo.

Locally

Add the path(s) to your file(s) which you would like to ignore to your .git/info/exclude file. These file entries will only apply to your local working copy.

How to ignore changed files (temporarily)

In order to ignore changed files to being listed as modified, you can use the following git command:

git update-index --assume-unchanged <file>

To revert that ignorance use the following command:

git update-index --no-assume-unchanged <file>

Read More from this answer https://stackoverflow.com/a/653495/6107715

Community
  • 1
  • 1
Shivkumar kondi
  • 6,458
  • 9
  • 31
  • 58