Dockerfile strategies for Git

From Ryan Baumann’s blog post “Git strategies for Docker” There are different strategies for getting your Git source code into a Docker build. Many of these have different ways of interacting with Docker’s caching mechanisms, and may be more or less appropriately suited to your project and how you intend to use Docker. RUN git … Read more

Visual studio 2017 with bitbucket, terminal prompts disabled

I had the same issue, I found an answer that worked for me here: https://github.com/github/VisualStudio/issues/949 Below are the steps mentioned to fix: It seems that the bundled Git-Credential-Manager-for-Windows/ in VIsual Studio 2017 is not the latest release. Downloading the latest release and putting it on top of the files in Visual Studio 2017 worked for … Read more

Git access to private repository using HTTPS

Did you try inserting the username (and optionally password) in the clone URL? git clone https://username@github.com/blah/blahblah.git or if you accept the consequences of storing your password in plain view: git clone https://username:password@github.com/blah/blahblah.git See this thread with a lot of good info: How to provide username and password when run “git clone git@remote.git”? EDIT: My original … Read more

Why can’t I push from a shallow clone?

As Junio C. Hamano (main Git maintainer) puts it: Isn’t the rule more or less like: If your shallow repository’s history does not extend long enough and the other repository forked before your truncated history, wyou cannot compute the common ancestor and you cannot push out. Update 2014: see “Is git clone –depth 1 (shallow … Read more

How to update a git shallow clone?

TL;DR Given that you have an existing –depth 1 repository cloned from branch B and you’d like Git to act as if you removed and re-cloned, you can use this sequence of commands: git fetch –depth 1 git reset –hard origin/B git clean -dfx (e.g., git reset –hard origin/master—I cannot put italics in the code-literal … Read more