• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /var/www/html/cnasolution/application/views/question.php
Line: 191
Function: _error_handler

File: /var/www/html/cnasolution/application/controllers/Questions.php
Line: 419
Function: view

File: /var/www/html/cnasolution/index.php
Line: 315
Function: require_once

I am using gitlab for project hosting and ci for a project. I have a use case where I a developer has to add a file in his/her branch. But while merging that branch to master, one specific file should not be added to master branch.

I tried following solution to this:

  • I added the filename(testfile) to gitignore of master and pushed the changes.
  • Then, I checked out a branch "dev" and added the file "testfile" using:

    git add -f testfile

  • the file got added and I committed and pushed the changes.
  • But, when I merged the "dev" branch to master, the testfile also got merged(added) in the master branch.

    P.S. Technically, It shouldn't have been the case as I forced added the file only on dev branch and while merging I didn't even get the warning message.

Download script demo [LINK]
Download script demo [LINK 2] Download script demo [LINK 2]