Showing posts with label: git. Show all posts.

Create New Git Repo From Shallow Clone

Wednesday 27 January 2021

How to create a new git repo from a shallow clone to not keep the history.

git clone [old repo] --depth 1

git remote add new_source [new repo]

git remote remove origin

git rev-parse --verify master >> .git/info/grafts

git filter-branch -- --all git push new_source master

Labels: git
No comments

Git Through Proxy Server

Monday 11 May 2020

As of a few days ago they must have changed something in the corporate proxy server at work because all of a sudden no one could push or pull to git remotes. I was getting error "fatal: unable to access [proxy server address]: Timed out"

After much frustration, it turns out there was a fairly simple solution. I had http_proxy and https_proxy environment variables set to the proxy server. If I set an environment variable "no_proxy" with the values of the domains I need to connect to with git everything works fine.

Labels: git
6 comments

Archives