PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 1, 2022

[FIXED] Why isn't GIT tracking my cakephp migrations Plugin?

 November 01, 2022     cakedc, cakephp, cakephp-2.0, migration, plugins     No comments   

Issue

I am using GIT to deploy my cakephp applications, a few days ago I started using the migrations plugin (by cakeDC) in my app to simplify database versions and changes.

After installing the Migrations Plugin on my local development machine, I committed the changes and pushed it to my production server, and tried to run the migrations plugin from there. After looking at the server for quite some time I realized it had not grabbed all of the migrations plugin, however the following were changed:

app/Config/bootstrap.php had the following line appended CakePlugin::load('Migrations');

The Plugin folder now had a Migrations folder, but it was empty.

I resolved this by uploading the plugin via FTP. I ran a git status on it and it shows the working directory clean...

Why isnt GIT tracking my Migrations plugin folder contents?


Solution

The Plugin folder is not being tracked because GIT thought it was a submodule.

I ran into this issue because I used GIT to clone this Plugin into the plugin directory. and git didnt add it since it was a repository in itself. When GIT didnt add it to my tracked files I did it manually: git add app/Plugin/Migrations/ this created a gitlink and essentially acted like a submodule, as seen in this thread:

Git - how to track untracked content?

Since at the time I didnt want to use the plugin as a submodule, I corrected this issue with the following commands:

git rm --cached app/Plugin/Migrations

with a git status I could see that GIT was now recognizing my Plugin

I then could proceed with a git add . and git commit -m "finally adding the plugin"

I hope this helps someone in the future.

Thanks!



Answered By - CertifiedGeek
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing