Committing the code on Subversion (first time)

不打扰是莪最后的温柔 提交于 2019-12-06 18:55:40

问题


I am new on Subversion. I have to commit a code on subversion and this is the first time that I am doing this. So my mentor told me to put username on his server using SSH. I did this by following code:

amit@<URL> and it works fine.

Now he asked to commit the code and he give me url, but he said me to create a folder first by username which you have got at the time of SSH i.e. amit.

How I create a folder on svn link and then how to commit the project.


回答1:


First checkout that repository by

svn checkout <Your URL> svn

Now cd to svn folder, create username folder(amit) in svn folder and commit:

svn commit -m"username folder is created."

Now copy your files in that folder(amit in your case). Now you have to add each new file or new folder:

svn add filename
svn add foldername

Now you can commit these files to server:

svn commit -m"Some new files are added."

Note: Text after -m are comments and you can change it according to your needs.




回答2:


Magic!! :)

If you already have a project that you started working on but it's not an svn working copy yet.

The simplest way ever:

Navigate to the project folder in the terminal using cd and type:

svn co http://svn.mine.com/svn/app_ios/trunk/ .

then:

svn add --force .

then:

svn commit -m "first commit"




回答3:


svn ci is as good as using svn commit




回答4:


Create the folder in your home filesystem and commit the entire thing to the server.

ex: amit/your_project_folder/




回答5:


Not sure, but i would try this:

  • svn mkdir armit@<host>/<your_folder>
  • svn checkout armit@<host>/<your_folder>
  • copy your files into <your_folder> in local
  • svn commit <your_folder>



回答6:


I had to send my code to other svn url from my svn. What I did

1 Take checkout of destination svn url in one place (Where i need to push my code)

svn co destination_svn_url

2 Now, I have my code. I deleted .svn folder(hidden) from my code using following command to avoid conflict between versions

rm -rf `find . -type d -name .svn`

3 Now I copied my code(folder) and paste it to destination folder i.e in step 1 and run the following command

svn add folder_path_i_paste

4 Now commit the code.

svn commit -m"Code pushed"




回答7:


//First add working copy

  • svn co your url
  • svn add * --force
  • svn commit -m "first commit"

//Remove frameworks such as google places, Google maps, Google maps core because these cause error while uploading data.



来源:https://stackoverflow.com/questions/6409372/committing-the-code-on-subversion-first-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!