Completely delete a repository with SVN - linux

I have a repository at http://svn.mysite/MySite/. I used the Apache command line to delete it using rm -rf MySite/, and the directory disapeared, but I can still do checkouts from this repo.
How do I completely delete it, so I can start a new empty repository at the same adress that starts at revision 0?

Have you deleted it on the server or just your working copy? You need to physically remove the repository on the server.

1) Command Line:
svn delete http://svn.mysite/MySite/ --message "Unused"
2) GUI:
Get a version of Tortoise SVN and install it.
You need to have a permission to delete the repository
Right-Click anywhere on desktop > TortoiseSVN > Repo-Browser
Manually delete your target in this folder tree

Related

How to detach a folder from being tracked without deleting any files from it?

I completed MyProject1 and have uploaded it in git in fine way with commits after adding each new features. And now I'm starting MyProject2 and was trying to add the URL for the remote repository. But then I found out that I had mistakenly added the URL in Documents instead of MyProject1 folder because of which MyProject2 folder is also being tracked in MyProject1. And I'm not being able to add URL to MyProject2 but instead facing merge issues.
Is there any way to detach the track from my Document folder without deleting any of my files from Documents.
Structure is this way(I'm using Linux):
Documents
(And inside Documents there is:)
MyProject1
MyProject2
And other folders which are also being tracked.
We can manually do it with below steps
create a file .gitignore in base directory.
If MyProject1 and MyProject2 are already part of git tracking, Please run commands
git rm -r --cached MyProject1/
git rm -r --cached MyProject2/
Open the file in text editor and add below lines in file
MyProject1/
MyProject2/
Best way:
Create a .gitignore file following #Vinayagam R
Ignore file locally
Those methods won't affect other contributors working on the same remote repository:
Use update-index:
If you want to stop tracking a file at certian point.
git update-index --assume-unchanged yourDirectoryName
--assume-unchanged is the flag which means the files should not change locally. In other words, it is used when ignore files that you do not need to change locally (or should not change).
To revert it use update-index --no-assume-unchanged yourDirectoryName
Using .exclude
In your working directory edit .git/info/exclude

How to Remove Github Repositories

March 12, 2021
There is a repository on git that I'm trying to erase. I set it up for initial practice, but now, I don't want to use it because the name is dumb (created it in a hurry) I need to get rid if it, because the PC keeps trying to reference it when I use Git. I just need to use my newer (better named) repository. I'm not familiar with the git cli in the least. Any help would be appreciated.
Git creates a hidden .git folder when you initialize or clone a repository. Delete that folder to get rid of the repo.
From the command line, you can delete it with rd /S/Q .git (Windows) or rm -rf .git (Mac/Linux).
If you're wanting to remove a repository from GitHub, you can do that via Settings -> Options -> Delete this repository

Tortoise SVN undo checkout in repository

I am very new to Tortoise SVN so I hope I use the correct terminology...
I have a repository, say C:/RCode and I was checking it out into say C:/Working. I do not know what exactly went wrong, but I must have checked out something in my repository C:/RCode. As a result, this folder has now features of both a repository and a checked out folder - e.g. it now also has the green v icon overlay next to the icon overlay of a repository.
How can I tell Tortoise that this is should not be a checkout folder?
To make Tortoise SVN forget a folder is a checked out folder, it suffices to show hidden files and folders in the folder of interest and then delete the hidden folder .svn
The command you're looking for is an svn export. An svn checkout is the process of tracking local changes into a series of deltas (inside that .svn folder) so that you may commit changes back to the repository.
An export does essentially what a checkout does, but without the version control aspect of it. The command you would run for your example would be:
svn export file:///C:/RCode C:/Working
Or if you're using TortoiseSVN:
Right click anywhere in Windows Explorer
Enter the URL of the repository and output directory
Specify a revision (HEAD by default)
Select OK.
Simply deleting the .svn folder works as well, but it's an extra step (along with cleaning your Recycle Bin). It's also worth noting that svn export is useful for making a copy of your local working copy (a checkout) to a non-versioned copy somewhere else on your local machine.
svn export C:/Working C:/NonCheckout

Copying file from desktop to remote repository on SVN

I am extremely new to SVN, I am using SVN on Mac OS terminal. I have a file on my laptop that I want to transfer to my repository on my remote server.
This is what I have done:
I have checked out the repository. It says "checked out revision *".
I have used cd until the folder that I want to insert the file. So at this point I have a path like: (...../src/soln$) so I want to insert the file in the 'soln' folder.
When I try:
svn add ('...../lo.java') (the path to my file on my computer) it says:
('....../src/soln/') is not a working copy
svn import ...../lo.java it brought something weird to the screen
Please help me figure out what I am doing wrong or not doing.
The error indicates that the parent is not yet in svn. Try to svn add each folder above lo.java.
As an example if the repo root is at /path/to/my/repo and your file is in /path/to/my/repo/src/soln/lo.java then you'll not only want to svn add lo.java from inside the soln directory, but you'll also want to svn add /path/to/my/repo/src and then svn add /path/to/my/repo/src/soln before you can perform the svn add lo.java

svn - single file not under version control

I've added a new file (pdf) to a directory and when I try and commit the new file it is saying that it is not under version control, the directory and every other file in the directory is under version control as when I tried svn add * it listed all the files as being under version control.
What is causing this problem and how do I fix it?
EDIT: OK I am now able to add the file, am I right in saying that the svn add * command added this file under version control thus allowing me to commit the file?
Yes, the svn add * did that.
You have to svn add Name_of_File any new files before you can svn commit them.
you can try something like this...
in the checkout directory run this command
svn add . --force
then just commit it all
svn commit -m "your text" *
In some cases the add command doesn't do it, and still gives an error. the best thing is to perform the svn cleanup [PATH...] command then try to add or commit.

Resources