Home » git

Tag Archives: git

GitOps

1. Introduction Software development has changed a lot in the last few decades. We have moved from Waterfall to Agile to DevOps to CloudNative and GitOps. The waterfall model has some advantages but the main disadvantage is that it does not fit well with projects where the requirements are changing quite frequently. Agile does not solve all the problems but ...

Read More »

Git Squash

1. Introduction While developing a new feature you will have multiple stages until that feature is completed. Git offers different options to manage your git commits like squash, cherry-pick, amend and others. 2. What is Git Squash? Git Squash means to combine multiple commits into a single one and rewrite the git change log (commit history). This feature is most ...

Read More »

Installing Sourcetree for GIT

1. Introduction Working on a project with multiple teams that develops multiple features, you will need to have something like a version of control to be able to manage and integrate your changes into your project. Most of the IDEs are able to manage these code changes and view the differences. A useful tool that will be presented in this ...

Read More »

Git apply patch Example

1. Introduction to Git In this post, we feature a comprehensive article on Git apply patch. Git is a distributed version control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity and ...

Read More »

Git Pull Refusing to merge unrelated histories Example

In this blog post, we will take a quick look at Git and the problem of unrelated histories during Git merge. We will also look at a way to solve the unrelated history problem. 1. Introduction to Git Git is a distributed version control system for tracking changes in source code during software development. It is designed for coordinating work ...

Read More »

Git Abort Merge Example

In this post, we present a Git Abort Merge Example. 1. Introduction Merging branches is an important operation when working with Version Control Systems (VCSs). One feature that makes Git standout among other VCSs is its branching mechanism. The mechanism used by Git to create and manage branches is both lightweight and efficient in comparison to other VCSs. Because branching ...

Read More »

Git Add Submodule Example

In this post, we feature a comprehensive Example on Git Add Submodule. 1. Introduction An important concept in software development is reusability. When working on a software project you may have situations where a function or method is used in many places of an application. Rather than interspersing the function/method code throughout the application, it is useful to place it ...

Read More »

Git Orphan Branch Example

In this post, we present a Git Orphan Branch Example. 1. Introduction In general, when you create a new branch off branch “master” you inherit its commit history. The exception is an orphan (or disconnected) branch. An orphan branch does not have a parent-child relationship to the master branches’ commits. Most commits have one parent commit, one obvious exception being ...

Read More »

Git Generate SSH Key Example

In this post, we will demonstrate how to generate an SSH key that can be used to authenticate with a Git server. 1. Introduction The two transfer protocols that are used to access a Git server are HTTPS and SSH (short for Secure Shell). (The git and local protocols are unusable for any but the most basic development environments.) HTTPS ...

Read More »

Git Edit Commit Message Example

In this post, we present a Git Edit Commit Message Example. 1. Introduction Performing a commit operation in Git is not something to be taken lightly. Suppose we unintentionally apply the wrong commit message. Are we doomed? Fortunately, we can edit the message after the fact. In this example, we will demonstrate how to edit a commit message when the ...

Read More »