Yii Framework Forum: What part of ignore does git not understand about gitignore? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

What part of ignore does git not understand about gitignore? Rate Topic: -----

#1 User is offline   newbiedo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 28-June 12

Posted 19 February 2018 - 04:20 PM

I am starting a new project and would like to have version control from the start. I experimented over the weekend with a new yii2 project created on my live server and pushed to a repository. I initialized git and attempted to add files for the first commit and got this message:

The following paths are ignored by one of your .gitignore files:
vendor
Use -f if you really want to add them.
fatal: no files added

Am I missing something about the add command? I assumed that add * would be everything except what is in .gitignore. I did the dreaded "got it working" thing by doing the -f, but I really didn't want to add the vendor folder. Why can't git ignore what is in gitignore and add the rest?
0

#2 User is offline   newbiedo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 28-June 12

Posted 19 February 2018 - 05:14 PM

I am searching all over for answers. The only thing I can find is to have /vendor in the .gitignore which it already is. No one has ever had this problem?
0

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 3,710
  • Joined: 10-October 10
  • Location:Denmark

Posted 20 February 2018 - 03:47 AM

I can't see the problem :)
Git says that it hasn't got anything to add, so unless you really want to use 'f', don't.

If I am doing an init on an already existing project, I always add the gitignore(s) first. But I suspect that Git is intelligent enough to handle it all in one go.
"Less noise - more signal"
0

#4 User is offline   newbiedo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 95
  • Joined: 28-June 12

Posted 21 February 2018 - 06:02 PM

View Postjacmoe, on 20 February 2018 - 03:47 AM, said:

I can't see the problem :)
Git says that it hasn't got anything to add, so unless you really want to use 'f', don't.

If I am doing an init on an already existing project, I always add the gitignore(s) first. But I suspect that Git is intelligent enough to handle it all in one go.


The problem is that no files are ever added.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users