1

I have a large file that can not be pushed to github and need to do surgery on my local clone. The recommended approach is to use the BFG tool https://rtyley.github.io/bfg-repo-cleaner/: and this requires a local mirror of a remote repo. So how can I make a mirror of the local repo in order to use that tool?

Note that the following question that has a similar title is actually mostly unrelated since it is not dealing with mirroring a local clone: Git local mirror and repository

1 Answer 1

1

"remote" here doesn't mean it has to be on another machine, it just means it's not your current "local" clone of the repository. Git remotes don't require a network or server, you can clone a directory.

git clone /path/to/your/repo 

See the "Working With Remotes" chapter of Pro Git for more.


That said, the BFG docs are referring to your existing clone of your Github repository. You don't need to make another clone.

HOWEVER, you might want to make a backup of your clone in case things go wrong. Simply copy the directory. While it's possible to undo what BFG does, it's much simpler to restore from a backup in case things go wrong.

Sign up to request clarification or add additional context in comments.

1 Comment

thx: i was uncertain if a simple FQP would represent a git url.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.