Initialized repo on the wrong folder - github

After selecting Initialize Repo on a particular folder and letting VSCode do its thing, I realized I had a number of items in the folder that I didn't want Repo'd. Rather than move those items out of the folder, however, what I want to do is create a new folder for the stuff I do want repo'd and initialize that.
How do I go about 'uninitializing' the current folder so that it isn't tracked anymore?

When you create a git repository, a hidden ".git" folder is created in the repository folder. If you want to "uninitialize" it, you just have to delete it.

Related

Deleteing a repository in Visual Studio Code

where can I find .git folder to delete a repo on my system. I opened my local disk as a repository and I have about 5k changes to make.The thing is if I check my git account my local disk is not showing as a repo so i really dont know what is going on. Any solution will be welcomed.
Among the "5k changes", select a file and open it in your file browser. Enable hidden files/folders. Start moving up the hierarchy of that path, i.e., keeping going up in the parent directory of the file.
You'll find the .git folder somewhere. Check its creation date. If it's recent, delete it. Be careful not to delete any commits you had made in some project.

How to add an empty folder inside an already existing repository? Github [duplicate]

This question already has answers here:
How do I add an empty directory to a Git repository?
(37 answers)
Closed 2 years ago.
In GitHub, I already have an Automata repository with 1 project in it. I just want to add more projects in this repository. I wish to create different folders inside the Automata repository so I can better organize my projects. In other words, my question is "how to add a folder inside a repository?"
An empty directory cannot be part of the git versioning system. But you can use a little workaround.
You can add a .gitignore inside your empty directory. Add these lines:
#Ignore everything
*
#dont ignore this file
!.gitignore
The * will assure that no files in this directory will be tracked. However, as you probably want to add files later, you shouldn't put the star in. Therefore your .gitignore can be empty. You can add real files to ignore later, as your project grows.
To create the .gitignore type the following in your console:
$ mkdir $foldername
$ touch .gitignore
$ git add foldername/.gitignore
$ git commit -m 'added placeholder folder' $foldername
where you replace $foldername with the desired name of your folder.
Now you have a folder which is not completely empty, but only has one hidden file.
Github doesn't allow empty folders. You can make a folder and add a placeholder file to it and push that to your repository. That's the only way you would be able to create a new folder in your GitHub repo. You can't create a folder and then add files to it on GitHub, but rather the creation of folder must happen with a file inside that folder.
You can either push the folder through git commands. There's another option to directly drag and drop folders from your system to your GitHub repository.
To directly add a folder from the GitHub website, click on Create New File. Type in name of folder you want to create, add the file and Commit new file to add it. You can refer the below gif -

Eclipse Oxygen - Git Staging NOT Showing File Under Dot Folder

I have a project in Eclipse Oxygen that uses Git. When a file is created or edited it shows in the Unstaged Changes list on the Git Staging View. This allows you to drag the file to the Staged Changes list and then it can be committed.
I needed to create a folder named .sti directly under the project folder and then a folder named bin under that, like this:
project/.sti/bin
Then I had to create a file called assemble in the .stl/bin folder.
The problem is that the file called assemble does NOT show in the Unstaged Changes list. Therefore I cannot stage and commit it.
Is there any way of getting this file to appear?
I'm sure that the .sti folder is the cause of the problem.
Any ideas or help would be much appreciated...
In the end I deleted the .gitignore file in the project folder and recreated it. Upon refreshing the project in Project Explorer, the changed file appeared in the Unstaged Changes.
This was rather strange as the original .gitignore did not specify: .sti

Eclipse Team Synchronizing View: How to remove unversioned items in outgoing changes?

While viewing the outgoing changes in Eclipse Team Synchronization(Subclipse), I am able to see the unversioned files also, like the generated class files, build folders, etc, which I do not want to see in this view. I dont want to add it to svn:ignore, since I have to do it manually for all the additional folders generated.
Is there any setting to change this to show only versioned files in this mode always?
Tortoise SVN client shows this option while committing, to show only versioned files. I am looking for such an option in Subclipse Team Synchronization view. Thanks in advance.
eclipse_outgoing_view
You should svn:ignore build folders.
Otherwise it's only a question of time until you or your colleague checks in the build folder
You should use svn:ignore, and note that once you do for a folder, all child folders are automatically ignored. In your example, if the build folder were ignored then everything inside it would automatically be ignored. It looks like your build folder has already been added to repository though, so maybe you can ignore the dist folder inside bin.

what happens when I copy a checked out code folder under CVS?

I am working with a CVS repository found on a remote server.
I check out the code to a local directory code_local
Then I copy code_local, into code_local_2
Do I have now two independent local copies of the repository? Can I change files, commit, update etc. on each directory independently, is if it was done form two different computers?
(this may depend on the way CVS stores information about a local copy)
Yes I do know it's not a straight forward use of CVS, just asking if it will work
Do I have now two independent local copies of the repository?
Yes you have two independent LOCAL copies.
Can I change files, commit, update etc. on each directory
independently?
No, both copies point to the same file on the same repository. so they are independent as long as you haven't committed them. when committed the last commit operation will overwrite the previous one.
in fact there is a CVS folder beside every folder of your code that keep repository information of files inside that folder. so when you copy a project or a package, the CVS folder will be copied along with, so the same repository entries will be referenced, no matter how many copies have you made.
Even if you past the copied folder to another package hierarchy, whenever you commit the files it will replace the original files in repository where it first created.
If you want to have independent copies you have to copy and place your source code (.java) files only and commit it through Eclipse for example, in this case the CVS plug-in doesn't find any existing CVS folder beside the new folder and generates a new one in the local and new entries in the repository.