Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commit all folders and files in a directory using commandline

We are having trouble with having a generalized approach to committing with a batch file using commandline SVN.

We've got a backup script that created a new folder with the current date containing the database dumps of our database. (Yes, we version control our database).

Now how can I use the svn commit command to include all directories that are new in the project?

Is there an approach without using the svn add command?`

like image 794
Faizan S. Avatar asked Mar 24 '10 13:03

Faizan S.


People also ask

How do I commit all files in a folder?

Enter git add --all at the command line prompt in your local project directory to add the files or changes to the repository. Enter git status to see the changes to be committed. Enter git commit -m '<commit_message>' at the command line to commit new files/changes to the local repository.

How do I commit multiple files in git terminal?

To add multiple files in Git, first, navigate to the directory where the untracked files are present and execute the “$ git add” command with the required files name. Then, use the “$ start” command to open added files one by one, make changes and save them.


2 Answers

svn add --force . will add all the files and directories below your current working directory that aren't added yet (and aren't ignored) to your working copy.

A svn ci -m "" will then handle the commit.

The only way without 'svn add' would be to use 'svn import', but this assumes a new location.

like image 170
Bert Huijben Avatar answered Nov 09 '22 02:11

Bert Huijben


No. You must svn add files before you can commit them.

You could use wildcards, or have your script construct a list of what's to be added, which can then be passed to the --targets option.

like image 41
Michael Hackner Avatar answered Nov 09 '22 02:11

Michael Hackner