Related Tags:
Git Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows. Learn More, Version Control Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Through version control you can keep track of nearly any type of file on a computer. Learn More,

Completely remove git repository binding or mapping of a project,and then commit it on git as a new one?

Description:I have to add a local project to git repository as a new project which previously has binding with an other git repository ,so I need to first completely remove the previous binding/mapping or tracking of git repository then starting from scratch commit it as a new project on my git repository

Posted by: | Posted on: Oct 22, 2019

1 answers

Replies

2

Basically all the information of a git repository in a project is stored in .git folder in that project's root directory, so for removing git binding/mapping or tracking you need to remove that folder and you can add it as new project on git repository, for the purpose you can follow the steps:
1)Go to the root directory of your project and make .git folder visible it is a hidden folder by default.(for windows, open your project folder in file explorer -->view-->Hidden items, enable this check)
2)Open your project's root folder in command prompt and run following three commands where first one will remove everything inside .git folder, second line will remove the .git empty directory and third one will initiate fresh instance.

del /F /S /Q /A .git
rmdir .git
git init

Then you can create a fresh clone of your empty git repository and merge your project to that one.

Replied by: | Replied on: Oct 24, 2019



Reply
×

Code block Hyperlink bold Quotes block Upload Images

Preview