Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Git-add with force

Tags:

git

git-add

I get git-status at ~/bin:

# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       screen/dev/

I run

git add --force screen/dev/

I get the same git-status as before. I add each file in the folder independently, but I get the same git-status.

There is no .git in screen/dev/. The folder seems not to be a sumbodule.

How can you add a folder and its content with force to my git at ~/bin?

like image 227
Léo Léopold Hertz 준영 Avatar asked Jul 15 '09 00:07

Léo Léopold Hertz 준영


1 Answers

You should not need '--force' or '-f' option: see git add:

-f
--force:

Allow adding otherwise ignored files.

In your case, you may not want to add all files, included ignored files under screen/dev directory.

 git add screen/dev

should be enough (without options or ending '/')

like image 112
VonC Avatar answered Oct 14 '22 16:10

VonC