Posts

Showing posts with the label Git

Versioning for open source library

Versioning for open source library Few weeks ago I explained how Gitversion can be used to apply semantic versioning to projects based on commit and tag history. Today I will dive deeper in the purpose of versioning and introduce a flow which can be followed to version open source project libraries by looking into four important parts in the lifecycle of an open source library. Version with Semantic versioning Branching strategy and Commits Continuous Integration and Releases 1. Version with Semantic versioning Semantic versioning is ideal for versioning libraries. It is formed by three numbers {major}.{minor}.{patch} . Each number is used to indicate to the user the level of safety for upgrading the library. Upgrade of the major is risky and has chances to contain breaking changes, therefore looking at release notes or looking for migration would be recommended. Upgrade of the minor has lesser risk and can be used to show availability of new features. Upgrade of the pat...

Publish Angular application with Angular CLI and AspDotNet Core

Publish Angular application with Angular CLI and AspDotNet Core A few months back I showed how to bootstrap an Angular application using Angular CLI . Apart from bootstrapping and serving, Angular CLI is also capable of packing the application and get it ready to be published in order for us to serve it on our own webserver. Today we will see how the process of publishing can be done in three steps 1. Prepare the project for packing 2. Create a host 3. Publish the application 1. Prepare the project for packing In order to ease the understanding, we start by separating our client Angular application and Host application. The client will go into /client while the host into /host . Here a preview of how the structure will look like: - MyApplication | - /.git | - /client | - /e2e | - /node_modules | - /src | - ... | - /host (nothing here yet) | - /Host | - MyApplication.Host.sln In order to create t...

Untrack a file previously pushed with Git

Untrack a file previously pushed with Git Last week I had to untrack a file previously pushed on a git repository and I wasn’t sure on how to do it. Took me a while to wrap my head around the process so today I would like to share that in order to have it documented here. This post will be composed by two parts: Scenario git rm --cached git update-index --assume-unchanged 1. Scenario I have a file test already pushed in my repository. > git ls-tree -r master 100644 blob 63123fbe81571b48b7d65602f9828524f9d84b5f .gitignore 100644 blob a6712f67380bebb75d15c817820e8d2f5c97fb4c test Now I wanted to untrack the file from the repository. 2. git rm --cached If I want to remove the file from the git repository , I can do the following: > git rm --cached test > git commit -m "remove test" > git push rm is used to remove a file from the index (The index is where the staged changes are held). It would be the same as manually deleting the file and then s...