top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Git: How to clear history of all repo url that has been accessed from local machine?

+3 votes
122 views

My company is upgrading the laptops and so, they're selling the old ones. The problem is, we've been using the old laptops to access remote git repos and the employer would like to clean all possible traces of repo URLs that have been accessed in these laptops. How do I do this? We used Git Bash and Conemu. Will uninstalling Git Bash and Conemu be enough to delete all repo URL history in the laptops? or are these repo URL never been saved to local disk in the first place?

posted Dec 1, 2014 by Alok Sharma

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Do these thing, I am sure you will be safe.

1. As you are saying, uninstalling GIT,
2. rm -f .ssh/known_hosts           //remove (.ssh/ will be present in home directory)
3. or you can delete all the file inside ".ssh/"  
4. open you browser, login into you git code server(code internals).
         1. Goto setting,  click on SSH Public Keys
         2. Then select all the present key and press delete.
 Now you are done, and good to go.

It will be better if you delete you local directory which contains the code.
answer Dec 2, 2014 by Arshad Khan
Similar Questions
+1 vote

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

+5 votes

I know form the "git log" we can now the commit time, but how to know when it is in the remote git server.

0 votes

I have a problem with an already committed file into my repo. This git repo was converted from svn to git some years ago. Last week I have change some lines in a file and I saw in the diff that it is marked as binary (it's a simple .cpp file). I think on the first commit it was detected as an utf-16 file (on windows). But no matter what I do I can't get it back to a "normal text" text file (git does not detect that), but I is now only utf-8. I also replace the whole content of the file with just 'a' and git say it's binary.

Is the only way to get it back to text-mode?:
* copy a utf-8 version of the original file
* delete the file
* make a commit
* add the old file as a new one

I think that will work but it will also break my history.

Is there a better way to get these behavior without losing history?

0 votes

I'm about to move the git repository directory from current one: /opt/git to new one: /passdev/git. And I got some question regards how to perform this?

First I will Shut down git and I tried to search online but I can't find any links on how to shutdown git? could you let me know what is the commands on how to shutdown the git?

Next is Copy /opt/git to /passdev/git? Is this the correct way to move the whole installation directory? Next Bring up git, what is the commands to bring up? and also I had find out this link: http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ is for move the folders on one repository to another repository, so I was wondering since I'm going to move the whole repository folder into different location, so should I using git filter-branch --subdirectory-filter -- --all to move each dirctory in one repo, or I can just using unix commands cp to move the whole repository folder?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...