2
I would like to upload all files from the directory, except the config.php
. I basically use the command git add .
to add all the files, but when you have few edited files, I do so:
git add arquivo1.php
git add arquivo2.php
git add arquivo3.php
The archive config.php
in my machine is one way, but in the server has other specific variables. I don’t always need to send the config.php
. I would like a command to upload all files except this one. I know there is a .gitignore
and also this question about Ignore all files except one specific in GIT, but sometimes I need to send the file config.php
, without ignoring it, when there is some specific configuration.
In "pseudo-command" it would be something like:
git add . exceto config.php
How to send all directory files except one specific?
And why not make use of the
.gitignore
to facilitate the process?– Guilherme Nascimento
@Guilhermenascimento because it is not always necessary to ignore it. If it were fixed, would have already put there. It would be something even like the pseudo command, "Add it all and ignore this"...
git add tudo exceto config.php
– viana
I understand, but the
.gitignore
does not need to be forever, you can edit it at any time on your local machine, ie it is a file adjustable to your need for any time.– Guilherme Nascimento
Ah, got it, you don’t want to ignore the file, you want to ignore the modifications, that’s it?
– Guilherme Nascimento