12

多くの人と開発を進めています。

リモートリポジトリをチェックアウトし、3 つのファイルを取得します。編集後、次を実行します。

svn status

それが示している:

M file_1
M file_2
M file_3

ここで、file_1、file_2 の 2 つのファイルのみをコミットしますが、file_3 はコミットしません。

どうやってするの?

使いたくない

svn revert file_3

コミットする前に。

説明: 共有プロジェクト用に file_1、file_2、ローカル マシンのみで実行するために file_3 を編集します。

4

7 に答える 7

9

どうですか:

$ svn commit file_1 file_2
于 2011-12-15T08:25:17.337 に答える
1

コミットするファイルのパスを svn commit コマンドに追加するだけです:

svn commit file_1 file_2

http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.commit.htmlを参照してください。

于 2011-12-15T08:27:12.730 に答える
0

これは、変更リストにないファイルのみをコミットする Windows PowerShell バージョンです。ignore-on-commit という名前の変更リストを作成し (Tortoise SVN はこれを理解します)、コミットしたくないファイルをそこに入れます。

# get list of changed files into targets
[XML]$svnStatus = svn st -q --xml C:\SourceCode\Monad
# select the nodes that aren't in a changelist
$fileList = $svnStatus.SelectNodes('/status/target/entry[wc-status/@item != "unversioned"]') | Foreach-Object {$_.path};
# create a temp file of targets
$fileListPath =  [IO.Path]::GetTempFileName();
$fileList | out-file $fileListPath -Encoding ASCII
# do the commit
svn commit --targets $fileListPath -m "Publish $version" --keep-changelists 
# remove the temp file
Remove-Item $filelistPath
于 2013-11-09T11:47:06.740 に答える
0

多分あなたはこのコマンドを使うことができます。

svn ci `svn st | grep -e "^[A|M]" | grep -v "test.js" | grep -ve "conf\.js$" | awk '{print $2}' | tr "\\n" " "`
于 2015-12-11T04:18:59.900 に答える