Identify differences between two similar projects

3

I have two projects in PHP: one is a store in Rio, and another is the store in São Paulo. Basically, SP is in the root, and Rio is "almost" a clone of the SP project. Each project is presented one way, the river is being loaded into a river subfolder that is loaded into the domain, and the other takes direct from the root of the site. (I made this dynamic, using a linux command, to point the project through a symbolic link:
[user@maquina projeto]/loja-SP/ (master)$ ln -s ../loja-RJ/ rio )

To better illustrate, the projects are accessed like this:

  

/ store-RJ / (master) - > www.lojaxyz.com.br/rio
  / store-SP / (master) - > www.lojaxyz.com.br /

I would like to compare them to see the divergences, to treat an error that is occurring only in the river. But each one is in a different Git repository. I would like something like this:

dummy example: git /loja-RJ/ diff ../loja-SP/ name-only--

    
asked by anonymous 11.08.2016 / 21:33

2 answers

0

To solve the problem, using PHP Storm I followed this tutorial , within project, I clicked on CTRL + D, and in the window that opened, I selected the directories of the two projects, placing each one side by side, where he compared in the window the same files, which were not in both projects and those that were modified. As it is in the image of the tutorial:

    
31.08.2016 / 22:40
0

If you have two git repositories, in two different places, and you need to know if there are differences between them, you can run git diff between them to see the differences (if they exist, of course).

Considering that you have repositorio_a , and you want to compare it with repositorio_b , do the following in repositorio_a :

# Vá até o repositorio_a
cd /home/usuario/repositorio_a

# Adicione o repositorio_b como um remote
git remote add -f b /home/usuario/repositorio_b

# Veja as diferenças
git diff master remotes/b/master

# Quando estiver satisfeito, remova o remote
git remote rm b
    
06.09.2016 / 21:09