Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude some files on svn command line commit (not svn:ignore)

I'm developing with many people.

I check out remote repository, get 3 file. After edit, run:

svn status

It shows:

M file_1
M file_2
M file_3

Now, I want to commit only two file: file_1, file_2, but not file_3.

How to do it?

I dont' want to use

svn revert file_3

before commit.

Explain: I edit file_1, file_2 for shared project, file_3 for running on only my local machine.

like image 962
vietstone Avatar asked Dec 15 '11 08:12

vietstone


People also ask

How do I ignore bin and obj folder in svn?

If you right click on a single unversioned file, and select the command TortoiseSVN → Add to Ignore List from the context menu, a submenu appears allowing you to select just that file, or all files with the same extension.

What is svn Changelist?

Description. Used for dividing files in a working copy into a changelist (logical named grouping) in order to allow users to easily work on multiple file collections within a single working copy.


2 Answers

Expanding upon zoul's answer.. to develop your list of files use:

svn stat |  grep -v ignore.file | perl -ne 'chop; s/^.\s+//; print "$_ "'

Or if you have file names with spaces use:

svn stat |  grep -v ignore.file | perl -ne 'chop; s/^.\s+//; print "\"$_\" "'
like image 116
Charlie Dalsass Avatar answered Oct 03 '22 23:10

Charlie Dalsass


How about:

$ svn commit file_1 file_2
like image 25
zoul Avatar answered Oct 03 '22 22:10

zoul