I've changed two files on my local repo, in a new branch (I'll call it "new_branch"). I've commit the changes and pushed to remote repo. Then, I wanted to merge theses changes into master branch. And I've done:
$ git checkout master
$ git merge new_branch
But not only the two files are added to master, but other configuration files have been added too. I have just done:
$ git add file1
$ git add file2
$ git commit -m "changes file1 and file2"
$ git push -u origin --all
Why are the other files added too? and how I undo this merge?
This is the output of merge:
Updating b57febc..5a967d5
Fast-forward
.gitignore | 6 +-
app/config/parameters.yml | 2 +-
src/MSD/HomeBundle/Controller/HomeController.php | 421 +++++++++++-----------
src/MSD/HomeBundle/Entity/Imagen.php | 298 +++++++++++++++
web/bundles/msdhome/js/acercade.js | 2 +-
5 files changed, 506 insertions(+), 223 deletions(-)
create mode 100644 src/MSD/HomeBundle/Entity/Imagen.php
I just want to change:
src/MSD/HomeBundle/Controller/HomeController.php
src/MSD/HomeBundle/Entity/Imagen.php
"git log --graph --decorate --pretty=oneline --abbrev-commit --all" output:
* 5a967d5 (HEAD, origin/mejoras_contralador, mejoras_contralador, master) Controlador mo
* 081224a Cambios en controlador y clase Imagen
* a74e337 añadir directorio vendor a .gitignore
* 42d3217 Primer commit
* b57febc (origin/v1, origin/master, origin/HEAD) version 1 definitiva
* 1d1c5f7 solucionado error de js en botones social media
* 2f40866 primer commit
Seems that .gitignore was added too (but not app/config/parameters.yml)