Software Development with Git

How and why to use Git Submodules

(Fri Dec 10 2021 00:00:00 GMT+0200 (Eastern European Standard Time)) Sometimes we need to use the contents of one Git repository inside another. A typical example is using the source for a shared library in multiple applications. With Git Submodules, we configure one or more other repositories to check out as child repositories.

Fixing could not read Username for 'https://github.com': No such device or address in Jenkins

(Wed Aug 12 2020 00:00:00 GMT+0300 (Eastern European Summer Time)) You might have a successfully executing build task in Jenkins, then suddenly need that build task to push to a Github repository. For example, it might render a statically generated website to push to the gh-pages branch for display using Github Pages. But this inscrutable error message comes up. There is a fairly simple fix, especially if you're using an HTTPS URL to access the Github repository.

These github alternatives give you powerful git hosting, on your own terms

(Mon Jan 08 2018 00:00:00 GMT+0200 (Eastern European Standard Time))

Git is a powerful source code revision control system, letting teams large and small track changes between team members. Github is an excellent service for hosting Git repositories. The Github corporation offers powerful free features, and even more powerful paid features, and software teams around the world are using Github to collaborate. But what if you want to, or must, host your repositories yourself? Some corporate security teams require no use of 3rd party services. Are you stuck using bare git?

Fortunately several Bitbucket and Github alternatives exist letting you create source repositories similar to Github, with most of the capabilities of Github. These open source Github/Bitbucket alternatives can be installed on your own hardware.

Throwing away local changes in Git workspace, allowing 'git pull' to proceed

(Tue Aug 08 2017 00:00:00 GMT+0300 (Eastern European Summer Time))

Git is a powerful source code revision control system, letting teams large and small track changes between team members. It is widely used and very flexible. However, it's easy to get into an inscrutable state where it's not clear how to proceed.

Just now I found myself wishing to update my local repository with changes from co-workers. The repository contains UML models designed with Enterprise Architect, hence the primary thing in the repository is a large binary file. I'd been running Enterprise Architect on my local file, and there must have been some changes made to that file. As such Git told me there were local changes which I must merge before I could fetch the upstream changes. (specifically: Your local changes to the following files would be overwritten by merge) But I knew any change that had been made was unimportant, unneeded, and should be tossed away. Leaving me wondering how to throw away changes to a local Git repository.

Fixing 'Enter passphrase for /dev/fd/63' in a Gitlab CI job

(Thu Jun 30 2016 00:00:00 GMT+0300 (Eastern European Summer Time)) If you're a Gitlab user you're probably hoping to use Gitlab CI to automate builds and deployments. You probably want to deploy something using rsync, using an SSH key for security. Unfortunately (in my opinion) the official Gitlab documentation is confusing. While the Gitlab team does provide example .gitlab-ci.yml files that are supposed to work, the actual specifics of what to do are sketchy, and I found myself puzzling over a curious error message: "Enter passphrase for /dev/fd/63" ... WTF?