How can I commit a single file using SVN over a ne

2019-03-09 15:32发布

I am able to check out an entire svn repository using the following command:

svn co https://myaccount.svn.beanstalkapp.com/myapp/

But I cannot figure out the command to commit a single file. If I make to change to myapp/page1.html.

How can I check in just that one file?

6条回答
来,给爷笑一个
2楼-- · 2019-03-09 16:16

You have a file myFile.txt you want to commit.

The right procedure is :

  1. Move to the file folder
  2. svn up
  3. svn commit myFile.txt -m "Insert here a commit message!!!"

Hope this will help someone.

查看更多
男人必须洒脱
3楼-- · 2019-03-09 16:20

You can use

cd /You folder name
svn commit 'your file path' -m "Commit message you want to give"

You can also drage you files to command promt instead to write cd [common in MAC OSx]

查看更多
Viruses.
4楼-- · 2019-03-09 16:22

strange that your command works, i thougth it would need a target directory. but it looks like it assumes current pwd as default.

cd myapp
svn ci page1.html

you can also just do svn ci in or on that folder and it will detect all changes automatically and give you a list of what will be checked in

man svn tells you the rest

查看更多
姐就是有狂的资本
5楼-- · 2019-03-09 16:28
cd myapp/trunk
svn commit -m "commit message" page1.html

For more information, see:

svn commit --help

I also recommend this free book, if you're just getting started with Subversion.

查看更多
趁早两清
6楼-- · 2019-03-09 16:33

this should work:

svn commit -m "<Your message here>" path/to/your/file

you can also add multiple files like this:

svn commit -m "<Your message here>" path/to/your/file [path/to/your/file] [path/to/your/file]
查看更多
祖国的老花朵
7楼-- · 2019-03-09 16:38
  1. svn add filename.html
  2. svn commit -m"your comment"
  3. You dont have to push
查看更多
登录 后发表回答